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

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
Index: tests/html/point_test.dart
diff --git a/tests/html/point_test.dart b/tests/html/point_test.dart
index 74a0646571ce8ec19241fbf6686aa647ab875255..be0b9406a162c135aa65c3fb489fd403787dd4b3 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, 1);
sra1 2013/06/28 22:25:02 A fun test is that (0,1) and (1,0) differ.
blois 2013/06/28 22:35:37 Done.
+ expect(a.hashCode == c.hashCode, isFalse);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698