Libraryless. Click here for Pure Java version (2698L/17K).
1 | svoid testFullTextSearcher(SS texts, S query, IF1<S, Iterable<S>> searcher, TimeCollector tc, int repetitions) { |
2 | Cl<S> solution = asSet(keysWhereValueContainsString(query, texts)); |
3 | print("Solution: " + l(solution)); |
4 | repeat repetitions { |
5 | long time = nanos(); |
6 | Cl<S> result = asCollection(searcher.get(query)); |
7 | tc.addNanos(nanos()-time); |
8 | Set<S> diff = setDiff_bothWays(solution, result); |
9 | //print("result: " + l(result) + ", diff: " + l(diff)); |
10 | for (S s : diff) |
11 | fail("Searcher " + searcher + " was wrong on " + s); |
12 | } |
13 | } |
Began life as a copy of #1028992
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: | #1028997 |
Snippet name: | testFullTextSearcher |
Eternal ID of this version: | #1028997/11 |
Text MD5: | a501484f57c687aaaa1adbcaf091d107 |
Transpilation MD5: | 07ba3bae87ad39bb537b018305f5ac3f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-16 18:54:19 |
Source code size: | 564 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 215 / 320 |
Version history: | 10 change(s) |
Referenced in: | [show references] |