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

Unified Diff: tests/compiler/dart2js/analyze_helper.dart

Issue 208423012: Add helpers library to dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/analyze_helper.dart
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index 585468ae7083f08b8860041dcc38559d49681b5f..c9a80eeaf4e2fcccff2930c1e79fba8cac710e24 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -83,7 +83,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
}
String path = uri.path;
for (String file in whiteListMap.keys) {
- if (path.endsWith(file)) {
+ if (path.contains(file)) {
for (String messagePart in whiteListMap[file].keys) {
if (message.contains(messagePart)) {
whiteListMap[file][messagePart]++;
@@ -129,9 +129,13 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
}
}
+typedef bool CheckResults(Compiler compiler,
+ CollectingDiagnosticHandler handler);
+
Future analyze(List<Uri> uriList,
Map<String, List<String>> whiteList,
- {bool analyzeAll: true}) {
+ {bool analyzeAll: true,
+ CheckResults checkResults}) {
String testFileName =
relativize(Uri.base, Platform.script, Platform.isWindows);
@@ -168,7 +172,12 @@ Future analyze(List<Uri> uriList,
""";
void onCompletion(_) {
- bool result = handler.checkResults();
+ bool result;
+ if (checkResults != null) {
+ result = checkResults(compiler, handler);
+ } else {
+ result = handler.checkResults();
+ }
if (!result) {
print(MESSAGE);
exit(1);

Powered by Google App Engine
This is Rietveld 408576698