[Piglit] [PATCH 02/13] glsl-1.10: Add octal/hex integer literal tests.

Matt Turner mattst88 at gmail.com
Sat Jul 5 23:03:14 PDT 2014


And throw out the glslparsertests.
---
 tests/glslparsertest/shaders/dataType11.frag              | 13 -------------
 tests/glslparsertest/shaders/dataType12.frag              | 13 -------------
 tests/spec/glsl-1.10/compiler/literals/invalid-hex.vert   |  9 +++++++++
 tests/spec/glsl-1.10/compiler/literals/invalid-octal.vert |  9 +++++++++
 tests/spec/glsl-1.10/compiler/literals/valid-hex.vert     |  9 +++++++++
 tests/spec/glsl-1.10/compiler/literals/valid-octal.vert   |  9 +++++++++
 6 files changed, 36 insertions(+), 26 deletions(-)
 delete mode 100644 tests/glslparsertest/shaders/dataType11.frag
 delete mode 100644 tests/glslparsertest/shaders/dataType12.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/literals/invalid-hex.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/literals/invalid-octal.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/literals/valid-hex.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/literals/valid-octal.vert

diff --git a/tests/glslparsertest/shaders/dataType11.frag b/tests/glslparsertest/shaders/dataType11.frag
deleted file mode 100644
index 257b568..0000000
--- a/tests/glslparsertest/shaders/dataType11.frag
+++ /dev/null
@@ -1,13 +0,0 @@
-// [config]
-// expect_result: fail
-// glsl_version: 1.10
-//
-// # NOTE: Config section was auto-generated from file
-// # NOTE: 'glslparser.tests' at git revision
-// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
-// [end config]
-
-void main()
-{
-    int i = 08;  // invalid octal number
-}
diff --git a/tests/glslparsertest/shaders/dataType12.frag b/tests/glslparsertest/shaders/dataType12.frag
deleted file mode 100644
index fb18ad2..0000000
--- a/tests/glslparsertest/shaders/dataType12.frag
+++ /dev/null
@@ -1,13 +0,0 @@
-// [config]
-// expect_result: fail
-// glsl_version: 1.10
-//
-// # NOTE: Config section was auto-generated from file
-// # NOTE: 'glslparser.tests' at git revision
-// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
-// [end config]
-
-void main()
-{
-    int i = 0xa8g;  // invalid hexadecimal number
-}
diff --git a/tests/spec/glsl-1.10/compiler/literals/invalid-hex.vert b/tests/spec/glsl-1.10/compiler/literals/invalid-hex.vert
new file mode 100644
index 0000000..80e2f20
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/literals/invalid-hex.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+void main() {
+	int i = 0xg;
+	gl_Position = vec4(1.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/literals/invalid-octal.vert b/tests/spec/glsl-1.10/compiler/literals/invalid-octal.vert
new file mode 100644
index 0000000..3712ac7
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/literals/invalid-octal.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.10
+// [end config]
+
+void main() {
+	int i = 08;
+	gl_Position = vec4(1.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/literals/valid-hex.vert b/tests/spec/glsl-1.10/compiler/literals/valid-hex.vert
new file mode 100644
index 0000000..ec30dba
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/literals/valid-hex.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// [end config]
+
+void main() {
+	ivec4 i = ivec4(0xf, 0Xa, 0xB, 0XC);
+	gl_Position = vec4(1.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/literals/valid-octal.vert b/tests/spec/glsl-1.10/compiler/literals/valid-octal.vert
new file mode 100644
index 0000000..f862486
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/literals/valid-octal.vert
@@ -0,0 +1,9 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// [end config]
+
+void main() {
+	ivec4 i = ivec4(07, 00, 01, 04);
+	gl_Position = vec4(1.0);
+}
-- 
1.8.3.2



More information about the Piglit mailing list