Libraryless. Click here for Pure Java version (4256L/27K).
1 | svoid stresstest_PositionalTokenIndex() {
|
2 | for n1 to 5: |
3 | for n2 to 5: |
4 | for n3 to 5: {
|
5 | printVars(+n1, +n2, +n3); |
6 | int rand = 0; |
7 | new PositionalTokenIndex idx; |
8 | new LS l; |
9 | for i to n1: l.add("a " + rand++);
|
10 | for i to n2: l.add("b " + rand++);
|
11 | for i to n3: l.add("c " + rand++);
|
12 | idx.addAll(map wordTok(l)); |
13 | printStruct(idx); |
14 | LS out = map second(idx.byToken(0, "b")); |
15 | assertEqualsVerbose(n2, l(out)); |
16 | if (n2 != 0) |
17 | assertEquals(litciset("b"), asCISet(out));
|
18 | } |
19 | } |
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: | 416 / 569 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |