glsl: glcpp: Extend testing of #line directives
authorCarl Worth <cworth@cworth.org>
Sat, 9 Jun 2012 23:37:08 +0000 (16:37 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 26 Jun 2012 22:23:55 +0000 (15:23 -0700)
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 <cworth@cworth.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/glcpp/tests/091-hash-line.c
src/glsl/glcpp/tests/091-hash-line.c.expected

index fea35d3..26d7038 100644 (file)
@@ -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)