From 23463004dfbcaf8e0bbf28d405c69b45bca8d9c8 Mon Sep 17 00:00:00 2001 From: Ethan Nicholas Date: Wed, 28 Mar 2018 15:16:15 -0400 Subject: fixed type mismatches in SkSL comparison operators Bug: skia: Change-Id: I8f05088c561a80549264f7a65cb8161bbe7d8f4c Reviewed-on: https://skia-review.googlesource.com/116982 Reviewed-by: Chris Dalton Commit-Queue: Ethan Nicholas --- tests/SkSLErrorTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/SkSLErrorTest.cpp') diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp index 9c43ac5197..c24a25d832 100644 --- a/tests/SkSLErrorTest.cpp +++ b/tests/SkSLErrorTest.cpp @@ -245,6 +245,12 @@ DEF_TEST(SkSLBinaryTypeMismatch, r) { test_failure(r, "void main() { bool x = 1 || 2.0; }", "error: 1: type mismatch: '||' cannot operate on 'int', 'float'\n1 error\n"); + test_failure(r, + "void main() { bool x = float2(0) == 0; }", + "error: 1: type mismatch: '==' cannot operate on 'float2', 'int'\n1 error\n"); + test_failure(r, + "void main() { bool x = float2(0) != 0; }", + "error: 1: type mismatch: '!=' cannot operate on 'float2', 'int'\n1 error\n"); } DEF_TEST(SkSLCallNonFunction, r) { -- cgit v1.2.3