aboutsummaryrefslogtreecommitdiff
path: root/tests/if1-k.expout
diff options
context:
space:
mode:
Diffstat (limited to 'tests/if1-k.expout')
-rw-r--r--tests/if1-k.expout30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/if1-k.expout b/tests/if1-k.expout
new file mode 100644
index 000000000000..2be8567b970c
--- /dev/null
+++ b/tests/if1-k.expout
@@ -0,0 +1,30 @@
+/* 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 FOO
+int foo() { return 0; }
+#else
+#error FOO not defined
+#endif
+
+#if BAR
+int foo() { return 0; }
+#elif FOO
+int bar() { return 0; }
+#else
+#error FOO not defined
+#endif
+
+int main()
+{
+ foo();
+ bar();
+}