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

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

Issue 830703004: Emit to StreamCodeOutput instead of CodeBuffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments 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/source_mapping_test.dart
diff --git a/tests/compiler/dart2js/source_mapping_test.dart b/tests/compiler/dart2js/source_mapping_test.dart
index 3ff0813c023cc7f5c07b645f9b86bd4c6026907d..8b5fa4e2ca24fe93a4b2e15a5627594ff417ae0e 100644
--- a/tests/compiler/dart2js/source_mapping_test.dart
+++ b/tests/compiler/dart2js/source_mapping_test.dart
@@ -6,7 +6,7 @@ import 'dart:async';
import "package:expect/expect.dart";
import "package:async_helper/async_helper.dart";
import "package:compiler/src/io/code_output.dart";
-import 'package:compiler/src/source_file.dart';
+import 'package:compiler/src/io/source_file.dart';
import "mock_compiler.dart";
import 'package:compiler/src/js_backend/js_backend.dart';
@@ -16,7 +16,8 @@ Future<CodeBuffer> compileAll(SourceFile sourceFile) {
compiler.sourceFiles[uri.toString()] = sourceFile;
JavaScriptBackend backend = compiler.backend;
return compiler.runCompiler(uri).then((_) {
- return backend.emitter.oldEmitter.mainBuffer;
+ return backend.emitter.oldEmitter
+ .outputBuffers[compiler.deferredLoadTask.mainOutputUnit];
});
}
@@ -30,9 +31,9 @@ void testSourceMapLocations(String codeWithMarkers) {
String code = codeWithMarkers.replaceAll('@', '');
SourceFile sourceFile = new StringSourceFile('<test script>', code);
- asyncTest(() => compileAll(sourceFile).then((CodeBuffer buffer) {
+ asyncTest(() => compileAll(sourceFile).then((CodeOutput output) {
Set<int> locations = new Set<int>();
- buffer.forEachSourceLocation((int offset, var sourcePosition) {
+ output.forEachSourceLocation((int offset, var sourcePosition) {
if (sourcePosition != null && sourcePosition.sourceFile == sourceFile) {
locations.add(sourcePosition.token.charOffset);
}
« no previous file with comments | « tests/compiler/dart2js/source_map_validator_helper.dart ('k') | tests/compiler/dart2js/type_checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698