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/test.dart'; |
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
12 | 12 |
13 import '../utils.dart'; | |
14 | |
15 main() { | 13 main() { |
16 initializeTestEnvironment(); | |
17 defineReflectiveSuite(() { | 14 defineReflectiveSuite(() { |
18 defineReflectiveTests(SdkExtUriResolverTest); | 15 defineReflectiveTests(SdkExtUriResolverTest); |
19 }); | 16 }); |
20 } | 17 } |
21 | 18 |
22 @reflectiveTest | 19 @reflectiveTest |
23 class SdkExtUriResolverTest { | 20 class SdkExtUriResolverTest { |
24 MemoryResourceProvider resourceProvider; | 21 MemoryResourceProvider resourceProvider; |
25 | 22 |
26 void setUp() { | 23 void setUp() { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 expect(source, isNotNull); | 75 expect(source, isNotNull); |
79 // Restore source's uri. | 76 // Restore source's uri. |
80 var restoreUri = resolver.restoreAbsolute(source); | 77 var restoreUri = resolver.restoreAbsolute(source); |
81 expect(restoreUri, isNotNull); | 78 expect(restoreUri, isNotNull); |
82 // Verify that it is 'dart:fox'. | 79 // Verify that it is 'dart:fox'. |
83 expect(restoreUri.toString(), equals('dart:fox')); | 80 expect(restoreUri.toString(), equals('dart:fox')); |
84 expect(restoreUri.scheme, equals('dart')); | 81 expect(restoreUri.scheme, equals('dart')); |
85 expect(restoreUri.path, equals('fox')); | 82 expect(restoreUri.path, equals('fox')); |
86 } | 83 } |
87 } | 84 } |
OLD | NEW |