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.src.context.context_builder_test; | 5 library analyzer.test.src.context.context_builder_test; |
6 | 6 |
7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
8 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
9 import 'package:analyzer/plugin/options.dart'; | 9 import 'package:analyzer/plugin/options.dart'; |
10 import 'package:analyzer/source/package_map_resolver.dart'; | 10 import 'package:analyzer/source/package_map_resolver.dart'; |
11 import 'package:analyzer/src/context/builder.dart'; | 11 import 'package:analyzer/src/context/builder.dart'; |
12 import 'package:analyzer/src/context/source.dart'; | 12 import 'package:analyzer/src/context/source.dart'; |
13 import 'package:analyzer/src/generated/engine.dart'; | 13 import 'package:analyzer/src/generated/engine.dart'; |
14 import 'package:analyzer/src/generated/sdk.dart'; | 14 import 'package:analyzer/src/generated/sdk.dart'; |
15 import 'package:analyzer/src/generated/source.dart'; | 15 import 'package:analyzer/src/generated/source.dart'; |
16 import 'package:analyzer/src/plugin/options_plugin.dart'; | 16 import 'package:analyzer/src/plugin/options_plugin.dart'; |
17 import 'package:package_config/packages.dart'; | 17 import 'package:package_config/packages.dart'; |
18 import 'package:package_config/src/packages_impl.dart'; | 18 import 'package:package_config/src/packages_impl.dart'; |
19 import 'package:path/path.dart' as path; | 19 import 'package:path/path.dart' as path; |
20 import 'package:plugin/src/plugin_impl.dart'; | 20 import 'package:plugin/src/plugin_impl.dart'; |
| 21 import 'package:test/test.dart'; |
21 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 22 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
22 import 'package:unittest/unittest.dart'; | |
23 | 23 |
24 import '../../embedder_tests.dart'; | 24 import '../../embedder_tests.dart'; |
25 import '../../generated/test_support.dart'; | 25 import '../../generated/test_support.dart'; |
26 import '../../utils.dart'; | 26 import '../../utils.dart'; |
27 import 'mock_sdk.dart'; | 27 import 'mock_sdk.dart'; |
28 | 28 |
29 main() { | 29 main() { |
30 initializeTestEnvironment(); | 30 initializeTestEnvironment(); |
31 defineReflectiveTests(ContextBuilderTest); | 31 defineReflectiveSuite(() { |
32 defineReflectiveTests(EmbedderYamlLocatorTest); | 32 defineReflectiveTests(ContextBuilderTest); |
| 33 defineReflectiveTests(EmbedderYamlLocatorTest); |
| 34 }); |
33 } | 35 } |
34 | 36 |
35 @reflectiveTest | 37 @reflectiveTest |
36 class ContextBuilderTest extends EngineTestCase { | 38 class ContextBuilderTest extends EngineTestCase { |
37 /** | 39 /** |
38 * The resource provider to be used by tests. | 40 * The resource provider to be used by tests. |
39 */ | 41 */ |
40 MemoryResourceProvider resourceProvider; | 42 MemoryResourceProvider resourceProvider; |
41 | 43 |
42 /** | 44 /** |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 fail('Unexpected invocation of optionsProcessed'); | 714 fail('Unexpected invocation of optionsProcessed'); |
713 } | 715 } |
714 expect(options, hasLength(expectedOptions.length)); | 716 expect(options, hasLength(expectedOptions.length)); |
715 for (String key in expectedOptions.keys) { | 717 for (String key in expectedOptions.keys) { |
716 expect(options.containsKey(key), isTrue, reason: 'missing key $key'); | 718 expect(options.containsKey(key), isTrue, reason: 'missing key $key'); |
717 expect(options[key], expectedOptions[key], | 719 expect(options[key], expectedOptions[key], |
718 reason: 'values for key $key do not match'); | 720 reason: 'values for key $key do not match'); |
719 } | 721 } |
720 } | 722 } |
721 } | 723 } |
OLD | NEW |