OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.src.source.source_resource_test; | 5 library analyzer.test.src.source.source_resource_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/file_system/physical_file_system.dart'; | 9 import 'package:analyzer/file_system/physical_file_system.dart'; |
10 import 'package:analyzer/src/generated/java_engine_io.dart'; | 10 import 'package:analyzer/src/generated/java_engine_io.dart'; |
11 import 'package:analyzer/src/generated/sdk.dart'; | 11 import 'package:analyzer/src/generated/sdk.dart'; |
12 import 'package:analyzer/src/generated/source.dart'; | 12 import 'package:analyzer/src/generated/source.dart'; |
13 import 'package:analyzer/src/generated/utilities_dart.dart'; | 13 import 'package:analyzer/src/generated/utilities_dart.dart'; |
14 import 'package:analyzer/src/source/source_resource.dart'; | 14 import 'package:analyzer/src/source/source_resource.dart'; |
15 import 'package:test/test.dart'; | 15 import 'package:test/test.dart'; |
16 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 16 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
17 | 17 |
18 import '../../utils.dart'; | |
19 import '../context/mock_sdk.dart'; | 18 import '../context/mock_sdk.dart'; |
20 | 19 |
21 main() { | 20 main() { |
22 initializeTestEnvironment(); | |
23 defineReflectiveSuite(() { | 21 defineReflectiveSuite(() { |
24 defineReflectiveTests(FileSourceTest); | 22 defineReflectiveTests(FileSourceTest); |
25 }); | 23 }); |
26 } | 24 } |
27 | 25 |
28 @reflectiveTest | 26 @reflectiveTest |
29 class FileSourceTest { | 27 class FileSourceTest { |
30 MemoryResourceProvider resourceProvider = new MemoryResourceProvider(); | 28 MemoryResourceProvider resourceProvider = new MemoryResourceProvider(); |
31 | 29 |
32 void test_equals_false_differentFiles() { | 30 void test_equals_false_differentFiles() { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 FileSource source = new FileSource(file, Uri.parse("dart:core")); | 199 FileSource source = new FileSource(file, Uri.parse("dart:core")); |
202 expect(source, isNotNull); | 200 expect(source, isNotNull); |
203 expect(source.fullName, file.path); | 201 expect(source.fullName, file.path); |
204 expect(source.isInSystemLibrary, isTrue); | 202 expect(source.isInSystemLibrary, isTrue); |
205 } | 203 } |
206 | 204 |
207 DartSdk _createSdk() { | 205 DartSdk _createSdk() { |
208 return new MockSdk(resourceProvider: resourceProvider); | 206 return new MockSdk(resourceProvider: resourceProvider); |
209 } | 207 } |
210 } | 208 } |
OLD | NEW |