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

Unified Diff: tests/corelib/set_test.dart

Issue 12836002: Ints don't have "isEven" anymore. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/set_test.dart
diff --git a/tests/corelib/set_test.dart b/tests/corelib/set_test.dart
index 940e4271d0940f4d2cd3e419c1d66b7c5a13473e..14173b1c2a0465424bf8c88c29d811fd87f49e8a 100644
--- a/tests/corelib/set_test.dart
+++ b/tests/corelib/set_test.dart
@@ -78,7 +78,7 @@ void testMain(Set create()) {
// Test Set.filter.
testFilter(int val) {
- return val.isEven;
+ return val % 2 == 0;
}
Set filtered = set.where(testFilter).toSet();
@@ -145,14 +145,14 @@ void testMain(Set create()) {
Set union = twice.union(thrice);
Expect.equals(11, union.length);
for (int i = 0; i < 16; i++) {
- Expect.equals(i.isEven || (i % 3) == 0, union.contains(i));
+ Expect.equals((i % 2) == 0 || (i % 3) == 0, union.contains(i));
}
// Test Set.difference.
Set difference = twice.difference(thrice);
Expect.equals(5, difference.length);
for (int i = 0; i < 16; i++) {
- Expect.equals(i.isEven && (i % 3) != 0, difference.contains(i));
+ Expect.equals((i % 2) == 0 && (i % 3) != 0, difference.contains(i));
}
Expect.isTrue(twice.difference(thrice).difference(twice).isEmpty);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698