Libraryless. Click here for Pure Java version (4256L/27K).
svoid stresstest_PositionalTokenIndex() { for n1 to 5: for n2 to 5: for n3 to 5: { printVars(+n1, +n2, +n3); int rand = 0; new PositionalTokenIndex idx; new LS l; for i to n1: l.add("a " + rand++); for i to n2: l.add("b " + rand++); for i to n3: l.add("c " + rand++); idx.addAll(map wordTok(l)); printStruct(idx); LS out = map second(idx.byToken(0, "b")); assertEqualsVerbose(n2, l(out)); if (n2 != 0) assertEquals(litciset("b"), asCISet(out)); } }
Began life as a copy of #1025689
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025693 |
Snippet name: | stresstest_PositionalTokenIndex |
Eternal ID of this version: | #1025693/4 |
Text MD5: | ea1108de90ff821b5bfb5f82f05489b3 |
Transpilation MD5: | edba27099dbefde3406f0f750d9be88e |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-13 22:22:24 |
Source code size: | 590 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 207 / 320 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |