public void set_has_correct_content_after_adding_set(IntSet set, IntSet other) { MutableIntSet editedSet = set.EditCopy(); editedSet.AddAll(other); Assert.IsTrue(editedSet.IsSupersetOf(other)); Assert.IsTrue(set.Union(other).SetEquals(editedSet)); IntSet result = editedSet.CompleteAndDestroy(); Assert.IsTrue(result.IsSupersetOf(other)); Assert.IsTrue(set.Union(other).SetEquals(result)); }
public void addall_with_set_of_different_size(IntSet set) { var otherSetType = new BitSetType(10); var other = otherSetType.Of(2, 5, 9); MutableIntSet editedSet = set.EditCopy(); editedSet.AddAll(other); Assert.IsTrue(editedSet.IsSupersetOf(other)); Assert.IsTrue(set.Union(other).SetEquals(editedSet)); IntSet result = editedSet.CompleteAndDestroy(); Assert.IsTrue(result.IsSupersetOf(other)); Assert.IsTrue(set.Union(other).SetEquals(result)); }