OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.source.sdk_ext_test; | 5 library analyzer.test.source.sdk_ext_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/source/sdk_ext.dart'; | 9 import 'package:analyzer/source/sdk_ext.dart'; |
| 10 import 'package:test/test.dart'; |
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
11 import 'package:unittest/unittest.dart'; | |
12 | 12 |
13 import '../utils.dart'; | 13 import '../utils.dart'; |
14 | 14 |
15 main() { | 15 main() { |
16 initializeTestEnvironment(); | 16 initializeTestEnvironment(); |
17 defineReflectiveTests(SdkExtUriResolverTest); | 17 defineReflectiveSuite(() { |
| 18 defineReflectiveTests(SdkExtUriResolverTest); |
| 19 }); |
18 } | 20 } |
19 | 21 |
20 @reflectiveTest | 22 @reflectiveTest |
21 class SdkExtUriResolverTest { | 23 class SdkExtUriResolverTest { |
22 MemoryResourceProvider resourceProvider; | 24 MemoryResourceProvider resourceProvider; |
23 | 25 |
24 void setUp() { | 26 void setUp() { |
25 resourceProvider = new MemoryResourceProvider(); | 27 resourceProvider = new MemoryResourceProvider(); |
26 resourceProvider.newFolder('/empty'); | 28 resourceProvider.newFolder('/empty'); |
27 resourceProvider.newFolder('/tmp'); | 29 resourceProvider.newFolder('/tmp'); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 expect(source, isNotNull); | 78 expect(source, isNotNull); |
77 // Restore source's uri. | 79 // Restore source's uri. |
78 var restoreUri = resolver.restoreAbsolute(source); | 80 var restoreUri = resolver.restoreAbsolute(source); |
79 expect(restoreUri, isNotNull); | 81 expect(restoreUri, isNotNull); |
80 // Verify that it is 'dart:fox'. | 82 // Verify that it is 'dart:fox'. |
81 expect(restoreUri.toString(), equals('dart:fox')); | 83 expect(restoreUri.toString(), equals('dart:fox')); |
82 expect(restoreUri.scheme, equals('dart')); | 84 expect(restoreUri.scheme, equals('dart')); |
83 expect(restoreUri.path, equals('fox')); | 85 expect(restoreUri.path, equals('fox')); |
84 } | 86 } |
85 } | 87 } |
OLD | NEW |