13#include <cppunit/extensions/HelperMacros.h>
52 bool oneFalse =
false;
54 CPPUNIT_ASSERT(oneTrue);
55 CPPUNIT_ASSERT(!oneFalse);
62 bool zeroTrue =
false;
65 bool zeroFalse =
true;
67 bool zeroFalse =
false;
69 CPPUNIT_ASSERT(zeroFalse);
70 CPPUNIT_ASSERT(!zeroTrue);
77 bool undefinedTrue =
true;
79 bool undefinedTrue =
false;
82 bool undefinedFalse =
true;
84 bool undefinedFalse =
false;
86 CPPUNIT_ASSERT(undefinedFalse);
87 CPPUNIT_ASSERT(!undefinedTrue);
103#if UNDEFINED_FOO && ONE_FOO
104 bool undefinedAndTrueA =
true;
106 bool undefinedAndTrueA =
false;
108#if !UNDEFINED_FOO && ONE_FOO
109 bool undefinedAndFalseA =
true;
111 bool undefinedAndFalseA =
false;
113 CPPUNIT_ASSERT(undefinedAndFalseA);
114 CPPUNIT_ASSERT(!undefinedAndTrueA);
116#if ONE_FOO && UNDEFINED_FOO
117 bool undefinedAndTrueB =
true;
119 bool undefinedAndTrueB =
false;
121#if ONE_FOO && !UNDEFINED_FOO
122 bool undefinedAndFalseB =
true;
124 bool undefinedAndFalseB =
false;
126 CPPUNIT_ASSERT(undefinedAndFalseB);
127 CPPUNIT_ASSERT(!undefinedAndTrueB);
129#if UNDEFINED_FOO && UNDEFINED_FOO
130 bool undefinedAndUndefinedC =
true;
132 bool undefinedAndUndefinedC =
false;
134#if !UNDEFINED_FOO && !UNDEFINED_FOO
135 bool notUndefinedAndNotUndefinedC =
true;
137 bool notUndefinedAndNotUndefinedC =
false;
139 CPPUNIT_ASSERT(!undefinedAndUndefinedC);
140 CPPUNIT_ASSERT(notUndefinedAndNotUndefinedC);
156#if UNDEFINED_FOO || ZERO_FOO
157 bool undefinedOrTrueA =
true;
159 bool undefinedOrTrueA =
false;
161#if !UNDEFINED_FOO || ZERO_FOO
162 bool undefinedOrFalseA =
true;
164 bool undefinedOrFalseA =
false;
166 CPPUNIT_ASSERT(undefinedOrFalseA);
167 CPPUNIT_ASSERT(!undefinedOrTrueA);
169#if ZERO_FOO || UNDEFINED_FOO
170 bool undefinedOrTrueB =
true;
172 bool undefinedOrTrueB =
false;
174#if ZERO_FOO || !UNDEFINED_FOO
175 bool undefinedOrFalseB =
true;
177 bool undefinedOrFalseB =
false;
179 CPPUNIT_ASSERT(undefinedOrFalseB);
180 CPPUNIT_ASSERT(!undefinedOrTrueB);
182#if UNDEFINED_FOO || UNDEFINED_FOO
183 bool undefinedOrUndefinedC =
true;
185 bool undefinedOrUndefinedC =
false;
187#if !UNDEFINED_FOO || !UNDEFINED_FOO
188 bool notUndefinedOrNotUndefinedC =
true;
190 bool notUndefinedOrNotUndefinedC =
false;
192 CPPUNIT_ASSERT(notUndefinedOrNotUndefinedC);
193 CPPUNIT_ASSERT(!undefinedOrUndefinedC);
CPPUNIT_TEST(testIfDefAnd)
CPPUNIT_TEST(testIfDefOr)
CPPUNIT_TEST_SUITE(TestPreCompiler)
implements test program's main() function while enabling customization
int run(int argc, char *argv[])
int main(int argc, char *argv[])
CPPUNIT_TEST_SUITE_REGISTRATION(TestPreCompiler)