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

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

Issue 832363002: Remove Compiler.assembledCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittest 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 | « site/try/src/compiler_isolate.dart ('k') | tests/compiler/dart2js/backend_dart/dart_backend_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/analyze_only_test.dart
diff --git a/tests/compiler/dart2js/analyze_only_test.dart b/tests/compiler/dart2js/analyze_only_test.dart
index 38f01014d8e357ab1f69b90e11693e24dfdb553c..516c0d178419854ef0780f380b72f19ce370f43c 100644
--- a/tests/compiler/dart2js/analyze_only_test.dart
+++ b/tests/compiler/dart2js/analyze_only_test.dart
@@ -15,6 +15,8 @@ import 'package:compiler/compiler.dart';
import 'package:compiler/src/dart2jslib.dart' show
MessageKind;
+import 'output_collector.dart';
+
runCompiler(String main, List<String> options,
onValue(String code, List errors, List warnings)) {
List errors = new List();
@@ -39,13 +41,14 @@ runCompiler(String main, List<String> options,
print('main source:\n$main');
print('options: $options\n');
asyncStart();
- Future<String> result =
+ OutputCollector outputCollector = new OutputCollector();
+ Future<CompilationResult> result =
compile(new Uri(scheme: 'main'),
new Uri(scheme: 'lib', path: '/'),
new Uri(scheme: 'package', path: '/'),
- localProvider, localHandler, options);
- result.then((String code) {
- onValue(code, errors, warnings);
+ localProvider, localHandler, options, outputCollector);
+ result.then((_) {
+ onValue(outputCollector.getOutput('', 'js'), errors, warnings);
}, onError: (e) {
throw 'Compilation failed: ${Error.safeToString(e)}';
}).then(asyncSuccess).catchError((error, stack) {
« no previous file with comments | « site/try/src/compiler_isolate.dart ('k') | tests/compiler/dart2js/backend_dart/dart_backend_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698