@@ -23,8 +23,8 @@ private static record ThrowingTestCase(String formula) {
2323 private static List <TestCase > testCases () {
2424 return List .of (
2525 new TestCase ("#if A" , new Literal ("A" )),
26- new TestCase ("#ifdef A" , new Literal ("A " )),
27- new TestCase ("#ifndef A" , new Not ( new Literal ("A" ) )),
26+ new TestCase ("#ifdef A" , new Literal ("defined(A) " )),
27+ new TestCase ("#ifndef A" , new Literal ("defined(A)" , false )),
2828 new TestCase ("#elif A" , new Literal ("A" )),
2929
3030 new TestCase ("#if !A" , new Not (new Literal ("A" ))),
@@ -110,7 +110,7 @@ private static List<TestCase> testCases() {
110110 new TestCase ("#if ' ' == 32" , new Literal ("' '==32" )),
111111 new TestCase ("#if (NAME<<1) > (1<<BITS)" , new Literal ("(NAME<<1)>(1<<BITS)" )),
112112 new TestCase ("#if #cpu(sparc)" , new Literal ("cpu(sparc)" )),
113- new TestCase ("#ifdef \\ U0001000" , new Literal ("\\ U0001000" )),
113+ new TestCase ("#ifdef \\ U0001000" , new Literal ("defined( \\ U0001000) " )),
114114 new TestCase ("#if (defined(NAME) && (NAME >= 199905) && (NAME < 1991011)) || (NAME >= 300000) || defined(NAME)" ,
115115 new Or (new And (new Literal ("defined(NAME)" ), new Literal ("NAME>=199905" ), new Literal ("NAME<1991011" )), new Literal ("NAME>=300000" ), new Literal ("defined(NAME)" ))),
116116 new TestCase ("#if __has_warning(\" -Wa-warning\" _foo)" , new Literal ("__has_warning(\" -Wa-warning\" _foo)" )),
0 commit comments