summaryrefslogtreecommitdiff
path: root/tests/preprocessor/elif-eval.slang
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-07-31 15:40:29 -0400
committerGitHub <noreply@github.com>2023-07-31 15:40:29 -0400
commit5349241098076bead63f638daf2e4b9a9cb3e496 (patch)
treec3b1ea606d5ce41866e36b3df6ebb3c49265b406 /tests/preprocessor/elif-eval.slang
parent8bfdc39259d0a401a33d3be69b22c8dd9b576683 (diff)
Fix for #elif evaluation issue (#3038)
* A more way robust way to handle resource consumption might use multiple `kind`s on GLSL emit. * Improve method naming and some comments. * Small consistency fix. * Fix issue with #elif evaluation. * Add a test.
Diffstat (limited to 'tests/preprocessor/elif-eval.slang')
-rw-r--r--tests/preprocessor/elif-eval.slang9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/preprocessor/elif-eval.slang b/tests/preprocessor/elif-eval.slang
new file mode 100644
index 000000000..912f70fd2
--- /dev/null
+++ b/tests/preprocessor/elif-eval.slang
@@ -0,0 +1,9 @@
+//TEST:SIMPLE:
+
+#ifndef SOME_MACRO
+# error Not this one!
+// The expression after #elif shouldn't be evaluated, because #ifndef evaluated as true
+#elif SOME_OTHER_MACRO
+#else
+#error This isn't valid!
+#endif