Libraryless. Click here for Pure Java version (4218L/24K).
static <A extends Set<S>> void test_TreeSetDropIn(IF0<A> makeSet, IVF1<A> checkInternalStructure default null) { LS list = repF(1000, () -> randomID(3)); Set<S> 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); } }
Began life as a copy of #1030939
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1032622 |
| Snippet name: | test_TreeSetDropIn [OK] |
| Eternal ID of this version: | #1032622/5 |
| Text MD5: | 4fd2a127fc84af974402312d579759b2 |
| Transpilation MD5: | 828bc2a719b191d93e36cc3a80f0bebd |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-09-29 20:49:39 |
| Source code size: | 574 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 366 / 499 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |