OSDN Git Service

Add a couple more tests for chained #define directives.
authorCarl Worth <cworth@cworth.org>
Tue, 11 May 2010 19:35:06 +0000 (12:35 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 11 May 2010 19:35:06 +0000 (12:35 -0700)
One with the chained defines in the opposite order, and one with the
potential to trigger an infinite-loop bug through mutual
recursion. Each of these tests pass already.

tests/003-define-chain-reverse.c [new file with mode: 0644]
tests/004-define-recursive.c [new file with mode: 0644]

diff --git a/tests/003-define-chain-reverse.c b/tests/003-define-chain-reverse.c
new file mode 100644 (file)
index 0000000..a18b724
--- /dev/null
@@ -0,0 +1,3 @@
+#define bar foo
+#define foo 1
+bar
diff --git a/tests/004-define-recursive.c b/tests/004-define-recursive.c
new file mode 100644 (file)
index 0000000..2ac56ea
--- /dev/null
@@ -0,0 +1,6 @@
+#define foo bar
+#define bar baz
+#define baz foo
+foo
+bar
+baz