summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/glcpp/tests')
-rw-r--r--src/glsl/glcpp/tests/000-content-with-spaces.c.expected2
-rw-r--r--src/glsl/glcpp/tests/090-hash-error.c.expected1
-rw-r--r--src/glsl/glcpp/tests/091-hash-line.c.expected4
-rw-r--r--src/glsl/glcpp/tests/100-macro-with-colon.c.expected4
-rw-r--r--src/glsl/glcpp/tests/108-no-space-after-hash-version.c.expected2
-rw-r--r--src/glsl/glcpp/tests/109-no-space-after-hash-line.c.expected2
-rw-r--r--src/glsl/glcpp/tests/110-no-space-digits-after-hash-elif.c.expected2
-rw-r--r--src/glsl/glcpp/tests/121-comment-bug-72686.c.expected2
-rw-r--r--src/glsl/glcpp/tests/128-space-before-hash.c.expected4
-rw-r--r--src/glsl/glcpp/tests/130-define-comment.c.expected2
-rw-r--r--src/glsl/glcpp/tests/132-eof-without-newline-define.c.expected4
-rw-r--r--src/glsl/glcpp/tests/134-hash-comment-directive.c22
-rw-r--r--src/glsl/glcpp/tests/134-hash-comment-directive.c.expected22
13 files changed, 56 insertions, 17 deletions
diff --git a/src/glsl/glcpp/tests/000-content-with-spaces.c.expected b/src/glsl/glcpp/tests/000-content-with-spaces.c.expected
index f49870f7aa7..00791910ed5 100644
--- a/src/glsl/glcpp/tests/000-content-with-spaces.c.expected
+++ b/src/glsl/glcpp/tests/000-content-with-spaces.c.expected
@@ -1 +1 @@
- this is four tokens with spaces
+ this is four tokens with spaces
diff --git a/src/glsl/glcpp/tests/090-hash-error.c.expected b/src/glsl/glcpp/tests/090-hash-error.c.expected
index 32954f7380e..876a6ea9cc5 100644
--- a/src/glsl/glcpp/tests/090-hash-error.c.expected
+++ b/src/glsl/glcpp/tests/090-hash-error.c.expected
@@ -1,2 +1 @@
0:1(1): preprocessor error: #error human error
-
diff --git a/src/glsl/glcpp/tests/091-hash-line.c.expected b/src/glsl/glcpp/tests/091-hash-line.c.expected
index d6831da384e..ac9ab252f1e 100644
--- a/src/glsl/glcpp/tests/091-hash-line.c.expected
+++ b/src/glsl/glcpp/tests/091-hash-line.c.expected
@@ -3,13 +3,9 @@
1:0(1): preprocessor error: #error source 1, line 0 error
2:30(1): preprocessor error: #error source 2, line 30 error
#line 0
-
#line 25
-
#line 0 1
-
#line 30 2
-
#line 45 2
diff --git a/src/glsl/glcpp/tests/100-macro-with-colon.c.expected b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
index b4360784ee0..09f1f417bdd 100644
--- a/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
+++ b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
@@ -2,6 +2,6 @@
switch (1) {
- case 1 + 2:
- break;
+ case 1 + 2:
+ break;
}
diff --git a/src/glsl/glcpp/tests/108-no-space-after-hash-version.c.expected b/src/glsl/glcpp/tests/108-no-space-after-hash-version.c.expected
index 462166c9801..4f4243f947f 100644
--- a/src/glsl/glcpp/tests/108-no-space-after-hash-version.c.expected
+++ b/src/glsl/glcpp/tests/108-no-space-after-hash-version.c.expected
@@ -1 +1 @@
-0:1(2): preprocessor error: Invalid tokens after #
+0:1(1): preprocessor error: Illegal non-directive after #
diff --git a/src/glsl/glcpp/tests/109-no-space-after-hash-line.c.expected b/src/glsl/glcpp/tests/109-no-space-after-hash-line.c.expected
index 462166c9801..4f4243f947f 100644
--- a/src/glsl/glcpp/tests/109-no-space-after-hash-line.c.expected
+++ b/src/glsl/glcpp/tests/109-no-space-after-hash-line.c.expected
@@ -1 +1 @@
-0:1(2): preprocessor error: Invalid tokens after #
+0:1(1): preprocessor error: Illegal non-directive after #
diff --git a/src/glsl/glcpp/tests/110-no-space-digits-after-hash-elif.c.expected b/src/glsl/glcpp/tests/110-no-space-digits-after-hash-elif.c.expected
index 847437c9111..4d93de41dd3 100644
--- a/src/glsl/glcpp/tests/110-no-space-digits-after-hash-elif.c.expected
+++ b/src/glsl/glcpp/tests/110-no-space-digits-after-hash-elif.c.expected
@@ -1,3 +1,3 @@
-0:2(2): preprocessor error: Invalid tokens after #
+0:2(1): preprocessor error: Illegal non-directive after #
diff --git a/src/glsl/glcpp/tests/121-comment-bug-72686.c.expected b/src/glsl/glcpp/tests/121-comment-bug-72686.c.expected
index 5c484c2fe59..8cb7cb9891f 100644
--- a/src/glsl/glcpp/tests/121-comment-bug-72686.c.expected
+++ b/src/glsl/glcpp/tests/121-comment-bug-72686.c.expected
@@ -1,2 +1,2 @@
-
+
diff --git a/src/glsl/glcpp/tests/128-space-before-hash.c.expected b/src/glsl/glcpp/tests/128-space-before-hash.c.expected
index 5d44f4161eb..9babb6fb078 100644
--- a/src/glsl/glcpp/tests/128-space-before-hash.c.expected
+++ b/src/glsl/glcpp/tests/128-space-before-hash.c.expected
@@ -1,6 +1,6 @@
-
+
#version 300
- #pragma Testing spaces before hash
+#pragma Testing spaces before hash
#line 3
diff --git a/src/glsl/glcpp/tests/130-define-comment.c.expected b/src/glsl/glcpp/tests/130-define-comment.c.expected
index 43d399cafe4..d789e29d5a8 100644
--- a/src/glsl/glcpp/tests/130-define-comment.c.expected
+++ b/src/glsl/glcpp/tests/130-define-comment.c.expected
@@ -1,2 +1,2 @@
-FOO( bar )
+FOO( bar )
diff --git a/src/glsl/glcpp/tests/132-eof-without-newline-define.c.expected b/src/glsl/glcpp/tests/132-eof-without-newline-define.c.expected
index 57dee695714..a3ace0f3966 100644
--- a/src/glsl/glcpp/tests/132-eof-without-newline-define.c.expected
+++ b/src/glsl/glcpp/tests/132-eof-without-newline-define.c.expected
@@ -1,2 +1,2 @@
-0:1(1): preprocessor error: #define without macro name
-0:1(1): preprocessor error: syntax error, unexpected NEWLINE, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
+0:1(2): preprocessor error: #define without macro name
+0:1(2): preprocessor error: syntax error, unexpected NEWLINE, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
diff --git a/src/glsl/glcpp/tests/134-hash-comment-directive.c b/src/glsl/glcpp/tests/134-hash-comment-directive.c
new file mode 100644
index 00000000000..3015f0e886e
--- /dev/null
+++ b/src/glsl/glcpp/tests/134-hash-comment-directive.c
@@ -0,0 +1,22 @@
+/*...*/ # /*...*/ version 300
+ /*...*/#/*...*/ extension whatever
+ /*..*/ # /*..*/ pragma ignored
+/**/ # /**/ line 4
+ /*...*/# /*...*/ ifdef NOT_DEFINED
+ /*...*/# /*...*/ else
+ /*..*/ #/*..*/ endif
+ /*...*/# /*...*/ ifndef ALSO_NOT_DEFINED
+ /*...*/# /*...*/ else
+ /*..*/ #/*..*/ endif
+/*...*/ # /*...*/ if 0
+ /*...*/#/*...*/ elif 1
+ /*..*/ # /*..*/ else
+ /**/ # /**/ endif
+ /*...*/# /*...*/ define FOO bar
+ /*..*/ #/*..*/ define FUNC() baz
+ /*..*/ # /*..*/ define FUNC2(a,b) b a
+FOO
+FUNC()
+FUNC2(x,y)
+
+
diff --git a/src/glsl/glcpp/tests/134-hash-comment-directive.c.expected b/src/glsl/glcpp/tests/134-hash-comment-directive.c.expected
new file mode 100644
index 00000000000..760c960cb62
--- /dev/null
+++ b/src/glsl/glcpp/tests/134-hash-comment-directive.c.expected
@@ -0,0 +1,22 @@
+#version 300
+#extension whatever
+#pragma ignored
+#line 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+bar
+baz
+y x
+
+