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

Unified Diff: tests/compiler/dart2js/mirrors_metadata_test.dart

Issue 13797002: Change MirrorSystem.libraries to Map<Uri, String> (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 8 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
« no previous file with comments | « tests/compiler/dart2js/memory_source_file_helper.dart ('k') | tests/compiler/dart2js/mirrors_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mirrors_metadata_test.dart
diff --git a/tests/compiler/dart2js/mirrors_metadata_test.dart b/tests/compiler/dart2js/mirrors_metadata_test.dart
index 5b4294768bfeba7b12c93fbd1a6fddeab15df9c0..d853ac147386cff9c9dd838d36aa9ca4fad2c7d4 100644
--- a/tests/compiler/dart2js/mirrors_metadata_test.dart
+++ b/tests/compiler/dart2js/mirrors_metadata_test.dart
@@ -6,6 +6,7 @@ import 'package:expect/expect.dart';
import 'dart:async';
import 'dart:io';
import 'dart:uri';
+import 'package:expect/expect.dart';
import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart';
@@ -13,15 +14,15 @@ import '../../../sdk/lib/_internal/compiler/implementation/source_file_provider.
import 'mock_compiler.dart';
const String SOURCE = 'source';
+const Uri SOURCE_URI = const Uri.fromComponents(scheme: SOURCE, path: SOURCE);
MirrorSystem createMirrorSystem(String source) {
- Uri sourceUri = new Uri.fromComponents(scheme: SOURCE, path: SOURCE);
MockCompiler compiler = new MockCompiler(
analyzeOnly: true,
analyzeAll: true,
preserveComments: true);
- compiler.registerSource(sourceUri, source);
- compiler.librariesToAnalyzeWhenRun = <Uri>[sourceUri];
+ compiler.registerSource(SOURCE_URI, source);
+ compiler.librariesToAnalyzeWhenRun = <Uri>[SOURCE_URI];
compiler.runCompiler(null);
return new Dart2JsMirrorSystem(compiler);
}
@@ -32,7 +33,7 @@ void validateDeclarationComment(String code,
bool isDocComment,
List<String> declarationNames) {
MirrorSystem mirrors = createMirrorSystem(code);
- LibraryMirror library = mirrors.libraries[SOURCE];
+ LibraryMirror library = mirrors.libraries[SOURCE_URI];
Expect.isNotNull(library);
for (String declarationName in declarationNames) {
DeclarationMirror declaration = library.members[declarationName];
« no previous file with comments | « tests/compiler/dart2js/memory_source_file_helper.dart ('k') | tests/compiler/dart2js/mirrors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698