summaryrefslogtreecommitdiff
path: root/tests/if4-k.expout
diff options
context:
space:
mode:
Diffstat (limited to 'tests/if4-k.expout')
-rw-r--r--tests/if4-k.expout42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/if4-k.expout b/tests/if4-k.expout
new file mode 100644
index 000000000000..bb94d6a14e64
--- /dev/null
+++ b/tests/if4-k.expout
@@ -0,0 +1,42 @@
+/* Copyright 2004, 2008 Bob Proulx <bob@proulx.com>
+Distributed under the two-clause BSD licence;
+see the COPYING file for details. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* This code is passed through. "#if 0 else" */
+
+/* This code is passed through. "#if 1 then" */
+
+#if defined(FOO) || defined(FOOB)
+int foo1() { return 0; }
+#else
+#error FOO or FOOB not defined
+#endif
+
+#if defined(FOOB) || defined(FOO)
+int foo2() { return 0; }
+#else
+#error FOO or FOOB not defined
+#endif
+
+#if defined(FOO) && defined(FOOB)
+int foo3() { return 0; }
+#else
+#error FOO and FOOB not defined
+#endif
+
+#if defined(FOOB) && defined(FOO)
+int foo4() { return 0; }
+#else
+#error FOO and FOOB not defined
+#endif
+
+int main()
+{
+ foo1();
+ foo2();
+ foo3();
+ foo4();
+}