diff --git a/re2/testing/re2_test.cc b/re2/testing/re2_test.cc index ae101d34bbd0906be66a92308c2d796ef6fa15ff..df4a45152feedba6f292c27a8e33b8908f5033fc 100644 --- a/re2/testing/re2_test.cc +++ b/re2/testing/re2_test.cc @@ -1622,27 +1622,6 @@ TEST(RE2, Bug21371806) { ASSERT_TRUE(re.ok()); } -/*待处理的 -TEST(RE2, Bug26356109) { - // Bug in parser caused by factoring of common prefixes in alternations. - - // In the past, this was factored to "a\\C*?[bc]". Thus, the automaton would - // consume "ab" and then stop (when unanchored) whereas it should consume all - // of "abc" as per first-match semantics. - RE2 re("a\\C*?c|a\\C*?b"); - ASSERT_TRUE(re.ok()); - - std::string s = "abc"; - StringPiece m; - - ASSERT_TRUE(re.Match(s, 0, s.size(), RE2::UNANCHORED, &m, 1)); - ASSERT_EQ(m, s) << " (UNANCHORED) got m='" << m << "', want '" << s << "'"; - - ASSERT_TRUE(re.Match(s, 0, s.size(), RE2::ANCHOR_BOTH, &m, 1)); - ASSERT_EQ(m, s) << " (ANCHOR_BOTH) got m='" << m << "', want '" << s << "'"; -} -*/ - TEST(RE2, Issue104) { // RE2::GlobalReplace always advanced by one byte when the empty string was // matched, which would clobber any rune that is longer than one byte. @@ -1660,21 +1639,4 @@ TEST(RE2, Issue104) { ASSERT_EQ("小人小类小", s); } -/*待处理的 -TEST(RE2, Issue310) { - // (?:|a)* matched more text than (?:|a)+ did. - - std::string s = "aaa"; - StringPiece m; - - RE2 star("(?:|a)*"); - ASSERT_TRUE(star.Match(s, 0, s.size(), RE2::UNANCHORED, &m, 1)); - ASSERT_EQ(m, "") << " got m='" << m << "', want ''"; - - RE2 plus("(?:|a)+"); - ASSERT_TRUE(plus.Match(s, 0, s.size(), RE2::UNANCHORED, &m, 1)); - ASSERT_EQ(m, "") << " got m='" << m << "', want ''"; -} -*/ - } // namespace re2