OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.non_hint_code_test; | 5 library analyzer.test.generated.non_hint_code_test; |
6 | 6 |
7 import 'package:analyzer/src/generated/error.dart'; | 7 import 'package:analyzer/src/generated/error.dart'; |
8 import 'package:analyzer/src/generated/source_io.dart'; | 8 import 'package:analyzer/src/generated/source_io.dart'; |
| 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 | 10 |
10 import '../reflective_tests.dart'; | |
11 import '../utils.dart'; | 11 import '../utils.dart'; |
12 import 'resolver_test_case.dart'; | 12 import 'resolver_test_case.dart'; |
13 | 13 |
14 main() { | 14 main() { |
15 initializeTestEnvironment(); | 15 initializeTestEnvironment(); |
16 runReflectiveTests(NonHintCodeTest); | 16 defineReflectiveTests(NonHintCodeTest); |
17 } | 17 } |
18 | 18 |
19 @reflectiveTest | 19 @reflectiveTest |
20 class NonHintCodeTest extends ResolverTestCase { | 20 class NonHintCodeTest extends ResolverTestCase { |
21 void test_deadCode_afterTryCatch() { | 21 void test_deadCode_afterTryCatch() { |
22 Source source = addSource(''' | 22 Source source = addSource(''' |
23 main() { | 23 main() { |
24 try { | 24 try { |
25 return f(); | 25 return f(); |
26 } catch (e) { | 26 } catch (e) { |
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 | 1339 |
1340 void test_import_valid_outside_lib() { | 1340 void test_import_valid_outside_lib() { |
1341 cacheSource("/myproj/pubspec.yaml", ""); | 1341 cacheSource("/myproj/pubspec.yaml", ""); |
1342 cacheSource("/myproj/web/other.dart", ""); | 1342 cacheSource("/myproj/web/other.dart", ""); |
1343 Source source = | 1343 Source source = |
1344 addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';"); | 1344 addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';"); |
1345 computeLibrarySourceErrors(source); | 1345 computeLibrarySourceErrors(source); |
1346 assertNoErrors(source); | 1346 assertNoErrors(source); |
1347 } | 1347 } |
1348 } | 1348 } |
OLD | NEW |