Skip to content

Commit

Permalink
Oops, not in DeBruijnString() though.
Browse files Browse the repository at this point in the history
Change-Id: I537ddc8e4ffc3cb430813afd338ddd682e1bfcec
Reviewed-on: https://code-review.googlesource.com/24070
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Feb 22, 2018
1 parent 523f71b commit bb093f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions re2/testing/dfa_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ TEST(SingleThreaded, BuildEntireDFA) {
// position in the input, never reusing any states until it gets to the
// end of the string. This is the worst possible case for DFA execution.
static string DeBruijnString(int n) {
ASSERT_LT(n, static_cast<int>(8*sizeof(int)));
ASSERT_GT(n, 0);
CHECK_LT(n, static_cast<int>(8*sizeof(int)));
CHECK_GT(n, 0);

std::vector<bool> did(size_t{1}<<n);
for (int i = 0; i < 1<<n; i++)
Expand All @@ -138,7 +138,7 @@ static string DeBruijnString(int n) {
} else {
s.append("0");
}
ASSERT_FALSE(did[bits]);
CHECK(!did[bits]);
did[bits] = true;
}
return s;
Expand Down

0 comments on commit bb093f1

Please sign in to comment.