fixed skslc's handling of ivec(vec)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4222
Change-Id: I9b32067af51f3a04efa702cf2eb1ac1ed480df6a
Reviewed-on: https://skia-review.googlesource.com/4222
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index 3afb64f..9e89b71 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -94,6 +94,12 @@
"void main() { vec2 x = vec2(1.0, false); }",
"error: 1: expected 'float', but found 'bool'\n1 error\n");
test_failure(r,
+ "void main() { vec2 x = vec2(bvec2(false)); }",
+ "error: 1: 'bvec2' is not a valid parameter to 'vec2' constructor\n1 error\n");
+ test_failure(r,
+ "void main() { bvec2 x = bvec2(vec2(1)); }",
+ "error: 1: 'vec2' is not a valid parameter to 'bvec2' constructor\n1 error\n");
+ test_failure(r,
"void main() { bool x = bool(1.0); }",
"error: 1: cannot construct 'bool'\n1 error\n");
test_failure(r,