| 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) {
|
|
|