Index: tests/corelib/set_test.dart |
diff --git a/tests/corelib/set_test.dart b/tests/corelib/set_test.dart |
index 55e7250aa99b76acc296a0933df0459fd8d2fe88..9900bb809d63ea4f7ac34a80fd39afae3b27f2f3 100644 |
--- a/tests/corelib/set_test.dart |
+++ b/tests/corelib/set_test.dart |
@@ -166,6 +166,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++) { |