]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unifdef/tests/if4-k.expout
Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80'
[FreeBSD/FreeBSD.git] / contrib / unifdef / tests / if4-k.expout
1 /* Copyright 2004, 2008 Bob Proulx <bob@proulx.com>
2 Distributed under the two-clause BSD licence;
3 see the COPYING file for details. */
4
5 #include <stdio.h>
6 #include <stdlib.h>
7
8 /* This code is passed through. "#if 0 else" */
9
10 /* This code is passed through. "#if 1 then" */
11
12 #if defined(FOO) || defined(FOOB)
13 int foo1() { return 0; }
14 #else
15 #error FOO or FOOB not defined
16 #endif
17
18 #if defined(FOOB) || defined(FOO)
19 int foo2() { return 0; }
20 #else
21 #error FOO or FOOB not defined
22 #endif
23
24 #if defined(FOO) && defined(FOOB)
25 int foo3() { return 0; }
26 #else
27 #error FOO and FOOB not defined
28 #endif
29
30 #if defined(FOOB) && defined(FOO)
31 int foo4() { return 0; }
32 #else
33 #error FOO and FOOB not defined
34 #endif
35
36 int main()
37 {
38   foo1();
39   foo2();
40   foo3();
41   foo4();
42 }