summaryrefslogtreecommitdiff
path: root/tests/preprocessor/import.slang.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/preprocessor/import.slang.h')
-rw-r--r--tests/preprocessor/import.slang.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/preprocessor/import.slang.h b/tests/preprocessor/import.slang.h
new file mode 100644
index 000000000..a97a199f0
--- /dev/null
+++ b/tests/preprocessor/import.slang.h
@@ -0,0 +1,12 @@
+// Confirm that `#import` interacts with preprocessor as expected
+
+// We add a guard to ensure that this file isn't imported more than once
+#ifdef BAR
+#error File imported more than one!
+#endif
+
+// Here we use a macro from the parent file
+FOO f( FOO y ) { return y; }
+
+// Here is a macro that flows from child to parent
+#define BAR float