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

Unified Diff: tests/corelib_strong/set_test.dart

Issue 2683893002: Make corelib_strong tests strong-mode compliant (Closed)
Patch Set: Created 3 years, 10 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/corelib_strong/set_test.dart
diff --git a/tests/corelib_strong/set_test.dart b/tests/corelib_strong/set_test.dart
index 55e7250aa99b76acc296a0933df0459fd8d2fe88..e205ce6c48714ae1c4443fa944a2e80b02fd1577 100644
--- a/tests/corelib_strong/set_test.dart
+++ b/tests/corelib_strong/set_test.dart
@@ -369,10 +369,11 @@ class CE implements Comparable<CE> {
String toString() => "CE($id)";
}
+typedef int CECompare(CE e1, CE e2);
// Equality of Id objects based on id modulo value.
Function customEq(int mod) => (CE e1, CE e2) => ((e1.id - e2.id) % mod) == 0;
Function customHash(int mod) => (CE e) => e.id % mod;
-Function customCompare(int mod) => (CE e1, CE e2) =>
+CECompare customCompare(int mod) => (CE e1, CE e2) =>
(e1.id % mod) - (e2.id % mod);
bool validKey(Object o) => o is CE;
final customId = new Map.identity();

Powered by Google App Engine
This is Rietveld 408576698