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

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

Issue 690103004: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/space_test.dart ('k') | tests/compiler/dart2js/strip_comment_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import 'package:compiler/implementation/helpers/helpers.dart'; 6 import 'package:compiler/src/helpers/helpers.dart';
7 7
8 class CollectingOutput implements StatsOutput { 8 class CollectingOutput implements StatsOutput {
9 final StringBuffer sb = new StringBuffer(); 9 final StringBuffer sb = new StringBuffer();
10 10
11 void println(String text) { 11 void println(String text) {
12 sb.write('$text\n'); 12 sb.write('$text\n');
13 } 13 }
14 14
15 String toString() => sb.toString(); 15 String toString() => sb.toString();
16 } 16 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void test(f(Stats stats), expectedDump) { 85 void test(f(Stats stats), expectedDump) {
86 CollectingOutput output = new CollectingOutput(); 86 CollectingOutput output = new CollectingOutput();
87 Stats stats = new ActiveStats(new ConsolePrinter(output: output)); 87 Stats stats = new ActiveStats(new ConsolePrinter(output: output));
88 f(stats); 88 f(stats);
89 stats.dumpStats(); 89 stats.dumpStats();
90 print(output.toString()); 90 print(output.toString());
91 Expect.equals(expectedDump, output.toString()); 91 Expect.equals(expectedDump, output.toString());
92 } 92 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/space_test.dart ('k') | tests/compiler/dart2js/strip_comment_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698