summaryrefslogtreecommitdiff
path: root/tests/current-bugs/preproc-stringify-1.slang
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-04-09 04:15:33 -0400
committerGitHub <noreply@github.com>2021-04-09 01:15:33 -0700
commit5a0d62f302b38e972c99cb5e228d016b5fa041ff (patch)
treea8870f26aa58ff24f85d74291be9fbf185681ebf /tests/current-bugs/preproc-stringify-1.slang
parent8a71039475212fb1e1a6dd2fd2911d02769637ef (diff)
Tests showing preprocessor issues (#1790)
* #include an absolute path didn't work - because paths were taken to always be relative. * Tests showing issues with preprocessor behavior. Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/current-bugs/preproc-stringify-1.slang')
-rw-r--r--tests/current-bugs/preproc-stringify-1.slang14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/current-bugs/preproc-stringify-1.slang b/tests/current-bugs/preproc-stringify-1.slang
new file mode 100644
index 000000000..03e8366b5
--- /dev/null
+++ b/tests/current-bugs/preproc-stringify-1.slang
@@ -0,0 +1,14 @@
+//DIAGNOSTIC_TEST:SIMPLE:-E
+
+// NOTE! This test should *fail*, if preprocessor is working correctly!
+
+#define A a
+#define B b
+
+// Correct output
+// "A B"
+// Slang output
+// # a b ;
+
+#define STRINGIFY(x) #x
+STRINGIFY(A B); \ No newline at end of file