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

20
LINES

< > BotCompany Repo | #1013109 // Test indexOfSearchingFromMiddleIC (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (1896L/13K).

!7

p {
  for n to 11:
    assertEquals(-1, indexOfSearchingFromMiddleIC(rep(n, ""), "bla"));
    
  for n to 11:
    for i to n: {
      L<S> l = setAndReturnList(rep(n, ""), i, "BLA");
      printStruct(l);
      assertEquals(i, indexOfSearchingFromMiddleIC(l, "bla"));
    }
    
  assertEquals(1, indexOfSearchingFromMiddleIC(rep(3, "a"), "a"));
  assertBetween(1, 2, indexOfSearchingFromMiddleIC(rep(4, "a"), "a"));
  assertEquals(2, indexOfSearchingFromMiddleIC(rep(5, "a"), "a"));
  assertBetween(2, 3, indexOfSearchingFromMiddleIC(rep(6, "a"), "a"));
  
  print("OK");
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1013109
Snippet name: Test indexOfSearchingFromMiddleIC (OK)
Eternal ID of this version: #1013109/8
Text MD5: eb72772791b9b36da6d6bef4f5e04d12
Transpilation MD5: ee14b2e65c9f1b99237b0137fddf83e9
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-25 21:54:57
Source code size: 597 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 407 / 1079
Version history: 7 change(s)
Referenced in: [show references]