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/src/generated/engine.dart'; | 7 import 'package:analyzer/src/generated/engine.dart'; |
8 import 'package:analyzer/src/generated/sdk.dart'; | 8 import 'package:analyzer/src/generated/sdk.dart'; |
| 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
10 | 11 |
11 import '../reflective_tests.dart'; | |
12 import '../src/context/mock_sdk.dart'; | 12 import '../src/context/mock_sdk.dart'; |
13 import '../utils.dart'; | 13 import '../utils.dart'; |
14 import 'test_support.dart'; | 14 import 'test_support.dart'; |
15 | 15 |
16 main() { | 16 main() { |
17 initializeTestEnvironment(); | 17 initializeTestEnvironment(); |
18 runReflectiveTests(DartSdkManagerTest); | 18 defineReflectiveTests(DartSdkManagerTest); |
19 runReflectiveTests(SdkDescriptionTest); | 19 defineReflectiveTests(SdkDescriptionTest); |
20 } | 20 } |
21 | 21 |
22 @reflectiveTest | 22 @reflectiveTest |
23 class DartSdkManagerTest extends EngineTestCase { | 23 class DartSdkManagerTest extends EngineTestCase { |
24 void test_anySdk() { | 24 void test_anySdk() { |
25 DartSdkManager manager = | 25 DartSdkManager manager = |
26 new DartSdkManager('/a/b/c', false, _failIfCreated); | 26 new DartSdkManager('/a/b/c', false, _failIfCreated); |
27 expect(manager.anySdk, isNull); | 27 expect(manager.anySdk, isNull); |
28 | 28 |
29 AnalysisOptions options = new AnalysisOptionsImpl(); | 29 AnalysisOptions options = new AnalysisOptionsImpl(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 117 } |
118 | 118 |
119 void test_equals_samePaths_sameOptions_single() { | 119 void test_equals_samePaths_sameOptions_single() { |
120 String path = '/a/b/c'; | 120 String path = '/a/b/c'; |
121 AnalysisOptions options = new AnalysisOptionsImpl(); | 121 AnalysisOptions options = new AnalysisOptionsImpl(); |
122 SdkDescription left = new SdkDescription(<String>[path], options); | 122 SdkDescription left = new SdkDescription(<String>[path], options); |
123 SdkDescription right = new SdkDescription(<String>[path], options); | 123 SdkDescription right = new SdkDescription(<String>[path], options); |
124 expect(left == right, isTrue); | 124 expect(left == right, isTrue); |
125 } | 125 } |
126 } | 126 } |
OLD | NEW |