aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-09 17:04:23 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 17:04:41 +0000
commit49a36ba6234168ef3b591f55810c22bf0fe1c2e4 (patch)
tree60b2b43588f9b100adc9574bbb3c56e633dc61b7 /tests
parent90e3cd78991ef337dbd0023efb30ece864694308 (diff)
Revert "skslc type constructor cleanups"
This reverts commit 6f223283661c1ddc4a5334d2464804c6b6ba3ffa. Reason for revert: bot breakage Original change's description: > skslc type constructor cleanups > > BUG=skia: > > Change-Id: I87108b5e107419d99c996ef032eda512a68451ab > Reviewed-on: https://skia-review.googlesource.com/8117 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I1c9a8c4c62c7dd0f724f22000507112641d25e3b Reviewed-on: https://skia-review.googlesource.com/8259 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/SkSLErrorTest.cpp5
-rw-r--r--tests/SkSLGLSLTest.cpp20
2 files changed, 13 insertions, 12 deletions
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index 9c34ab41fb..a33e6f16e6 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -134,10 +134,7 @@ 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_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");
+ test_success(r, "void main() { vec3 x = vec3(1.0, 2.0, 3.0, 4.0); }");
}
DEF_TEST(SkSLSwizzleScalar, r) {
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp
index e1f5eb6c93..671f6d849b 100644
--- a/tests/SkSLGLSLTest.cpp
+++ b/tests/SkSLGLSLTest.cpp
@@ -373,20 +373,24 @@ DEF_TEST(SkSLVectorConstructors, r) {
"vec2 v1 = vec2(1);"
"vec2 v2 = vec2(1, 2);"
"vec2 v3 = vec2(vec2(1));"
- "vec3 v4 = vec3(vec2(1), 1.0);"
- "ivec2 v5 = ivec2(1);"
- "ivec2 v6 = ivec2(vec2(1, 2));"
- "vec2 v7 = vec2(ivec2(1, 2));",
+ "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));",
*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"
- "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");
+ "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");
}
DEF_TEST(SkSLArrayConstructors, r) {