Chromium Code Reviews| Index: tests/SkSLErrorTest.cpp |
| diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp |
| index d9109483b250014a4f7cbe53d15bcfe72eee8877..53dc7b18eb5caeb4584ee7cc0ce7c86d3c7434d0 100644 |
| --- a/tests/SkSLErrorTest.cpp |
| +++ b/tests/SkSLErrorTest.cpp |
| @@ -139,10 +139,17 @@ DEF_TEST(SkSLSwizzleDuplicateOutput, r) { |
| "void main() { vec4 test = vec4(1); test.xyyz = vec4(1); }", |
| "error: 1: cannot write to the same swizzle field more than once\n1 error\n"); |
| } |
| + |
| DEF_TEST(SkSLAssignmentTypeMismatch, r) { |
| test_failure(r, |
| "void main() { int x = 1.0; }", |
| "error: 1: expected 'int', but found 'float'\n1 error\n"); |
| + test_failure(r, |
| + "void main() { int x; x = 1.0; }", |
| + "error: 1: type mismatch: '=' cannot operate on 'int', 'float'\n1 error\n"); |
| + test_failure(r, |
| + "void main() { ivec3 x = ivec3(0); x *= 1.0; }", |
|
dogben
2016/10/17 17:27:57
Would this be OK if it were vec instead of ivec? M
|
| + "error: 1: type mismatch: '*=' cannot operate on 'ivec3', 'float'\n1 error\n"); |
| } |
| DEF_TEST(SkSLReturnFromVoid, r) { |