Skip to content

Commit 32a0224

Browse files
committed
Add more tests for IndexSet conformance to SetAlgebra
1 parent 39d7dd2 commit 32a0224

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/1_stdlib/TestIndexSet.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,12 @@ class TestIndexSet : TestIndexSetSuper {
516516
expectEqual(expected, is1.symmetricDifference(is2))
517517
expectEqual(expected, is2.symmetricDifference(is1))
518518
}
519+
520+
do {
521+
is1 = IndexSet([0, 2])
522+
is2 = IndexSet([0, 1, 2])
523+
expectEqual(IndexSet(integer: 1), is1.symmetricDifference(is2))
524+
}
519525
}
520526

521527
func testIntersection() {
@@ -587,7 +593,12 @@ class TestIndexSet : TestIndexSetSuper {
587593
expectEqual(expected, is1.intersection(is2))
588594
expectEqual(expected, is2.intersection(is1))
589595
}
590-
596+
597+
do {
598+
is1 = IndexSet([0, 2])
599+
is2 = IndexSet([0, 1, 2])
600+
expectEqual(is1, is1.intersection(is2))
601+
}
591602
}
592603

593604
func testUnion() {

0 commit comments

Comments
 (0)