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

Side by Side Diff: pkg/analyzer/test/source/package_map_provider_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) 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.source.package_map_provider_test; 5 library analyzer.test.source.package_map_provider_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/package_map_provider.dart'; 9 import 'package:analyzer/source/package_map_provider.dart';
10 import 'package:analyzer/source/pub_package_map_provider.dart'; 10 import 'package:analyzer/source/pub_package_map_provider.dart';
11 import 'package:analyzer/src/dart/sdk/sdk.dart'; 11 import 'package:analyzer/src/dart/sdk/sdk.dart';
12 import 'package:analyzer/src/generated/sdk.dart'; 12 import 'package:analyzer/src/generated/sdk.dart';
13 import 'package:test/test.dart';
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; 14 import 'package:test_reflective_loader/test_reflective_loader.dart';
14 import 'package:unittest/unittest.dart';
15 15
16 import '../utils.dart'; 16 import '../utils.dart';
17 17
18 main() { 18 main() {
19 initializeTestEnvironment(); 19 initializeTestEnvironment();
20 defineReflectiveTests(PubPackageMapProviderTest); 20 defineReflectiveSuite(() {
21 defineReflectiveTests(PubPackageMapProviderTest);
22 });
21 } 23 }
22 24
23 @reflectiveTest 25 @reflectiveTest
24 class PubPackageMapProviderTest { 26 class PubPackageMapProviderTest {
25 static const String projectPath = '/path/to/project'; 27 static const String projectPath = '/path/to/project';
26 28
27 DartSdk sdk; 29 DartSdk sdk;
28 MemoryResourceProvider resourceProvider; 30 MemoryResourceProvider resourceProvider;
29 PubPackageMapProvider packageMapProvider; 31 PubPackageMapProvider packageMapProvider;
30 Folder projectFolder; 32 Folder projectFolder;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 resourceProvider.newFolder(projectPath); 134 resourceProvider.newFolder(projectPath);
133 resourceProvider.newFile(dependencyPath, 'contents'); 135 resourceProvider.newFile(dependencyPath, 'contents');
134 Set<String> dependencies = parsePackageMap({ 136 Set<String> dependencies = parsePackageMap({
135 'packages': {}, 137 'packages': {},
136 'input_files': [relativeDependencyPath] 138 'input_files': [relativeDependencyPath]
137 }).dependencies; 139 }).dependencies;
138 expect(dependencies, hasLength(1)); 140 expect(dependencies, hasLength(1));
139 expect(dependencies, contains(dependencyPath)); 141 expect(dependencies, contains(dependencyPath));
140 } 142 }
141 } 143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698