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

Side by Side Diff: pkg/analyzer2dart/test/output_helper.dart

Issue 2037123002: Cleanup: remove package "analyzer2dart". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer2dart/test/mock_sdk.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// Helper classes for testing compiler output.
6 library test.output_helper;
7
8 import 'dart:async';
9
10
11 class CollectingOutputProvider {
12 StringBufferSink output;
13
14 EventSink<String> call(String name, String extension) {
15 return output = new StringBufferSink();
16 }
17 }
18
19 class StringBufferSink implements EventSink<String> {
20 StringBuffer sb = new StringBuffer();
21
22 void add(String text) {
23 sb.write(text);
24 }
25
26 void addError(errorEvent, [StackTrace stackTrace]) {}
27
28 void close() {}
29
30 String get text => sb.toString();
31 }
32
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/test/mock_sdk.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698