From 49a36ba6234168ef3b591f55810c22bf0fe1c2e4 Mon Sep 17 00:00:00 2001 From: Ethan Nicholas Date: Thu, 9 Feb 2017 17:04:23 +0000 Subject: 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 > Commit-Queue: Ethan Nicholas > Reviewed-by: Greg Daniel > 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 Reviewed-by: Ethan Nicholas --- tests/SkSLErrorTest.cpp | 5 +---- tests/SkSLGLSLTest.cpp | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'tests') 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) { -- cgit v1.2.3