Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 2102223002: ExitDetector: Examine continue when determining a 'do' (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressing Feedback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index f9c4c8bf96e37fbd8ca616b3b22884d0303c8043..a8037251ea84f182131717a17dac316638aef51b 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -3487,6 +3487,18 @@ class ExitDetectorTest extends ParserTestCase {
_assertTrue("{ do {} while (throw ''); }");
}
+ void test_doStatement_break_and_throw() {
+ _assertFalse("{ do { if (1==1) break; throw 'T'; } while (0==1); }");
+ }
+
+ void test_doStatement_continue_and_throw() {
+ _assertFalse("{ do { if (1==1) continue; throw 'T'; } while (0==1); }");
+ }
+
+ void test_doStatement_continueInSwitch_and_throw() {
+ _assertFalse("{ do { switch (1) { case 0: continue; } throw 'T'; } while (0==1); }");
+ }
+
void test_doStatement_true_break() {
_assertFalse("{ do { break; } while (true); }");
}
« pkg/analyzer/lib/src/generated/resolver.dart ('K') | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698