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

Unified Diff: tests/html/point_test.dart

Issue 18034021: Fixing analyzer warnings on overloading == but not get hashCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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
« no previous file with comments | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tests/html/rect_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/point_test.dart
diff --git a/tests/html/point_test.dart b/tests/html/point_test.dart
index 74a0646571ce8ec19241fbf6686aa647ab875255..7a4fdbded4935a54450c03d67aefd077fb0a527e 100644
--- a/tests/html/point_test.dart
+++ b/tests/html/point_test.dart
@@ -103,4 +103,13 @@ main() {
expect(b.x is int, isTrue);
expect(b.y is int, isTrue);
});
+
+ test('hashCode', () {
+ var a = new Point(0, 1);
+ var b = new Point(0, 1);
+ expect(a.hashCode, b.hashCode);
+
+ var c = new Point(1, 0);
+ expect(a.hashCode == c.hashCode, isFalse);
+ });
}
« no previous file with comments | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tests/html/rect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698