Index: tests/corelib_2/set_test.dart |
diff --git a/tests/corelib_strong/set_test.dart b/tests/corelib_2/set_test.dart |
similarity index 97% |
rename from tests/corelib_strong/set_test.dart |
rename to tests/corelib_2/set_test.dart |
index 35af9f76e7ee56cc1a424e2bb987a680b7143612..fb5d4fa308c1739c8f2577c814f8500620c63ca5 100644 |
--- a/tests/corelib_strong/set_test.dart |
+++ b/tests/corelib_2/set_test.dart |
@@ -165,6 +165,17 @@ void testInts(Set create()) { |
} |
Expect.isTrue(twice.difference(thrice).difference(twice).isEmpty); |
+ // Test Set.difference with non-element type. |
+ Set diffSet = create()..addAll([0, 1, 2, 499, 999]); |
+ Set<Object> objectSet = new Set<Object>(); |
+ objectSet.add("foo"); |
+ objectSet.add(499); |
+ Set diffResult = diffSet.difference(objectSet); |
+ Expect.equals(4, diffResult.length); |
+ for (int value in [0, 1, 2, 999]) { |
+ Expect.isTrue(diffResult.contains(value)); |
+ } |
+ |
// Test Set.addAll. |
List list = new List(10); |
for (int i = 0; i < 10; i++) { |