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

Unified Diff: lib/src/report.dart

Issue 1321103002: makes tests faster, see #304 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: stabalize messages Created 5 years, 4 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
« no previous file with comments | « lib/src/compiler.dart ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/report.dart
diff --git a/lib/src/report.dart b/lib/src/report.dart
index 7448158108ca43b81d417392fd1a4a8204f0aa61..6c74fe1ee2c435217d4c3273bac07f1a8ecb2238 100644
--- a/lib/src/report.dart
+++ b/lib/src/report.dart
@@ -34,17 +34,19 @@ class ErrorCollector implements AnalysisErrorListener {
var severity1 = _strongModeErrorSeverity(error1);
var severity2 = _strongModeErrorSeverity(error2);
int compare = severity2.compareTo(severity1);
- if (compare != 0) {
- return compare;
- }
+ if (compare != 0) return compare;
+
// path
compare = Comparable.compare(error1.source.fullName.toLowerCase(),
error2.source.fullName.toLowerCase());
- if (compare != 0) {
- return compare;
- }
+ if (compare != 0) return compare;
+
// offset
- return error1.offset - error2.offset;
+ compare = error1.offset - error2.offset;
+ if (compare != 0) return compare;
+
+ // compare message, in worst case.
+ return error1.message.compareTo(error2.message);
vsm 2015/08/28 17:12:31 nice :-)
});
_errors.forEach(listener.onError);
« no previous file with comments | « lib/src/compiler.dart ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698