summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2012-06-09 16:37:08 -0700
committerCarl Worth <[email protected]>2012-06-26 15:23:55 -0700
commitd8e61f8f86bfb078a35222f95ad4b0b4e6283f53 (patch)
tree01ca8ac701e3350493a0f64ab080f66ed4492040 /src/glsl
parentaac78ce8234d96932c38b3f48b1d828077bc0027 (diff)
glsl: glcpp: Extend testing of #line directives
The most recent commit adds support for comments and macro expansion on #line directives. Add testing to verify the new features. Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glcpp/tests/091-hash-line.c6
-rw-r--r--src/glsl/glcpp/tests/091-hash-line.c.expected6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/091-hash-line.c b/src/glsl/glcpp/tests/091-hash-line.c
index fea35d37b05..26d70382a89 100644
--- a/src/glsl/glcpp/tests/091-hash-line.c
+++ b/src/glsl/glcpp/tests/091-hash-line.c
@@ -6,3 +6,9 @@
#error source 1, line 0 error
#line 30 2
#error source 2, line 30 error
+#line 45 2 /* A line with a comment */
+#define NINETY 90
+#define TWO 2
+#line NINETY TWO /* A #line line with macro expansion */
+#define FUNCTION_LIKE_MACRO(source, line) source line
+#line FUNCTION_LIKE_MACRO(180,2)
diff --git a/src/glsl/glcpp/tests/091-hash-line.c.expected b/src/glsl/glcpp/tests/091-hash-line.c.expected
index ea29149bc62..976d178dfb2 100644
--- a/src/glsl/glcpp/tests/091-hash-line.c.expected
+++ b/src/glsl/glcpp/tests/091-hash-line.c.expected
@@ -11,3 +11,9 @@
#line 30 2
+#line 45 2
+
+
+#line 90 2
+
+#line 180 2