blob: 5ba4e48dfa6cdd261ab37864fa42d90e843ebd5b [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001Run me through unifdef -UA
2*** Nothing should be visible here:
3#if defined A && defined B
4hello world
5#endif
6#if defined A && B
7hello world
8#endif
9#if defined A && 1
10hello world
11#endif
12#if defined A && (1 > 0)
13hello world
14#endif
15#if defined B && defined A
16hello world
17#endif
18#if B && defined A
19hello world
20#endif
21#if 1 && defined A
22hello world
23#endif
24#if (1 > 0) && defined A
25hello world
26#endif
27#if defined A && (defined FOO || defined BAR)
28hello world
29#endif
30#if (defined FOO || defined BAR) && defined A
31hello world
32#endif
33
34*** Everything should be visible here, but #if/#endif removed:
35#if defined B || !defined A
36hello world 1
37#endif
38#if !defined A || defined B
39hello world 2 (last)
40#endif
41
42*** This should be unchanged (#if/#endif not removed):
43#if defined A || defined B
44I am here 1
45#endif
46#if defined B || defined A
47I am here 2
48#endif
49I am here 3
50#if !defined FOO && !defined BAR \
51 && !defined BAZ
52# error "I am here 4"
53#endif
54I am here 5
55#if (!defined FOO \
56 && (defined BAR || defined BAZ \
57 || defined XYZ))
58I am here 6
59#endif
60I am here 7
61#if !defined FOO \
62 && defined BAR
63I am here 8
64#endif
65I am here 9 (last)
66
67*** End