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

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

Issue 1196433002: Create and test source mapping for invocations. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 years, 6 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/output_collector.dart
diff --git a/tests/compiler/dart2js/output_collector.dart b/tests/compiler/dart2js/output_collector.dart
index c6bc101a7f8b22f99ba065704aec89a46b69ff7a..d2d3af4fc04f6e598432653ae654d929121863d3 100644
--- a/tests/compiler/dart2js/output_collector.dart
+++ b/tests/compiler/dart2js/output_collector.dart
@@ -26,6 +26,29 @@ class BufferedEventSink implements EventSink<String> {
}
}
+class CloningEventSink implements EventSink<String> {
+ final List<EventSink<String>> sinks;
+
+ CloningEventSink(this.sinks);
+
+ @override
+ void add(String event) {
+ sinks.forEach((EventSink<String> sink) => sink.add(event));
+ }
+
+ @override
+ void addError(errorEvent, [StackTrace stackTrace]) {
+ sinks.forEach((EventSink<String> sink) {
+ sink.addError(errorEvent, stackTrace);
+ });
+ }
+
+ @override
+ void close() {
+ sinks.forEach((EventSink<String> sink) => sink.close());
+ }
+}
+
class OutputCollector {
Map<String, Map<String, BufferedEventSink>> outputMap = {};
« no previous file with comments | « tests/compiler/dart2js/memory_source_file_helper.dart ('k') | tests/compiler/dart2js/sourcemaps/colors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698