summaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-07-05 18:42:02 -0700
committerMatt Turner <mattst88@gmail.com>2014-07-06 18:20:38 -0700
commit826c24c7b8a24c6b3d4926aceddc09b50767919f (patch)
tree230883df6e326e712037f1aaf040cc4d577ee033 /tests/spec
parent251579be30f3d82e1bdfde236bdc883e1eac5362 (diff)
glsl-1.10: Add octal/hex integer literal tests.
And throw out the glslparsertests. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/glsl-1.10/compiler/literals/invalid-hex.vert9
-rw-r--r--tests/spec/glsl-1.10/compiler/literals/invalid-octal.vert9
-rw-r--r--tests/spec/glsl-1.10/compiler/literals/valid-hex.vert9
-rw-r--r--tests/spec/glsl-1.10/compiler/literals/valid-octal.vert9
4 files changed, 36 insertions, 0 deletions
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 000000000..80e2f202c
--- /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 000000000..3712ac77c
--- /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 000000000..ec30dbaf0
--- /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 000000000..f8624866c
--- /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);
+}