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

7
LINES

< > BotCompany Repo | #1030506 - test_indexOfRangePredicate (OK)

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

Libraryless. Click here for Pure Java version (2996L/18K).

svoid test_indexOfRangePredicate(int maxLength default 8) {
  for (S word : allWordsOfAlphabet_maxLength(maxLength, "ft")) {
    L<Bool> l = map(characters(word), c -> c == 't');
    assertEqualsVerbose(word, smartIndexOf(l, true),
      indexOfRangePredicate(l(l), (i, j) -> any(subList(l, i, j))));
  }
}

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1030506
Snippet name: test_indexOfRangePredicate (OK)
Eternal ID of this version: #1030506/5
Text MD5: dc6b81fab687f8346ef6456bcb9fc526
Transpilation MD5: 70ad9f537dcd73e7a54a661380152d5e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-01-02 17:46:09
Source code size: 312 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 32 / 61
Version history: 4 change(s)
Referenced in: [show references]

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