diff options
Diffstat (limited to 'tests/preprocessor')
| -rw-r--r-- | tests/preprocessor/if-macro-token-paste.slang | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/preprocessor/if-macro-token-paste.slang b/tests/preprocessor/if-macro-token-paste.slang new file mode 100644 index 000000000..da6a45fdc --- /dev/null +++ b/tests/preprocessor/if-macro-token-paste.slang @@ -0,0 +1,17 @@ +// if-macro.slang + +//TEST:SIMPLE: + +// Test that a `#if` test can invoke a function-like macro. +// +// Note: this test is a reproducer for a bug reported by a user. + +#define is_valid_TEST 1 +#define isValid(name) (is_valid_##name != 0) +int test() { +#if isValid(TEST) + return 1; +#else + return NO_SUCH_SYMBOL; +#endif +}
\ No newline at end of file |
