Add tests defining a macro to be a literal and another macro.
authorCarl Worth <cworth@cworth.org>
Tue, 11 May 2010 19:39:29 +0000 (12:39 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 11 May 2010 19:39:29 +0000 (12:39 -0700)
These 3 new tests are modeled after 3 existing tests but made slightly
more complex since now instead of definining a new macro to be an
existing macro, we define it to be replaced with two tokens, (one a
literal, and one an existing macro).

These tests all fail currently because the replacement lookup is
currently happening on the basis of the entire replacement string
rather than on a list of tokens.

tests/005-define-composite-chain.c [new file with mode: 0644]
tests/006-define-composite-chain-reverse.c [new file with mode: 0644]
tests/007-define-composite-recursive.c [new file with mode: 0644]

diff --git a/tests/005-define-composite-chain.c b/tests/005-define-composite-chain.c
new file mode 100644 (file)
index 0000000..f5521df
--- /dev/null
@@ -0,0 +1,3 @@
+#define foo 1
+#define bar a foo
+bar
diff --git a/tests/006-define-composite-chain-reverse.c b/tests/006-define-composite-chain-reverse.c
new file mode 100644 (file)
index 0000000..4bb91a1
--- /dev/null
@@ -0,0 +1,3 @@
+#define bar a foo
+#define foo 1
+bar
diff --git a/tests/007-define-composite-recursive.c b/tests/007-define-composite-recursive.c
new file mode 100644 (file)
index 0000000..5784565
--- /dev/null
@@ -0,0 +1,6 @@
+#define foo a bar
+#define bar b baz
+#define baz c foo
+foo
+bar
+baz