00001
00002
00003
00004
00005 #ifndef VT_TEST_H
00006 #define VT_TEST_H
00007
00008
00009
00010 #define DO_TRAITS_MASK 0x0F
00011 #define DO_TRAITS_VT_ES 0 // Entry size divided by 4
00012 #define DO_TRAITS_VT_OFF_1ST 4 // void* offset to 1st entry
00013 #define DO_TRAITS_VT_OFF 8 // void* offset inside entry
00014 #define DO_TRAITS_VT_DEC 12 // Nr of slots used by virtual destructor
00015 #define DO_TRAITS_VT_DTOR_POS 15 // Destructor positioning 0 - first, 1 - at end
00016 #define DO_TRAITS_VT_IHP 16 // Inheritance padding
00017 #define DO_TRAITS_VT_ERROR 0x80000000 // Set if tests failed
00018
00019
00020
00021 int doGetDoTraits();
00022
00023
00024
00025
00026 int VTableIndex( int ix );
00027
00028
00029
00030
00031
00032
00033 int VTableCompatible( int traits );
00034
00035
00036
00037
00038
00039 int InheritPadding();
00040 int VTablePos( );
00041 int DtorEntries();
00042 int VTableEntrySize( int &off_first );
00043
00044
00045 #ifdef VT_ALL_TESTS
00046 int PodVTableSize();
00047 int Bc1VTableSize();
00048 int Bc3VTableSize();
00049 int Dc1VTableSize();
00050 int Dc3VTableSize();
00051
00052 int CallThisTest();
00053 int CorrectVTableTest();
00054 int TestMembFuncPtr();
00055 int ObjectLayoutTest();
00056 int InterfaceSize();
00057 int DtorPosition();
00058
00059 #endif // VT_ALL_TESTS
00060
00061
00062 #endif // VT_TEST_H
00063
00064