diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-01-03 16:44:39 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-04 15:25:42 +0000 |
commit | 2be687af58ec1f445c6380457d136562ef27155e (patch) | |
tree | 7ae0d439b82a7fe75c8d72ee28ab9977d6c17b29 /tests/SkSLErrorTest.cpp | |
parent | 5dfb4e45ef3d2a54093d11594de4ad22418749d6 (diff) |
fix skslc crash when ternary parameter types don't match
BUG=skia:5968
Change-Id: I541c7925ac83e830bd53015961312810042046c5
Reviewed-on: https://skia-review.googlesource.com/6545
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests/SkSLErrorTest.cpp')
-rw-r--r-- | tests/SkSLErrorTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp index 4dd92f3e77..a33e6f16e6 100644 --- a/tests/SkSLErrorTest.cpp +++ b/tests/SkSLErrorTest.cpp @@ -307,6 +307,9 @@ DEF_TEST(SkSLTernaryMismatch, r) { test_failure(r, "void main() { int x = 5 > 2 ? true : 1.0; }", "error: 1: ternary operator result mismatch: 'bool', 'float'\n1 error\n"); + test_failure(r, + "void main() { int x = 5 > 2 ? vec3(1) : 1.0; }", + "error: 1: ternary operator result mismatch: 'vec3', 'float'\n1 error\n"); } DEF_TEST(SkSLInterfaceBlockStorageModifiers, r) { |