| 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_reflective_loader/test_reflective_loader.dart'; |
| 21 import 'package:unittest/unittest.dart'; | 22 import 'package:unittest/unittest.dart'; |
| 22 | 23 |
| 23 import '../../embedder_tests.dart'; | 24 import '../../embedder_tests.dart'; |
| 24 import '../../generated/test_support.dart'; | 25 import '../../generated/test_support.dart'; |
| 25 import '../../reflective_tests.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 runReflectiveTests(ContextBuilderTest); | 31 defineReflectiveTests(ContextBuilderTest); |
| 32 runReflectiveTests(EmbedderYamlLocatorTest); | 32 defineReflectiveTests(EmbedderYamlLocatorTest); |
| 33 } | 33 } |
| 34 | 34 |
| 35 @reflectiveTest | 35 @reflectiveTest |
| 36 class ContextBuilderTest extends EngineTestCase { | 36 class ContextBuilderTest extends EngineTestCase { |
| 37 /** | 37 /** |
| 38 * The resource provider to be used by tests. | 38 * The resource provider to be used by tests. |
| 39 */ | 39 */ |
| 40 MemoryResourceProvider resourceProvider; | 40 MemoryResourceProvider resourceProvider; |
| 41 | 41 |
| 42 /** | 42 /** |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 fail('Unexpected invocation of optionsProcessed'); | 709 fail('Unexpected invocation of optionsProcessed'); |
| 710 } | 710 } |
| 711 expect(options, hasLength(expectedOptions.length)); | 711 expect(options, hasLength(expectedOptions.length)); |
| 712 for (String key in expectedOptions.keys) { | 712 for (String key in expectedOptions.keys) { |
| 713 expect(options.containsKey(key), isTrue, reason: 'missing key $key'); | 713 expect(options.containsKey(key), isTrue, reason: 'missing key $key'); |
| 714 expect(options[key], expectedOptions[key], | 714 expect(options[key], expectedOptions[key], |
| 715 reason: 'values for key $key do not match'); | 715 reason: 'values for key $key do not match'); |
| 716 } | 716 } |
| 717 } | 717 } |
| 718 } | 718 } |
| OLD | NEW |