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

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

Issue 824103005: Revert "Remove Compiler.assembledCode." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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_compiler.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mirror_helper_rename_test.dart
diff --git a/tests/compiler/dart2js/mirror_helper_rename_test.dart b/tests/compiler/dart2js/mirror_helper_rename_test.dart
index 2428dfef7843976eca3becef7d0acc42263c083f..35495513fccc2b60bd935c3ec48453caddbb94bf 100644
--- a/tests/compiler/dart2js/mirror_helper_rename_test.dart
+++ b/tests/compiler/dart2js/mirror_helper_rename_test.dart
@@ -5,7 +5,7 @@
import "package:expect/expect.dart";
import 'dart:async';
import "package:async_helper/async_helper.dart";
-import 'memory_compiler.dart' show compilerFor, OutputCollector;
+import 'memory_compiler.dart' show compilerFor;
import 'package:compiler/src/apiimpl.dart' show
Compiler;
import 'package:compiler/src/tree/tree.dart' show
@@ -20,15 +20,12 @@ main() {
testWithoutMirrorHelperLibrary(minify: false);
}
-Future<Compiler> runCompiler({OutputCollector outputCollector,
- bool useMirrorHelperLibrary: false,
- bool minify: false}) {
+Future<Compiler> runCompiler({useMirrorHelperLibrary: false, minify: false}) {
List<String> options = ['--output-type=dart'];
if (minify) {
options.add('--minify');
}
- Compiler compiler = compilerFor(
- MEMORY_SOURCE_FILES, outputProvider: outputCollector, options: options);
+ Compiler compiler = compilerFor(MEMORY_SOURCE_FILES, options: options);
DartBackend backend = compiler.backend;
backend.useMirrorHelperLibrary = useMirrorHelperLibrary;
return
@@ -36,12 +33,8 @@ Future<Compiler> runCompiler({OutputCollector outputCollector,
}
void testWithMirrorHelperLibrary({bool minify}) {
- OutputCollector outputCollector = new OutputCollector();
- asyncTest(() =>
- runCompiler(outputCollector: outputCollector,
- useMirrorHelperLibrary: true,
- minify: minify)
- .then((Compiler compiler) {
+ asyncTest(() => runCompiler(useMirrorHelperLibrary: true, minify: minify).
+ then((Compiler compiler) {
DartBackend backend = compiler.backend;
MirrorRenamerImpl mirrorRenamer = backend.mirrorRenamer;
Map<Node, String> renames = backend.placeholderRenamer.renames;
@@ -62,7 +55,7 @@ void testWithMirrorHelperLibrary({bool minify}) {
}
}
- String output = outputCollector.getOutput('', 'dart');
+ String output = compiler.assembledCode;
String getNameMatch = MirrorRenamerImpl.MIRROR_HELPER_GET_NAME_FUNCTION;
Iterable i = getNameMatch.allMatches(output);
print(output);
« no previous file with comments | « tests/compiler/dart2js/memory_compiler.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698