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

Side by Side 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, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.generated.all_the_rest_test; 5 library analyzer.test.generated.all_the_rest_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 } 3480 }
3481 3481
3482 void test_doStatement_return() { 3482 void test_doStatement_return() {
3483 _assertTrue("{ do { return null; } while (1 == 2); }"); 3483 _assertTrue("{ do { return null; } while (1 == 2); }");
3484 } 3484 }
3485 3485
3486 void test_doStatement_throwCondition() { 3486 void test_doStatement_throwCondition() {
3487 _assertTrue("{ do {} while (throw ''); }"); 3487 _assertTrue("{ do {} while (throw ''); }");
3488 } 3488 }
3489 3489
3490 void test_doStatement_break_and_throw() {
3491 _assertFalse("{ do { if (1==1) break; throw 'T'; } while (0==1); }");
3492 }
3493
3494 void test_doStatement_continue_and_throw() {
3495 _assertFalse("{ do { if (1==1) continue; throw 'T'; } while (0==1); }");
3496 }
3497
3498 void test_doStatement_continueInSwitch_and_throw() {
3499 _assertFalse("{ do { switch (1) { case 0: continue; } throw 'T'; } while (0= =1); }");
3500 }
3501
3490 void test_doStatement_true_break() { 3502 void test_doStatement_true_break() {
3491 _assertFalse("{ do { break; } while (true); }"); 3503 _assertFalse("{ do { break; } while (true); }");
3492 } 3504 }
3493 3505
3494 void test_doStatement_true_continue() { 3506 void test_doStatement_true_continue() {
3495 _assertTrue("{ do { continue; } while (true); }"); 3507 _assertTrue("{ do { continue; } while (true); }");
3496 } 3508 }
3497 3509
3498 void test_doStatement_true_if_return() { 3510 void test_doStatement_true_if_return() {
3499 _assertTrue("{ do { if (true) {return null;} } while (true); }"); 3511 _assertTrue("{ do { if (true) {return null;} } while (true); }");
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4460 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); 4472 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI));
4461 expect(UriKind.fromEncoding(0x58), same(null)); 4473 expect(UriKind.fromEncoding(0x58), same(null));
4462 } 4474 }
4463 4475
4464 void test_getEncoding() { 4476 void test_getEncoding() {
4465 expect(UriKind.DART_URI.encoding, 0x64); 4477 expect(UriKind.DART_URI.encoding, 0x64);
4466 expect(UriKind.FILE_URI.encoding, 0x66); 4478 expect(UriKind.FILE_URI.encoding, 0x66);
4467 expect(UriKind.PACKAGE_URI.encoding, 0x70); 4479 expect(UriKind.PACKAGE_URI.encoding, 0x70);
4468 } 4480 }
4469 } 4481 }
OLDNEW
« 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