Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1152)

Side by Side Diff: pkg/analyzer/test/src/source/source_resource_test.dart

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_reflective_loader/test_reflective_loader.dart'; 16 import 'package:test_reflective_loader/test_reflective_loader.dart';
16 import 'package:unittest/unittest.dart';
17 17
18 import '../../utils.dart'; 18 import '../../utils.dart';
19 import '../context/mock_sdk.dart'; 19 import '../context/mock_sdk.dart';
20 20
21 main() { 21 main() {
22 initializeTestEnvironment(); 22 initializeTestEnvironment();
23 defineReflectiveTests(FileSourceTest); 23 defineReflectiveSuite(() {
24 defineReflectiveTests(FileSourceTest);
25 });
24 } 26 }
25 27
26 @reflectiveTest 28 @reflectiveTest
27 class FileSourceTest { 29 class FileSourceTest {
28 MemoryResourceProvider resourceProvider = new MemoryResourceProvider(); 30 MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
29 31
30 void test_equals_false_differentFiles() { 32 void test_equals_false_differentFiles() {
31 File file1 = resourceProvider.getFile("/does/not/exist1.dart"); 33 File file1 = resourceProvider.getFile("/does/not/exist1.dart");
32 File file2 = resourceProvider.getFile("/does/not/exist2.dart"); 34 File file2 = resourceProvider.getFile("/does/not/exist2.dart");
33 FileSource source1 = new FileSource(file1); 35 FileSource source1 = new FileSource(file1);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 FileSource source = new FileSource(file, Uri.parse("dart:core")); 201 FileSource source = new FileSource(file, Uri.parse("dart:core"));
200 expect(source, isNotNull); 202 expect(source, isNotNull);
201 expect(source.fullName, file.path); 203 expect(source.fullName, file.path);
202 expect(source.isInSystemLibrary, isTrue); 204 expect(source.isInSystemLibrary, isTrue);
203 } 205 }
204 206
205 DartSdk _createSdk() { 207 DartSdk _createSdk() {
206 return new MockSdk(resourceProvider: resourceProvider); 208 return new MockSdk(resourceProvider: resourceProvider);
207 } 209 }
208 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698