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

Unified Diff: tests/corelib/set_test.dart

Issue 10836009: Change Set.add to return a boolean indicating success. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « corelib/src/set.dart ('k') | 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 59b8f1339eb132cc4a85bdd6a51db40e6ccf4581..ebe1f7896b8f95a9d48f6d20ad758f17c1597ae8 100644
--- a/tests/corelib/set_test.dart
+++ b/tests/corelib/set_test.dart
@@ -7,20 +7,20 @@ class SetTest {
static testMain() {
Set set = new Set();
Expect.equals(0, set.length);
- set.add(1);
+ Expect.equals(true, set.add(1));
Expect.equals(1, set.length);
Expect.equals(true, set.contains(1));
- set.add(1);
+ Expect.equals(false, set.add(1));
Expect.equals(1, set.length);
Expect.equals(true, set.contains(1));
- set.remove(1);
+ Expect.equals(true, set.remove(1));
Expect.equals(0, set.length);
Expect.equals(false, set.contains(1));
for (int i = 0; i < 10; i++) {
- set.add(i);
+ Expect.equals(true, set.add(i));
}
Expect.equals(10, set.length);
@@ -114,7 +114,7 @@ class SetTest {
Expect.equals(true, set.some(testSome));
Expect.equals(true, filtered.some(testSome));
- filtered.remove(4);
+ Expect.equals(true, filtered.remove(4));
Expect.equals(false, filtered.some(testSome));
// Test Set.intersection.
@@ -161,7 +161,7 @@ class SetTest {
// Test Set.clear.
set.clear();
Expect.equals(0, set.length);
- set.add(11);
+ Expect.equals(true, set.add(11));
Expect.equals(1, set.length);
}
}
« no previous file with comments | « corelib/src/set.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698