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

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

Issue 832363002: 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
Index: tests/compiler/dart2js/exit_code_test.dart
diff --git a/tests/compiler/dart2js/exit_code_test.dart b/tests/compiler/dart2js/exit_code_test.dart
index 9966f59feb6ebda835dd8c0899ce6c35087daf44..7643fefe43410108c673ae420f18c4f6e9f32c7b 100644
--- a/tests/compiler/dart2js/exit_code_test.dart
+++ b/tests/compiler/dart2js/exit_code_test.dart
@@ -152,14 +152,15 @@ Future testExitCode(String marker, String type, int expectedExitCode) {
}
}
return new Future(() {
- Future<String> compile(Uri script,
- Uri libraryRoot,
- Uri packageRoot,
- api.CompilerInputProvider inputProvider,
- api.DiagnosticHandler handler,
- [List<String> options = const [],
- api.CompilerOutputProvider outputProvider,
- Map<String, dynamic> environment = const {}]) {
+ Future<api.CompilationResult> compile(
+ Uri script,
+ Uri libraryRoot,
+ Uri packageRoot,
+ api.CompilerInputProvider inputProvider,
+ api.DiagnosticHandler handler,
+ [List<String> options = const [],
+ api.CompilerOutputProvider outputProvider,
+ Map<String, dynamic> environment = const {}]) {
libraryRoot = Platform.script.resolve('../../../sdk/');
outputProvider = NullSink.outputProvider;
// Use this to silence the test when debugging:
@@ -174,19 +175,8 @@ Future testExitCode(String marker, String type, int expectedExitCode) {
marker,
type,
onTest);
- return compiler.run(script).then((_) {
- String code = compiler.assembledCode;
- if (code != null && outputProvider != null) {
- String outputType = 'js';
- if (options.contains('--output-type=dart')) {
- outputType = 'dart';
- }
- outputProvider('', outputType)
- ..add(code)
- ..close();
- code = ''; // Non-null signals success.
- }
- return code;
+ return compiler.run(script).then((bool success) {
+ return new api.CompilationResult(compiler, isSuccess: success);
});
}

Powered by Google App Engine
This is Rietveld 408576698