ng_find_matches: limit how big we're willing to go

Tests which require tracking more than 15K states (including edit
distance states) are very, very slow.
This commit is contained in:
Justin Viiret
2017-03-07 11:47:10 +11:00
committed by Matthew Barr
parent d2416736cb
commit 7ca81ff530
3 changed files with 21 additions and 7 deletions

View File

@@ -212,7 +212,8 @@ TEST_P(MatchesTest, Check) {
bool utf8 = (t.flags & HS_FLAG_UTF8) > 0;
set<pair<size_t, size_t>> matches;
findMatches(*g, rm, t.input, matches, 0, t.notEod, utf8);
bool success = findMatches(*g, rm, t.input, matches, 0, t.notEod, utf8);
ASSERT_TRUE(success);
set<pair<size_t, size_t>> expected(begin(t.matches), end(t.matches));