Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1030400 - test_LongTreeSet (OK)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3256L/21K).

svoid test_LongTreeSet() {
  L<Long> list = repF(1000, () -> randomLong());
  Set<Long> set = asTreeSet(list);
  LongTreeSet cset = new(set);
  print(set);
  print(cset);
  assertEquals(asList(set), asList(cset));
  assertEqualsVerbose(l(set), cset.size());
  
  for (Long a : shuffledIterator(list)) {
    set.remove(a);
    cset.remove(a);
    assertEquals(asList(set), asList(cset));
    assertEqualsVerbose(l(set), cset.size());
  }
}

Author comment

Began life as a copy of #1029167

download  show line numbers  debug dex   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1030400
Snippet name: test_LongTreeSet (OK)
Eternal ID of this version: #1030400/3
Text MD5: f5779303712f151c06ba9cd88f0479e2
Transpilation MD5: d52f40fb1e874bf794336ea19d9e0dbf
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-13 02:07:05
Source code size: 453 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 30 / 59
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1030400 & http://1030400.tinybrain.de