static > void test_TreeSetDropIn(IF0 makeSet, IVF1 checkInternalStructure default null) {
LS list = repF(1000, () -> randomID(3));
Set set = asTreeSet(list);
A cset = makeSet!;
addAll(cset, set);
print(set);
print(cset);
assertEquals(asList(set), asList(cset));
assertEqualsVerbose(l(set), l(cset));
for (S a : shuffledIterator(list)) {
set.remove(a);
cset.remove(a);
assertEquals(asList(set), asList(cset));
assertEqualsVerbose(l(set), l(cset));
pcallF(checkInternalStructure, cset);
}
}