Travis CI is no more
[unifdef.git] / tests / if1-k.c
blob712350f9c13caf529e56750568a9d02de48905c9
1 /* Copyright 2004, 2008 Bob Proulx <bob@proulx.com>
2 Distributed under the two-clause BSD licence;
3 see the COPYING file for details. */
5 #include <stdio.h>
6 #include <stdlib.h>
8 #if 0
9 /* This code is commented out. "#if 0 then" */
10 #else
11 /* This code is passed through. "#if 0 else" */
12 #endif
14 #if 1
15 /* This code is passed through. "#if 1 then" */
16 #else
17 /* This code is commented out. "#if 1 else" */
18 #endif
20 #if FOO
21 int foo() { return 0; }
22 #else
23 #error FOO not defined
24 #endif
26 #if BAR
27 int foo() { return 0; }
28 #elif FOO
29 int bar() { return 0; }
30 #else
31 #error FOO not defined
32 #endif
34 int main()
36 foo();
37 bar();