| OLD | NEW |
| 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 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4026 if (1 < 2) { | 4026 if (1 < 2) { |
| 4027 break x; | 4027 break x; |
| 4028 } | 4028 } |
| 4029 return; | 4029 return; |
| 4030 } | 4030 } |
| 4031 } | 4031 } |
| 4032 '''); | 4032 '''); |
| 4033 _assertNthStatementDoesNotExit(source, 0); | 4033 _assertNthStatementDoesNotExit(source, 0); |
| 4034 } | 4034 } |
| 4035 | 4035 |
| 4036 void test_whileStatement_switchWithBreakWithLabel() { |
| 4037 Source source = addSource(r''' |
| 4038 void f() { |
| 4039 x: while (true) { |
| 4040 switch (true) { |
| 4041 case false: break; |
| 4042 case true: break x; |
| 4043 } |
| 4044 } |
| 4045 } |
| 4046 '''); |
| 4047 _assertNthStatementDoesNotExit(source, 0); |
| 4048 } |
| 4049 |
| 4036 void test_whileStatement_breakWithLabel_afterExting() { | 4050 void test_whileStatement_breakWithLabel_afterExting() { |
| 4037 Source source = addSource(r''' | 4051 Source source = addSource(r''' |
| 4038 void f() { | 4052 void f() { |
| 4039 x: while (true) { | 4053 x: while (true) { |
| 4040 return; | 4054 return; |
| 4041 if (1 < 2) { | 4055 if (1 < 2) { |
| 4042 break x; | 4056 break x; |
| 4043 } | 4057 } |
| 4044 } | 4058 } |
| 4045 } | 4059 } |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4476 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); | 4490 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); |
| 4477 expect(UriKind.fromEncoding(0x58), same(null)); | 4491 expect(UriKind.fromEncoding(0x58), same(null)); |
| 4478 } | 4492 } |
| 4479 | 4493 |
| 4480 void test_getEncoding() { | 4494 void test_getEncoding() { |
| 4481 expect(UriKind.DART_URI.encoding, 0x64); | 4495 expect(UriKind.DART_URI.encoding, 0x64); |
| 4482 expect(UriKind.FILE_URI.encoding, 0x66); | 4496 expect(UriKind.FILE_URI.encoding, 0x66); |
| 4483 expect(UriKind.PACKAGE_URI.encoding, 0x70); | 4497 expect(UriKind.PACKAGE_URI.encoding, 0x70); |
| 4484 } | 4498 } |
| 4485 } | 4499 } |
| OLD | NEW |