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

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

Issue 17588005: Warn about overriding operator== but not hashCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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: dart/tests/compiler/dart2js/analyze_helper.dart
diff --git a/dart/tests/compiler/dart2js/analyze_helper.dart b/dart/tests/compiler/dart2js/analyze_helper.dart
index c3e6729506de0ff985e053ae43b906bc7decc633..11abc46d87ad379743fd43b586d21a6456fa1ac7 100644
--- a/dart/tests/compiler/dart2js/analyze_helper.dart
+++ b/dart/tests/compiler/dart2js/analyze_helper.dart
@@ -27,6 +27,7 @@ import '../../../sdk/lib/_internal/compiler/implementation/source_file_provider.
class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
bool hasWarnings = false;
+ bool hasLint = false;
bool hasErrors = false;
Map<String, Map<String, int>> whiteListMap
@@ -46,6 +47,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
void checkResults() {
Expect.isFalse(hasWarnings);
+ Expect.isFalse(hasLint);
Expect.isFalse(hasErrors);
Expect.isTrue(checkWhiteListUse());
reportWhiteListUse();
@@ -102,6 +104,13 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
}
hasWarnings = true;
}
+ if (kind == api.Diagnostic.LINT) {
+ if (checkWhiteList(uri, message)) {
+ // Suppress white listed warnings.
+ return;
+ }
+ hasLint = true;
+ }
if (kind == api.Diagnostic.ERROR) {
if (checkWhiteList(uri, message)) {
// Suppress white listed warnings.

Powered by Google App Engine
This is Rietveld 408576698