Index: tests/try/web/web_compiler_test_case.dart |
diff --git a/tests/try/web/web_compiler_test_case.dart b/tests/try/web/web_compiler_test_case.dart |
index 1c2eeeeea5529de7efd872efe6950fe5e9256a39..8a9b026c3a0a39b43652f9bfd1807b31e61bd118 100644 |
--- a/tests/try/web/web_compiler_test_case.dart |
+++ b/tests/try/web/web_compiler_test_case.dart |
@@ -17,7 +17,7 @@ import '../poi/compiler_test_case.dart' show |
CompilerTestCase; |
import 'package:dart2js_incremental/dart2js_incremental.dart' show |
- IncrementalCompiler; |
+ IncrementalCompiler, OutputProvider; |
import 'package:compiler/compiler.dart' show |
Diagnostic; |
@@ -112,41 +112,3 @@ class WebInputProvider { |
return cachedRequests.putIfAbsent(uri, () => HttpRequest.getString(uri)); |
} |
} |
- |
-/// Output provider which collect output in [output]. |
-class OutputProvider { |
- final Map<String, String> output = new Map<String, String>(); |
- |
- EventSink<String> call(String name, String extension) { |
- return new StringEventSink((String data) { |
- output['$name.$extension'] = data; |
- }); |
- } |
- |
- String operator[] (String key) => output[key]; |
-} |
- |
-/// Helper class to collect sources. |
-class StringEventSink implements EventSink<String> { |
- List<String> data = <String>[]; |
- |
- final Function onClose; |
- |
- StringEventSink(this.onClose); |
- |
- void add(String event) { |
- if (data == null) throw 'StringEventSink is closed.'; |
- data.add(event); |
- } |
- |
- void addError(errorEvent, [StackTrace stackTrace]) { |
- throw 'addError($errorEvent, $stackTrace)'; |
- } |
- |
- void close() { |
- if (data != null) { |
- onClose(data.join()); |
- data = null; |
- } |
- } |
-} |