Libraryless. Click here for Pure Java version (5532L/31K).
sclass TestFindEndOfBlockFunction { swappable int functionToTest(LS tok, int i) { throw unimplemented(); } int n = 20, repetitions = 1000; LS tok; run { repeat repetitions { tok = javaTok(repF(n, -> tossCoin() ? "{" : "}")); print(join(tok)); int i = random(l(tok)) | 1; assertEqualsVerbose("i=" + i, tok_findEndOfBlock(tok, i), functionToTest(tok, i)); } print("OK after " + nRepetitions(repetitions)); } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034667 |
Snippet name: | TestFindEndOfBlockFunction |
Eternal ID of this version: | #1034667/5 |
Text MD5: | ce7bafb90fd208ffb34afda31a8149c3 |
Transpilation MD5: | 65d8ef7eaf37d36643e7538285d88221 |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-01 15:59:12 |
Source code size: | 474 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 106 / 199 |
Version history: | 4 change(s) |
Referenced in: | [show references] |