aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-09 13:57:14 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 20:26:39 +0000
commit84645e3c679581d191406b2d7ab93c3f6c5e3a63 (patch)
tree7f8bd7445db4dbffa52e16ae78bb488ba483e2ce /tests
parent99dbe7b2c4996c094a440f512e9f7eb9c2708884 (diff)
re-land of skslc type constructor cleanups
BUG=skia: Change-Id: I953be07e2389dd4a9e7dcce0ddfd7505b309bda1 Reviewed-on: https://skia-review.googlesource.com/8265 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/SkSLErrorTest.cpp5
-rw-r--r--tests/SkSLGLSLTest.cpp20
2 files changed, 12 insertions, 13 deletions
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index a33e6f16e6..9c34ab41fb 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -134,7 +134,10 @@ DEF_TEST(SkSLConstructorArgumentCount, r) {
"void main() { vec3 x = vec3(1.0, 2.0); }",
"error: 1: invalid arguments to 'vec3' constructor (expected 3 scalars, but "
"found 2)\n1 error\n");
- test_success(r, "void main() { vec3 x = vec3(1.0, 2.0, 3.0, 4.0); }");
+ test_failure(r,
+ "void main() { vec3 x = vec3(1.0, 2.0, 3.0, 4.0); }",
+ "error: 1: invalid arguments to 'vec3' constructor (expected 3 scalars, but found "
+ "4)\n1 error\n");
}
DEF_TEST(SkSLSwizzleScalar, r) {
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp
index a0cc7d559e..533c203036 100644
--- a/tests/SkSLGLSLTest.cpp
+++ b/tests/SkSLGLSLTest.cpp
@@ -373,24 +373,20 @@ DEF_TEST(SkSLVectorConstructors, r) {
"vec2 v1 = vec2(1);"
"vec2 v2 = vec2(1, 2);"
"vec2 v3 = vec2(vec2(1));"
- "vec2 v4 = vec2(vec3(1));"
- "vec3 v5 = vec3(vec2(1), 1.0);"
- "vec3 v6 = vec3(vec4(1, 2, 3, 4));"
- "ivec2 v7 = ivec2(1);"
- "ivec2 v8 = ivec2(vec2(1, 2));"
- "vec2 v9 = vec2(ivec2(1, 2));",
+ "vec3 v4 = vec3(vec2(1), 1.0);"
+ "ivec2 v5 = ivec2(1);"
+ "ivec2 v6 = ivec2(vec2(1, 2));"
+ "vec2 v7 = vec2(ivec2(1, 2));",
*SkSL::ShaderCapsFactory::Default(),
"#version 400\n"
"out vec4 sk_FragColor;\n"
"vec2 v1 = vec2(1.0);\n"
"vec2 v2 = vec2(1.0, 2.0);\n"
"vec2 v3 = vec2(1.0);\n"
- "vec2 v4 = vec2(vec3(1.0));\n"
- "vec3 v5 = vec3(vec2(1.0), 1.0);\n"
- "vec3 v6 = vec3(vec4(1.0, 2.0, 3.0, 4.0));\n"
- "ivec2 v7 = ivec2(1);\n"
- "ivec2 v8 = ivec2(vec2(1.0, 2.0));\n"
- "vec2 v9 = vec2(ivec2(1, 2));\n");
+ "vec3 v4 = vec3(vec2(1.0), 1.0);\n"
+ "ivec2 v5 = ivec2(1);\n"
+ "ivec2 v6 = ivec2(vec2(1.0, 2.0));\n"
+ "vec2 v7 = vec2(ivec2(1, 2));\n");
}
DEF_TEST(SkSLArrayConstructors, r) {