svoid test_LCSearcher_v1_systematically(int max, O... _) { optPar bool verbose; for (int n = 0; n <= max; n++) { print("Testing length " + n); for (S text : allABCCombinationsOfLength(n)) { //print(+text); for (int j = 1; j <= n+1; j++) for (S query : allABCCombinationsOfLength(j)) { Pair, S> output = hijackPrintWithResult(() -> { new LCSearcher_v1 searcher; searcher.text = text; ret searcher.search(query); }); L correct = indicesOf(text, query); L out = sorted(output.a); if (eq(correct, out)) { if (verbose) print("OK " + query + " in " + text + ": " + out); } else { print(output); fail(query + " in " + text + ": " + out + " / " + correct); } } } } }