summaryrefslogtreecommitdiff
path: root/tests/preprocessor
diff options
context:
space:
mode:
authorTim Foley <tim.foley.is@gmail.com>2017-08-10 15:25:04 -0700
committerGitHub <noreply@github.com>2017-08-10 15:25:04 -0700
commitdb4079f7e3635a6a61b8725643b1d7ecf68b97d8 (patch)
tree224c16ad374c5ed533a497beeb75753e7ce2d771 /tests/preprocessor
parent6e4830f4d74adef0a47c6503d84dc114240fafa3 (diff)
parenta5a436c4783fb75a0d089a6483219c06db91f593 (diff)
Merge pull request #156 from tfoleyNV/source-file-cleanup
Make source location lightweight
Diffstat (limited to 'tests/preprocessor')
-rw-r--r--tests/preprocessor/line.slang19
-rw-r--r--tests/preprocessor/line.slang.expected11
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/preprocessor/line.slang b/tests/preprocessor/line.slang
new file mode 100644
index 000000000..7babcae82
--- /dev/null
+++ b/tests/preprocessor/line.slang
@@ -0,0 +1,19 @@
+//TEST:SIMPLE:
+// #line support
+
+FooA a() { return 0; }
+
+#line 99 "b.slang"
+FooB b() { return 0; }
+
+#line default
+FooC c() { return 0; }
+
+#line 603 "d.slang"
+FooD d() { return 0; }
+
+#line 40
+FooE e() { return 0; }
+
+#line
+FooF f() { return 0; }
diff --git a/tests/preprocessor/line.slang.expected b/tests/preprocessor/line.slang.expected
new file mode 100644
index 000000000..8c7f72ada
--- /dev/null
+++ b/tests/preprocessor/line.slang.expected
@@ -0,0 +1,11 @@
+result code = -1
+standard error = {
+tests/preprocessor/line.slang(4): error 30015: undefined identifier 'FooA'.
+b.slang(99): error 30015: undefined identifier 'FooB'.
+tests/preprocessor/line.slang(10): error 30015: undefined identifier 'FooC'.
+d.slang(603): error 30015: undefined identifier 'FooD'.
+d.slang(40): error 30015: undefined identifier 'FooE'.
+tests/preprocessor/line.slang(19): error 30015: undefined identifier 'FooF'.
+}
+standard output = {
+}