aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkSLErrorTest.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-23 16:18:54 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-23 16:20:10 +0000
commit7d975fc200bbbea991ec4c04c08f3a5ea7b847af (patch)
tree813ff12f25afc903a65880be187ef88162fad866 /tests/SkSLErrorTest.cpp
parentd196cbe9c270799a6edb6e110ab647c5a4a850a2 (diff)
Revert "skslc switch support"
This reverts commit 2b1e468dabd2ac7bea7ec17740275f4f4aad30c3. Reason for revert: bot breakage Original change's description: > skslc switch support > > BUG=skia: > > Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25 > Reviewed-on: https://skia-review.googlesource.com/8771 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > TBR=benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Iaaa35d10a15704279c6883d4d68f6d4ad5078320 Reviewed-on: https://skia-review.googlesource.com/8792 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests/SkSLErrorTest.cpp')
-rw-r--r--tests/SkSLErrorTest.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index bde5e70795..301281c28e 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -337,10 +337,6 @@ DEF_TEST(SkSLUseWithoutInitialize, r) {
test_failure(r,
"void main() { bool x; if (true && (false || x)) return; }",
"error: 1: 'x' has not been assigned\n1 error\n");
- test_failure(r,
- "void main() { int x; switch (3) { case 0: x = 0; case 1: x = 1; }"
- "sk_FragColor = vec4(x); }",
- "error: 1: 'x' has not been assigned\n1 error\n");
}
DEF_TEST(SkSLUnreachable, r) {
@@ -370,16 +366,13 @@ DEF_TEST(SkSLNoReturn, r) {
DEF_TEST(SkSLBreakOutsideLoop, r) {
test_failure(r,
"void foo() { while(true) {} if (true) break; }",
- "error: 1: break statement must be inside a loop or switch\n1 error\n");
+ "error: 1: break statement must be inside a loop\n1 error\n");
}
DEF_TEST(SkSLContinueOutsideLoop, r) {
test_failure(r,
"void foo() { for(;;); continue; }",
"error: 1: continue statement must be inside a loop\n1 error\n");
- test_failure(r,
- "void foo() { switch (1) { default: continue; } }",
- "error: 1: continue statement must be inside a loop\n1 error\n");
}
DEF_TEST(SkSLStaticIfError, r) {
@@ -437,25 +430,4 @@ DEF_TEST(SkSLUnsupportedGLSLIdentifiers, r) {
"error: 1: unknown identifier 'gl_FragColor'\n1 error\n");
}
-DEF_TEST(SkSLWrongSwitchTypes, r) {
- test_failure(r,
- "void main() { switch (vec2(1)) { case 1: break; } }",
- "error: 1: expected 'int', but found 'vec2'\n1 error\n");
- test_failure(r,
- "void main() { switch (1) { case vec2(1): break; } }",
- "error: 1: expected 'int', but found 'vec2'\n1 error\n");
-}
-
-DEF_TEST(SkSLNonConstantCase, r) {
- test_failure(r,
- "void main() { int x = 1; switch (1) { case x: break; } }",
- "error: 1: case value must be a constant\n1 error\n");
-}
-
-DEF_TEST(SkSLDuplicateCase, r) {
- test_failure(r,
- "void main() { switch (1) { case 0: case 1: case 0: break; } }",
- "error: 1: duplicate case value\n1 error\n");
-}
-
#endif