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

Unified Diff: tests/html/rect_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/rect_test.dart
diff --git a/tests/html/rect_test.dart b/tests/html/rect_test.dart
index fd1935a2485b4c5f4f19cc8313014091768f6f3a..7dbed1831d694bffa31d73cd92516dd37d5287bc 100644
--- a/tests/html/rect_test.dart
+++ b/tests/html/rect_test.dart
@@ -147,4 +147,13 @@ main() {
expect(b.width is int, isTrue);
expect(b.height is int, isTrue);
});
+
+ test('hashCode', () {
+ var a = new Rect(0, 1, 2, 3);
+ var b = new Rect(0, 1, 2, 3);
+ expect(a.hashCode, b.hashCode);
+
+ var c = new Rect(1, 1, 2, 3);
sra1 2013/06/28 22:25:02 Rect(1,0,2,3) Rect(0,1,3,2) might be a better test
blois 2013/06/28 22:35:37 Done.
+ expect(a.hashCode == c.hashCode, isFalse);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698