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.sdk_test; | 5 library analyzer.test.generated.sdk_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/src/context/builder.dart' show EmbedderYamlLocator; | 9 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; |
10 import 'package:analyzer/src/dart/sdk/sdk.dart'; | 10 import 'package:analyzer/src/dart/sdk/sdk.dart'; |
11 import 'package:analyzer/src/generated/engine.dart'; | 11 import 'package:analyzer/src/generated/engine.dart'; |
12 import 'package:analyzer/src/generated/java_engine_io.dart'; | 12 import 'package:analyzer/src/generated/java_engine_io.dart'; |
13 import 'package:analyzer/src/generated/sdk.dart'; | 13 import 'package:analyzer/src/generated/sdk.dart'; |
14 import 'package:analyzer/src/generated/source.dart'; | 14 import 'package:analyzer/src/generated/source.dart'; |
15 import 'package:analyzer/src/summary/summarize_elements.dart'; | 15 import 'package:analyzer/src/summary/summarize_elements.dart'; |
| 16 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
16 import 'package:unittest/unittest.dart'; | 17 import 'package:unittest/unittest.dart'; |
17 | 18 |
18 import '../../../embedder_tests.dart'; | 19 import '../../../embedder_tests.dart'; |
19 import '../../../generated/test_support.dart'; | 20 import '../../../generated/test_support.dart'; |
20 import '../../../reflective_tests.dart'; | |
21 import '../../../resource_utils.dart'; | 21 import '../../../resource_utils.dart'; |
22 import '../../../utils.dart'; | 22 import '../../../utils.dart'; |
23 | 23 |
24 main() { | 24 main() { |
25 initializeTestEnvironment(); | 25 initializeTestEnvironment(); |
26 runReflectiveTests(EmbedderSdkTest); | 26 defineReflectiveTests(EmbedderSdkTest); |
27 runReflectiveTests(FolderBasedDartSdkTest); | 27 defineReflectiveTests(FolderBasedDartSdkTest); |
28 runReflectiveTests(SdkExtensionFinderTest); | 28 defineReflectiveTests(SdkExtensionFinderTest); |
29 runReflectiveTests(SDKLibrariesReaderTest); | 29 defineReflectiveTests(SDKLibrariesReaderTest); |
30 } | 30 } |
31 | 31 |
32 @reflectiveTest | 32 @reflectiveTest |
33 class EmbedderSdkTest extends EmbedderRelatedTest { | 33 class EmbedderSdkTest extends EmbedderRelatedTest { |
34 void test_creation() { | 34 void test_creation() { |
35 EmbedderYamlLocator locator = new EmbedderYamlLocator({ | 35 EmbedderYamlLocator locator = new EmbedderYamlLocator({ |
36 'fox': [pathTranslator.getResource(foxLib)] | 36 'fox': [pathTranslator.getResource(foxLib)] |
37 }); | 37 }); |
38 EmbedderSdk sdk = new EmbedderSdk(resourceProvider, locator.embedderYamls); | 38 EmbedderSdk sdk = new EmbedderSdk(resourceProvider, locator.embedderYamls); |
39 | 39 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 expect(second, isNotNull); | 448 expect(second, isNotNull); |
449 expect(second.category, "Server"); | 449 expect(second.category, "Server"); |
450 expect(second.path, "second/second.dart"); | 450 expect(second.path, "second/second.dart"); |
451 expect(second.shortName, "dart:second"); | 451 expect(second.shortName, "dart:second"); |
452 expect(second.isDart2JsLibrary, false); | 452 expect(second.isDart2JsLibrary, false); |
453 expect(second.isDocumented, false); | 453 expect(second.isDocumented, false); |
454 expect(second.isImplementation, true); | 454 expect(second.isImplementation, true); |
455 expect(second.isVmLibrary, false); | 455 expect(second.isVmLibrary, false); |
456 } | 456 } |
457 } | 457 } |
OLD | NEW |