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/test.dart'; |
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
10 import 'package:unittest/unittest.dart'; | |
11 | 11 |
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 defineReflectiveTests(DartSdkManagerTest); | 18 defineReflectiveSuite(() { |
19 defineReflectiveTests(SdkDescriptionTest); | 19 defineReflectiveTests(DartSdkManagerTest); |
| 20 defineReflectiveTests(SdkDescriptionTest); |
| 21 }); |
20 } | 22 } |
21 | 23 |
22 @reflectiveTest | 24 @reflectiveTest |
23 class DartSdkManagerTest extends EngineTestCase { | 25 class DartSdkManagerTest extends EngineTestCase { |
24 void test_anySdk() { | 26 void test_anySdk() { |
25 DartSdkManager manager = | 27 DartSdkManager manager = |
26 new DartSdkManager('/a/b/c', false, _failIfCreated); | 28 new DartSdkManager('/a/b/c', false, _failIfCreated); |
27 expect(manager.anySdk, isNull); | 29 expect(manager.anySdk, isNull); |
28 | 30 |
29 AnalysisOptions options = new AnalysisOptionsImpl(); | 31 AnalysisOptions options = new AnalysisOptionsImpl(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 119 } |
118 | 120 |
119 void test_equals_samePaths_sameOptions_single() { | 121 void test_equals_samePaths_sameOptions_single() { |
120 String path = '/a/b/c'; | 122 String path = '/a/b/c'; |
121 AnalysisOptions options = new AnalysisOptionsImpl(); | 123 AnalysisOptions options = new AnalysisOptionsImpl(); |
122 SdkDescription left = new SdkDescription(<String>[path], options); | 124 SdkDescription left = new SdkDescription(<String>[path], options); |
123 SdkDescription right = new SdkDescription(<String>[path], options); | 125 SdkDescription right = new SdkDescription(<String>[path], options); |
124 expect(left == right, isTrue); | 126 expect(left == right, isTrue); |
125 } | 127 } |
126 } | 128 } |
OLD | NEW |