Libraryless. Click here for Pure Java version (2698L/17K).
svoid testFullTextSearcher(SS texts, S query, IF1<S, Iterable<S>> searcher, TimeCollector tc, int repetitions) { Cl<S> solution = asSet(keysWhereValueContainsString(query, texts)); print("Solution: " + l(solution)); repeat repetitions { long time = nanos(); Cl<S> result = asCollection(searcher.get(query)); tc.addNanos(nanos()-time); Set<S> diff = setDiff_bothWays(solution, result); //print("result: " + l(result) + ", diff: " + l(diff)); for (S s : diff) fail("Searcher " + searcher + " was wrong on " + s); } }
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: | 214 / 318 |
Version history: | 10 change(s) |
Referenced in: | [show references] |