Skip to content

Commit

Permalink
(#279) тест на генерируемых регулярках
Browse files Browse the repository at this point in the history
все проходит 👍
(думаю, лишние скобки, возникающие из-за повсеместных конкатенций с eps, мы переживем)
  • Loading branch information
mathhyyn committed Nov 24, 2023
1 parent 4bd2149 commit 9edefbc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/UnitTestsApp/src/UnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,15 @@ TEST(TestArden, Test_to_regex_equivalence) {
test_equivalence("(((((a*)((a*)|bb)(((|||((b)))))))))");
}

TEST(TestArden, Test_arden_on_random_regex) {
RegexGenerator rg;
for (int i = 0; i < 30; i++) {
string rgx_str = rg.generate_regex();
Regex r1(rgx_str), r2(rgx_str);
ASSERT_TRUE(Regex::equivalent(r1, r2.to_ilieyu().to_regex()));
}
}

TEST(TestCaseName, Test_pump_length) {
ASSERT_EQ(Regex("abaa").pump_length(), 5);
}
Expand Down

0 comments on commit 9edefbc

Please sign in to comment.