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

9
LINES

< > BotCompany Repo | #1029427 // test_LCSortedPairIndex

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

Libraryless. Click here for Pure Java version (4469L/29K).

svoid test_LCSortedPairIndex() {
  long pairs[] = toLongArray(shuffled(lmap toLong(ll(500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500))));
  printStruct(pairs);
  LCSortedPairIndex index = new(pairs);
  printStruct(index.index);
  for i over pairs:
    assertEqualsVerbose(i, index.get(pairs[i]));
  assertEquals(-1, index.get(777));
}

Author comment

Began life as a copy of #1029420

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029427
Snippet name: test_LCSortedPairIndex
Eternal ID of this version: #1029427/9
Text MD5: 8df5bcce2630e51d7323d6769fd6a5ad
Transpilation MD5: ed38234f70aad8cb0a40dbc0555736cd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-05 22:11:47
Source code size: 359 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 248 / 370
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)