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

Side by Side Diff: tests/compiler/dart2js/output_collector.dart

Issue 2939063002: Strong mode cleaning of many dart2js tests. (Closed)
Patch Set: Use ClassElement. Created 3 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Output provider that collects the output in string buffers. 5 // Output provider that collects the output in string buffers.
6 6
7 library output_collector; 7 library output_collector;
8 8
9 import 'dart:async';
10 import 'package:compiler/compiler_new.dart'; 9 import 'package:compiler/compiler_new.dart';
11 10
12 class BufferedOutputSink implements OutputSink { 11 class BufferedOutputSink implements OutputSink {
13 StringBuffer sb = new StringBuffer(); 12 StringBuffer sb = new StringBuffer();
14 String text; 13 String text;
15 14
16 void add(String event) { 15 void add(String event) {
17 sb.write(event); 16 sb.write(event);
18 } 17 }
19 18
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return false; 73 return false;
75 } 74 }
76 75
77 @override 76 @override
78 OutputSink createOutputSink(String name, String extension, OutputType type) { 77 OutputSink createOutputSink(String name, String extension, OutputType type) {
79 Map<String, BufferedOutputSink> sinkMap = 78 Map<String, BufferedOutputSink> sinkMap =
80 outputMap.putIfAbsent(type, () => {}); 79 outputMap.putIfAbsent(type, () => {});
81 return sinkMap.putIfAbsent(name, () => new BufferedOutputSink()); 80 return sinkMap.putIfAbsent(name, () => new BufferedOutputSink());
82 } 81 }
83 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698