[Mesa-dev] [PATCH 2/2] glcpp: Add testing for #line with integer expression.

Carl Worth cworth at cworth.org
Tue Jan 28 17:56:03 PST 2014


This was enabled in the previous commit. Now add a test for "make check"
to ensure it works.
---
 src/glsl/glcpp/tests/120-hash-line-expression.c          | 8 ++++++++
 src/glsl/glcpp/tests/120-hash-line-expression.c.expected | 9 +++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 src/glsl/glcpp/tests/120-hash-line-expression.c
 create mode 100644 src/glsl/glcpp/tests/120-hash-line-expression.c.expected

diff --git a/src/glsl/glcpp/tests/120-hash-line-expression.c b/src/glsl/glcpp/tests/120-hash-line-expression.c
new file mode 100644
index 0000000..eb159a5
--- /dev/null
+++ b/src/glsl/glcpp/tests/120-hash-line-expression.c
@@ -0,0 +1,8 @@
+#line 1
+__LINE__
+#line (2)
+__LINE__
+#line (1+2)
+__LINE__
+#line +4
+__LINE__
diff --git a/src/glsl/glcpp/tests/120-hash-line-expression.c.expected b/src/glsl/glcpp/tests/120-hash-line-expression.c.expected
new file mode 100644
index 0000000..5357d6c
--- /dev/null
+++ b/src/glsl/glcpp/tests/120-hash-line-expression.c.expected
@@ -0,0 +1,9 @@
+#line 1
+1
+#line 2
+2
+#line 3
+3
+#line 4
+4
+
-- 
1.8.5.2



More information about the mesa-dev mailing list