summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2010-08-23 09:26:44 -0700
committerCarl Worth <[email protected]>2010-08-23 10:48:10 -0700
commit2a9e791fdeb45080a98042d41c153ea19c17caae (patch)
tree233a55f1b79779fed9a1e66391547684e41d639c /src/glsl
parentc15f04b326aafc27aa2e508ab88bf209c829abd7 (diff)
glcpp: Add new test for #line directive.
This test exposes two current bugs: 1. The source number is not being correctly emitted in error messages (instead, it's always 0). 2. A directive of "#line 0" is resulting in the following parse error: preprocessor error: Invalid tokens after #
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glcpp/tests/091-hash-line.c8
-rw-r--r--src/glsl/glcpp/tests/091-hash-line.c.expected13
2 files changed, 21 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/091-hash-line.c b/src/glsl/glcpp/tests/091-hash-line.c
new file mode 100644
index 00000000000..fea35d37b05
--- /dev/null
+++ b/src/glsl/glcpp/tests/091-hash-line.c
@@ -0,0 +1,8 @@
+#line 0
+#error line 0 error
+#line 25
+#error line 25 error
+#line 0 1
+#error source 1, line 0 error
+#line 30 2
+#error source 2, line 30 error
diff --git a/src/glsl/glcpp/tests/091-hash-line.c.expected b/src/glsl/glcpp/tests/091-hash-line.c.expected
new file mode 100644
index 00000000000..e663398c160
--- /dev/null
+++ b/src/glsl/glcpp/tests/091-hash-line.c.expected
@@ -0,0 +1,13 @@
+0:0(1): preprocessor error: #error line 0 error
+0:25(1): preprocessor error: #error line 25 error
+1:0(1): preprocessor error: #error source 1, line 0 error
+2:30(1): preprocessor error: #error source 2, line 30 error
+
+
+
+
+
+
+
+
+