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

Unified Diff: pkg/analyzer/test/source/package_map_provider_test.dart

Issue 1266923004: More fixes for failures on the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/source/package_map_provider_test.dart
diff --git a/pkg/analyzer/test/source/package_map_provider_test.dart b/pkg/analyzer/test/source/package_map_provider_test.dart
index ea7987b84df1bcd6c410a2b53f337181ed3c523a..af5bedf26cc56779cc53be2612d89efb45b58ac8 100644
--- a/pkg/analyzer/test/source/package_map_provider_test.dart
+++ b/pkg/analyzer/test/source/package_map_provider_test.dart
@@ -11,8 +11,10 @@ import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/src/generated/sdk_io.dart';
import 'package:unittest/unittest.dart';
+import '../utils.dart';
+
main() {
- groupSep = ' | ';
+ initializeTestEnvironment();
group('PubPackageMapProvider', () {
group('parsePackageMap', () {
@@ -36,8 +38,9 @@ main() {
String packageName = 'foo';
String folderPath = '/path/to/folder';
resourceProvider.newFolder(folderPath);
- Map<String, List<Folder>> result =
- parsePackageMap({'packages': {packageName: folderPath}}).packageMap;
+ Map<String, List<Folder>> result = parsePackageMap({
+ 'packages': {packageName: folderPath}
+ }).packageMap;
expect(result, hasLength(1));
expect(result.keys, contains(packageName));
expect(result[packageName], hasLength(1));
@@ -48,8 +51,9 @@ main() {
test("don't ignore nonexistent folder", () {
String packageName = 'foo';
String folderPath = '/path/to/folder';
- Map<String, List<Folder>> result =
- parsePackageMap({'packages': {packageName: folderPath}}).packageMap;
+ Map<String, List<Folder>> result = parsePackageMap({
+ 'packages': {packageName: folderPath}
+ }).packageMap;
expect(result, hasLength(1));
expect(result.keys, contains(packageName));
expect(result[packageName], hasLength(1));
@@ -63,8 +67,11 @@ main() {
String folderPath2 = '/path/to/folder2';
resourceProvider.newFolder(folderPath1);
resourceProvider.newFolder(folderPath2);
- Map<String, List<Folder>> result = parsePackageMap(
- {'packages': {packageName: [folderPath1, folderPath2]}}).packageMap;
+ Map<String, List<Folder>> result = parsePackageMap({
+ 'packages': {
+ packageName: [folderPath1, folderPath2]
+ }
+ }).packageMap;
expect(result, hasLength(1));
expect(result.keys, contains(packageName));
expect(result[packageName], hasLength(2));
@@ -79,8 +86,10 @@ main() {
String path2 = '/path/to/folder2/pubspec.lock';
resourceProvider.newFile(path1, '...');
resourceProvider.newFile(path2, '...');
- Set<String> dependencies = parsePackageMap(
- {'packages': {}, 'input_files': [path1, path2]}).dependencies;
+ Set<String> dependencies = parsePackageMap({
+ 'packages': {},
+ 'input_files': [path1, path2]
+ }).dependencies;
expect(dependencies, hasLength(2));
expect(dependencies, contains(path1));
expect(dependencies, contains(path2));
@@ -92,8 +101,11 @@ main() {
String packageName = 'foo';
resourceProvider.newFolder(projectPath);
resourceProvider.newFolder(packagePath);
- Map<String, List<Folder>> result = parsePackageMap(
- {'packages': {packageName: [relativePackagePath]}}).packageMap;
+ Map<String, List<Folder>> result = parsePackageMap({
+ 'packages': {
+ packageName: [relativePackagePath]
+ }
+ }).packageMap;
expect(result[packageName][0].path, equals(packagePath));
});
« no previous file with comments | « pkg/analyzer/test/source/analysis_options_provider_test.dart ('k') | pkg/analyzer/test/source/package_map_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698