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

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: 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
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 7fd8589f643a0afd0684f3af65aa5bb24fccb193..125fd3f6f808b45d8b754b6e94197bda54360d6e 100644
--- a/tests/compiler/dart2js/mirrors_metadata_test.dart
+++ b/tests/compiler/dart2js/mirrors_metadata_test.dart
@@ -5,6 +5,7 @@
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';
@@ -12,15 +13,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);
}
@@ -31,7 +32,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];

Powered by Google App Engine
This is Rietveld 408576698