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/test.dart'; |
16 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 17 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
17 import 'package:unittest/unittest.dart'; | |
18 | 18 |
19 import '../../../embedder_tests.dart'; | 19 import '../../../embedder_tests.dart'; |
20 import '../../../generated/test_support.dart'; | 20 import '../../../generated/test_support.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 defineReflectiveTests(EmbedderSdkTest); | 26 defineReflectiveSuite(() { |
27 defineReflectiveTests(FolderBasedDartSdkTest); | 27 defineReflectiveTests(EmbedderSdkTest); |
28 defineReflectiveTests(SdkExtensionFinderTest); | 28 defineReflectiveTests(FolderBasedDartSdkTest); |
29 defineReflectiveTests(SDKLibrariesReaderTest); | 29 defineReflectiveTests(SdkExtensionFinderTest); |
| 30 defineReflectiveTests(SDKLibrariesReaderTest); |
| 31 }); |
30 } | 32 } |
31 | 33 |
32 @reflectiveTest | 34 @reflectiveTest |
33 class EmbedderSdkTest extends EmbedderRelatedTest { | 35 class EmbedderSdkTest extends EmbedderRelatedTest { |
34 void test_creation() { | 36 void test_creation() { |
35 EmbedderYamlLocator locator = new EmbedderYamlLocator({ | 37 EmbedderYamlLocator locator = new EmbedderYamlLocator({ |
36 'fox': <Folder>[pathTranslator.getResource(foxLib)] | 38 'fox': <Folder>[pathTranslator.getResource(foxLib)] |
37 }); | 39 }); |
38 EmbedderSdk sdk = new EmbedderSdk(resourceProvider, locator.embedderYamls); | 40 EmbedderSdk sdk = new EmbedderSdk(resourceProvider, locator.embedderYamls); |
39 | 41 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 expect(second, isNotNull); | 460 expect(second, isNotNull); |
459 expect(second.category, "Server"); | 461 expect(second.category, "Server"); |
460 expect(second.path, "second/second.dart"); | 462 expect(second.path, "second/second.dart"); |
461 expect(second.shortName, "dart:second"); | 463 expect(second.shortName, "dart:second"); |
462 expect(second.isDart2JsLibrary, false); | 464 expect(second.isDart2JsLibrary, false); |
463 expect(second.isDocumented, false); | 465 expect(second.isDocumented, false); |
464 expect(second.isImplementation, true); | 466 expect(second.isImplementation, true); |
465 expect(second.isVmLibrary, false); | 467 expect(second.isVmLibrary, false); |
466 } | 468 } |
467 } | 469 } |
OLD | NEW |