[Mesa-dev] [PATCH 02/10] glcpp: Add test for #line with a string filename

Carl Worth cworth at cworth.org
Sat Dec 8 13:43:37 PST 2012


For which we just added support to the preprocessor.
---
 src/glsl/glcpp/tests/117-hash-line-with-filename.c          |    3 +++
 src/glsl/glcpp/tests/117-hash-line-with-filename.c.expected |    5 +++++
 2 files changed, 8 insertions(+)
 create mode 100644 src/glsl/glcpp/tests/117-hash-line-with-filename.c
 create mode 100644 src/glsl/glcpp/tests/117-hash-line-with-filename.c.expected

diff --git a/src/glsl/glcpp/tests/117-hash-line-with-filename.c b/src/glsl/glcpp/tests/117-hash-line-with-filename.c
new file mode 100644
index 0000000..6c2bdc3
--- /dev/null
+++ b/src/glsl/glcpp/tests/117-hash-line-with-filename.c
@@ -0,0 +1,3 @@
+#line 1 "some-file.c"
+__FILE__
+#error should list some-file.c in the error
diff --git a/src/glsl/glcpp/tests/117-hash-line-with-filename.c.expected b/src/glsl/glcpp/tests/117-hash-line-with-filename.c.expected
new file mode 100644
index 0000000..b0578e2
--- /dev/null
+++ b/src/glsl/glcpp/tests/117-hash-line-with-filename.c.expected
@@ -0,0 +1,5 @@
+some-file.c:2(1): preprocessor error: #error should list some-file.c in the error
+#line 1 "some-file.c"
+some-file.c
+
+
-- 
1.7.10



More information about the mesa-dev mailing list