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

Submitted by Carl Worth on Jan. 29, 2014, 1:56 a.m.

Details

Message ID 1390960563-15334-2-git-send-email-cworth@cworth.org
State New
Headers show

Not browsing as part of any series.

Commit Message

Carl Worth Jan. 29, 2014, 1:56 a.m.
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

Patch hide | download patch | download mbox

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
+