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

Side by Side Diff: pkg/analyzer_experimental/bin/analyzer.dart

Issue 22872012: Remove Encoding-enum from dart:io and add interface in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer_experimental/bin/formatter.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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 2
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 6
7 /** The entry point for the analyzer. */ 7 /** The entry point for the analyzer. */
8 library analyzer; 8 library analyzer;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 */ 73 */
74 static ErrorSeverity runAsBatch(List<String> sharedArgs, BatchRunnerHandler ha ndler) { 74 static ErrorSeverity runAsBatch(List<String> sharedArgs, BatchRunnerHandler ha ndler) {
75 stdout.writeln('>>> BATCH START'); 75 stdout.writeln('>>> BATCH START');
76 Stopwatch stopwatch = new Stopwatch(); 76 Stopwatch stopwatch = new Stopwatch();
77 stopwatch.start(); 77 stopwatch.start();
78 int testsFailed = 0; 78 int testsFailed = 0;
79 int totalTests = 0; 79 int totalTests = 0;
80 ErrorSeverity batchResult = ErrorSeverity.NONE; 80 ErrorSeverity batchResult = ErrorSeverity.NONE;
81 // read line from stdin 81 // read line from stdin
82 Stream cmdLine = stdin 82 Stream cmdLine = stdin
83 .transform(new StringDecoder()) 83 .transform(UTF8.decoder)
84 .transform(new LineSplitter()); 84 .transform(new LineSplitter());
85 var subscription = cmdLine.listen((String line) { 85 var subscription = cmdLine.listen((String line) {
86 // may be finish 86 // may be finish
87 if (line.isEmpty) { 87 if (line.isEmpty) {
88 var time = stopwatch.elapsedMilliseconds; 88 var time = stopwatch.elapsedMilliseconds;
89 stdout.writeln('>>> BATCH END (${totalTests - testsFailed}/$totalTests) ${time}ms'); 89 stdout.writeln('>>> BATCH END (${totalTests - testsFailed}/$totalTests) ${time}ms');
90 exit(batchResult.ordinal); 90 exit(batchResult.ordinal);
91 } 91 }
92 // prepare aruments 92 // prepare aruments
93 var args; 93 var args;
(...skipping 22 matching lines...) Expand all
116 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon ds}ms'); 116 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon ds}ms');
117 } catch (e, stackTrace) { 117 } catch (e, stackTrace) {
118 stderr.writeln(e); 118 stderr.writeln(e);
119 stderr.writeln(stackTrace); 119 stderr.writeln(stackTrace);
120 stderr.writeln('>>> EOF STDERR'); 120 stderr.writeln('>>> EOF STDERR');
121 stdout.writeln('>>> TEST CRASH'); 121 stdout.writeln('>>> TEST CRASH');
122 } 122 }
123 }); 123 });
124 } 124 }
125 } 125 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_experimental/bin/formatter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698