From 5a0d62f302b38e972c99cb5e228d016b5fa041ff Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 9 Apr 2021 04:15:33 -0400 Subject: 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 --- tests/current-bugs/preproc-stringify-1.slang | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/current-bugs/preproc-stringify-1.slang (limited to 'tests/current-bugs/preproc-stringify-1.slang') 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 -- cgit v1.2.3