From 3fbdac28d55fa765d111ef311761eb145188c142 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 5 Aug 2014 16:33:05 -0700 Subject: [PATCH] glcpp: Remove illegal characters from tests Some of the existing tests were using '@' and '"' incidentally within the test body. Neither of these characters are actually legal for GLSL. And since we are planning to start generating errors for illegal characters, we need to first make the test suite clean. Reviewed-by: Kenneth Graunke --- src/compiler/glsl/glcpp/tests/082-invalid-paste.c | 2 +- src/compiler/glsl/glcpp/tests/082-invalid-paste.c.expected | 2 +- src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c | 2 +- .../glsl/glcpp/tests/113-line-and-file-macros.c.expected | 2 +- src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c | 2 +- .../glsl/glcpp/tests/114-paste-integer-tokens.c.expected | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/glcpp/tests/082-invalid-paste.c b/src/compiler/glsl/glcpp/tests/082-invalid-paste.c index 8b84d50c3a0..84c4b4d664e 100644 --- a/src/compiler/glsl/glcpp/tests/082-invalid-paste.c +++ b/src/compiler/glsl/glcpp/tests/082-invalid-paste.c @@ -2,6 +2,6 @@ PASTE(<,>) PASTE(0,abc) PASTE(1,=) -PASTE(2,@) +PASTE(2,~) PASTE(3,-4) PASTE(4,+5.2) diff --git a/src/compiler/glsl/glcpp/tests/082-invalid-paste.c.expected b/src/compiler/glsl/glcpp/tests/082-invalid-paste.c.expected index b48a2d6d296..57941457307 100644 --- a/src/compiler/glsl/glcpp/tests/082-invalid-paste.c.expected +++ b/src/compiler/glsl/glcpp/tests/082-invalid-paste.c.expected @@ -5,7 +5,7 @@ Pasting "0" and "abc" does not give a valid preprocessing token. 0:4(7): preprocessor error: Pasting "1" and "=" does not give a valid preprocessing token. 0:5(7): preprocessor error: -Pasting "2" and "@" does not give a valid preprocessing token. +Pasting "2" and "~" does not give a valid preprocessing token. 0:6(7): preprocessor error: Pasting "3" and "-" does not give a valid preprocessing token. 0:7(7): preprocessor error: diff --git a/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c b/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c index 369c4879260..55b8c4e1723 100644 --- a/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c +++ b/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c @@ -1,7 +1,7 @@ 1. Number of dalmations: __LINE__ __FILE__ __LINE__ 2. Nominal visual acuity: __LINE__ __FILE__ / __LINE__ __FILE__ 3. Battle of Thermopylae, as film: __LINE__ __FILE__ __FILE__ -4. HTTP code for "Not Found": __LINE__ __FILE__ __LINE__ +4. HTTP code for Not Found: __LINE__ __FILE__ __LINE__ 5. Hexadecimal for 20560: __LINE__ __FILE__ __LINE__ __FILE__ 6: Zip code for Nortonville, KS: __LINE__ __LINE__ __FILE__ __LINE__ __FILE__ 7. James Bond, as a number: __FILE__ __FILE__ __LINE__ diff --git a/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c.expected b/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c.expected index 55bc788ffd7..53f0eb9ebf8 100644 --- a/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c.expected +++ b/src/compiler/glsl/glcpp/tests/113-line-and-file-macros.c.expected @@ -1,7 +1,7 @@ 1. Number of dalmations: 1 0 1 2. Nominal visual acuity: 2 0 / 2 0 3. Battle of Thermopylae, as film: 3 0 0 -4. HTTP code for "Not Found": 4 0 4 +4. HTTP code for Not Found: 4 0 4 5. Hexadecimal for 20560: 5 0 5 0 6: Zip code for Nortonville, KS: 6 6 0 6 0 7. James Bond, as a number: 0 0 7 diff --git a/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c b/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c index d80d9c7ef4b..b86132e098e 100644 --- a/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c +++ b/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c @@ -1,7 +1,7 @@ #define PASTE3(a,b,c) a ## b ## c #define PASTE4(a,b,c,d) a ## b ## c ## d #define PASTE5(a,b,c,d,e) a ## b ## c ## d ## e -4. HTTP code for "Not Found": PASTE3(__LINE__, __FILE__ , __LINE__) +4. HTTP code for Not Found: PASTE3(__LINE__, __FILE__ , __LINE__) 5. Hexadecimal for 20560: PASTE4(__LINE__, __FILE__, __LINE__, __FILE__) 6: Zip code for Nortonville, KS: PASTE5(__LINE__, __LINE__, __FILE__, __LINE__, __FILE__) 7. James Bond, as a number: PASTE3(__FILE__, __FILE__, __LINE__) diff --git a/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c.expected b/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c.expected index aa9711034a6..5bc14befa67 100644 --- a/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c.expected +++ b/src/compiler/glsl/glcpp/tests/114-paste-integer-tokens.c.expected @@ -1,7 +1,7 @@ -4. HTTP code for "Not Found": 404 +4. HTTP code for Not Found: 404 5. Hexadecimal for 20560: 5050 6: Zip code for Nortonville, KS: 66060 7. James Bond, as a number: 007 -- 2.30.2