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

Side by Side Diff: pkg/analyzer/test/source/package_map_resolver_test.dart

Issue 730783002: Make constant lists immutable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 test.source.package_map_resolver; 5 library test.source.package_map_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 new _PackageMapUriResolverTest().test_resolve_package_notInMap(); 48 new _PackageMapUriResolverTest().test_resolve_package_notInMap();
49 }); 49 });
50 test('restoreAbsolute_OK', () { 50 test('restoreAbsolute_OK', () {
51 new _PackageMapUriResolverTest().test_restoreAbsolute(); 51 new _PackageMapUriResolverTest().test_restoreAbsolute();
52 }); 52 });
53 }); 53 });
54 } 54 }
55 55
56 56
57 class _PackageMapUriResolverTest { 57 class _PackageMapUriResolverTest {
58 static HashMap EMPTY_MAP = new HashMap<String, List<Folder>>(); 58 static const Map EMPTY_MAP = const <String, List<Folder>>{};
59 MemoryResourceProvider provider = new MemoryResourceProvider(); 59 MemoryResourceProvider provider = new MemoryResourceProvider();
60 60
61 void test_isPackageUri() { 61 void test_isPackageUri() {
62 Uri uri = Uri.parse('package:test/test.dart'); 62 Uri uri = Uri.parse('package:test/test.dart');
63 expect(uri.scheme, 'package'); 63 expect(uri.scheme, 'package');
64 expect(PackageMapUriResolver.isPackageUri(uri), isTrue); 64 expect(PackageMapUriResolver.isPackageUri(uri), isTrue);
65 } 65 }
66 66
67 void test_isPackageUri_null_scheme() { 67 void test_isPackageUri_null_scheme() {
68 Uri uri = Uri.parse('foo.dart'); 68 Uri uri = Uri.parse('foo.dart');
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 Source source = _createFileSource('/no/such/file'); 196 Source source = _createFileSource('/no/such/file');
197 Uri uri = resolver.restoreAbsolute(source); 197 Uri uri = resolver.restoreAbsolute(source);
198 expect(uri, isNull); 198 expect(uri, isNull);
199 } 199 }
200 } 200 }
201 201
202 Source _createFileSource(String path) { 202 Source _createFileSource(String path) {
203 return new NonExistingSource(path, UriKind.FILE_URI); 203 return new NonExistingSource(path, UriKind.FILE_URI);
204 } 204 }
205 } 205 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698