Libraryless. Click here for Pure Java version (3732L/23K).
svoid test_DeepWordIndex() { new DeepWordIndex<S> index; index.add("a", "for (int i = 0; i < 5; i++) {}"); index.add("b", "for (S x : y) {}"); assertEqualsVerbose(ll(pair("a", ll(0))), asList(index.lookupString_withPositions("for (int i = 0", debug := true))); assertEqualsVerbose(ll(pair("a", ll(4))), asList(index.lookupString_withPositions("(int i = 0", debug := true))); }
Began life as a copy of #1029027
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029038 |
Snippet name: | test_DeepWordIndex (OK) |
Eternal ID of this version: | #1029038/7 |
Text MD5: | 980886714d75d566fcb43f26b73f883a |
Transpilation MD5: | 80339db95a06617eaa708df917bc2abd |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-17 14:04:18 |
Source code size: | 392 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 190 / 292 |
Version history: | 6 change(s) |
Referenced in: | [show references] |