Add automated tests on function-type FSCommand parameter passing.
[gnash.git] / testsuite / libcore.all / ClassSizes.cpp
blob3cfed769ef955f07c476853dccfbc8bc854941ac
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifdef HAVE_CONFIG_H
20 #include "gnashconfig.h"
21 #endif
23 #include "as_value.h"
24 #include "as_object.h"
25 #include "Property.h"
26 #include "PropertyList.h"
27 #include "MovieClip.h"
28 #include "Movie.h"
29 #include "DisplayObject.h"
30 #include "RGBA.h"
31 #include "movie_root.h"
32 #include "swf/ShapeRecord.h"
33 #include "StaticText.h"
34 #include "Button.h"
35 #include "MorphShape.h"
36 #include "Shape.h"
37 #include "TextField.h"
38 #include "SWFStream.h"
39 #include "FillStyle.h"
40 #include "swf/DefineFontAlignZonesTag.h"
41 #include "swf/DefineShapeTag.h"
42 #include "swf/DefineButtonCxformTag.h"
43 #include "swf/CSMTextSettingsTag.h"
44 #include "swf/DefineFontTag.h"
45 #include "swf/DefineTextTag.h"
46 #include "swf/PlaceObject2Tag.h"
47 #include "swf/RemoveObjectTag.h"
48 #include "swf/DoActionTag.h"
49 #include "swf/DoInitActionTag.h"
50 #include "swf/DefineEditTextTag.h"
51 #include "swf/SetBackgroundColorTag.h"
53 #include <iostream>
54 #include <sstream>
55 #include <cassert>
56 #include <cmath>
57 #include <string>
58 #include <memory>
60 #include "check.h"
62 #include <boost/preprocessor/seq/for_each.hpp>
64 using namespace gnash;
65 using namespace std;
66 using namespace boost;
67 using namespace gnash::SWF;
69 #define SIZE(x, _, t) \
70 std::cout << BOOST_PP_STRINGIZE(t)": " << (sizeof(t)) << "\n";
72 // Add types in brackets to this macro to have their size printed.
73 #define TYPES \
74 (int) (float) (long) (double) \
75 (Property*) (unique_ptr<Property>) \
76 (std::shared_ptr<Property>) (intrusive_ptr<as_object>) (GcResource) \
77 (rgba) (SWFMatrix) (SWFRect) (LineStyle) (FillStyle) (SWFCxForm) \
78 (as_value) \
79 (DynamicShape)(ShapeRecord)(TextRecord) \
80 (Property) (PropertyList) \
81 (DefinitionTag) (DefineTextTag) (DefineFontTag) (DefineMorphShapeTag) \
82 (as_object) \
83 (DisplayObject) (StaticText) (MorphShape) (Shape) \
84 (InteractiveObject) (MovieClip) (TextField) (Button) (Movie) \
85 (movie_root) (PropFlags) (ObjectURI)
87 int
88 main(int /*argc*/, char** /*argv*/)
90 std::cout << "Gnash class sizes:\n";
91 BOOST_PP_SEQ_FOR_EACH(SIZE, _, TYPES)
92 return 0;