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

Side by Side Diff: pkg/testing/lib/src/analyze.dart

Issue 2876813002: Implement generalized function types. (Closed)
Patch Set: Address comments. Created 3 years, 7 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/front_end/tool/_fasta/generate_messages.dart ('k') | tests/co19/co19-dart2js.status » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library testing.analyze; 5 library testing.analyze;
6 6
7 import 'dart:async' show Stream, Future; 7 import 'dart:async' show Stream, Future;
8 8
9 import 'dart:convert' show LineSplitter, UTF8; 9 import 'dart:convert' show LineSplitter, UTF8;
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 process.stdin.close(); 159 process.stdin.close();
160 Future stdoutFuture = parseAnalyzerOutput(process.stdout).toList(); 160 Future stdoutFuture = parseAnalyzerOutput(process.stdout).toList();
161 Future stderrFuture = parseAnalyzerOutput(process.stderr).toList(); 161 Future stderrFuture = parseAnalyzerOutput(process.stderr).toList();
162 await process.exitCode; 162 await process.exitCode;
163 List<AnalyzerDiagnostic> diagnostics = <AnalyzerDiagnostic>[]; 163 List<AnalyzerDiagnostic> diagnostics = <AnalyzerDiagnostic>[];
164 diagnostics.addAll(await stdoutFuture); 164 diagnostics.addAll(await stdoutFuture);
165 diagnostics.addAll(await stderrFuture); 165 diagnostics.addAll(await stderrFuture);
166 bool hasOutput = false; 166 bool hasOutput = false;
167 Set<String> seen = new Set<String>(); 167 Set<String> seen = new Set<String>();
168 for (AnalyzerDiagnostic diagnostic in diagnostics) { 168 for (AnalyzerDiagnostic diagnostic in diagnostics) {
169 String path = diagnostic.uri?.path ?? "<unknown>"; 169 String path = diagnostic.uri?.path;
170 if (exclude.any((RegExp r) => path.contains(r))) continue; 170 if (path != null && exclude.any((RegExp r) => path.contains(r))) {
171 continue;
172 }
171 String message = "$diagnostic"; 173 String message = "$diagnostic";
172 if (seen.add(message)) { 174 if (seen.add(message)) {
173 hasOutput = true; 175 hasOutput = true;
174 print(message); 176 print(message);
175 } 177 }
176 } 178 }
177 if (hasOutput) { 179 if (hasOutput) {
178 throw "Non-empty output from analyzer."; 180 throw "Non-empty output from analyzer.";
179 } 181 }
180 sw.stop(); 182 sw.stop();
181 print("Running analyzer took: ${sw.elapsed}."); 183 print("Running analyzer took: ${sw.elapsed}.");
182 } 184 }
OLDNEW
« no previous file with comments | « pkg/front_end/tool/_fasta/generate_messages.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698