Changeset 71732 in vbox
- Timestamp:
- Apr 7, 2018 2:32:14 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/testcase
- Files:
-
- 2 edited
-
tstDeviceStructSize.cpp (modified) (2 diffs)
-
tstDeviceStructSizeRC.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
r71731 r71732 25 25 #include <iprt/x86.h> 26 26 27 28 27 #define VBOX_WITH_HGCM /* grumble */ 29 28 #define VBOX_DEVICE_STRUCT_TESTCASE 29 30 /* Check that important preprocessor macros does not get redefined: */ 31 #include <VBox/cdefs.h> 32 #include <VBox/log.h> 33 #ifdef DEBUG 34 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_DEBUG 35 #else 36 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_DEBUG 37 #endif 38 #ifdef LOG_ENABLED 39 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_LOG_ENABLED 40 #else 41 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_LOG_ENABLED 42 #endif 43 #ifdef VBOX_STRICT 44 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_VBOX_STRICT 45 #else 46 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_VBOX_STRICT 47 #endif 48 #ifdef RT_STRICT 49 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_RT_STRICT 50 #else 51 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_RT_STRICT 52 #endif 53 54 /* The structures we're checking: */ 30 55 #undef LOG_GROUP 31 56 #include "../Bus/DevPciInternal.h" … … 116 141 #undef LOG_GROUP 117 142 #include "../Audio/DevHDA.cpp" 143 144 145 /* Check that important preprocessor macros didn't get redefined: */ 146 #if defined(DEBUG) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_DEBUG) 147 # error "DEBUG was modified! This may throw off structure tests." 148 #endif 149 #if defined(LOG_ENABLED) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_LOG_ENABLED) 150 # error "LOG_ENABLED was modified! This may throw off structure tests." 151 #endif 152 #if defined(RT_STRICT) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_RT_STRICT) 153 # error "RT_STRICT was modified! This may throw off structure tests." 154 #endif 155 #if defined(VBOX_STRICT) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_VBOX_STRICT) 156 # error "VBOX_STRICT was modified! This may throw off structure tests." 157 #endif 158 118 159 119 160 #include <stdio.h> -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
r71721 r71732 36 36 #define VBOX_DEVICE_STRUCT_TESTCASE 37 37 #define VBOX_WITH_HGCM /* grumble */ 38 39 /* Check that important preprocessor macros does not get redefined: */ 40 #include <VBox/cdefs.h> 41 #include <VBox/log.h> 42 #ifdef DEBUG 43 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_DEBUG 44 #else 45 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_DEBUG 46 #endif 47 #ifdef LOG_ENABLED 48 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_LOG_ENABLED 49 #else 50 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_LOG_ENABLED 51 #endif 52 #ifdef VBOX_STRICT 53 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_VBOX_STRICT 54 #else 55 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_VBOX_STRICT 56 #endif 57 #ifdef RT_STRICT 58 # define VBOX_DEVICE_STRUCT_TESTCASE_CHECK_RT_STRICT 59 #else 60 # undef VBOX_DEVICE_STRUCT_TESTCASE_CHECK_RT_STRICT 61 #endif 62 63 /* The structures we're checking: */ 38 64 #undef LOG_GROUP 39 65 #include "../Bus/DevPciInternal.h" … … 114 140 # include "../Storage/DevNVMe.cpp" 115 141 #endif 142 143 /* Check that important preprocessor macros didn't get redefined: */ 144 #if defined(DEBUG) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_DEBUG) 145 # error "DEBUG was modified! This may throw off structure tests." 146 #endif 147 #if defined(LOG_ENABLED) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_LOG_ENABLED) 148 # error "LOG_ENABLED was modified! This may throw off structure tests." 149 #endif 150 #if defined(RT_STRICT) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_RT_STRICT) 151 # error "RT_STRICT was modified! This may throw off structure tests." 152 #endif 153 #if defined(VBOX_STRICT) != defined(VBOX_DEVICE_STRUCT_TESTCASE_CHECK_VBOX_STRICT) 154 # error "VBOX_STRICT was modified! This may throw off structure tests." 155 #endif 156 116 157 117 158 /* we don't use iprt here because we're pretending to be in GC! */
Note:
See TracChangeset
for help on using the changeset viewer.

