summaryrefslogtreecommitdiff
path: root/tests/preprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/preprocessor')
-rw-r--r--tests/preprocessor/x-macro.slang13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/preprocessor/x-macro.slang b/tests/preprocessor/x-macro.slang
new file mode 100644
index 000000000..6b8d48b4e
--- /dev/null
+++ b/tests/preprocessor/x-macro.slang
@@ -0,0 +1,13 @@
+// x-macro.slang
+//TEST:SIMPLE:
+
+// Test the case of an "X macro" that takes another macro as a parameter
+
+#define X(M) M(0) M(1) M(2) M(3) M(4) M(5) M(6) M(7)
+
+#define A(x) + x + x + x
+
+int sum()
+{
+ return X(A);
+}