-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from OnionGrief/vilenskii/refacts
(#279) Рефакторинг метода to-regex класса FiniteAutomaton
- Loading branch information
Showing
12 changed files
with
205 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
#include "gtest/gtest.h" | ||
#include "gtest/gtest.h" | ||
|
||
#include "InputGenerator/RegexGenerator.h" | ||
#include "Objects/FiniteAutomaton.h" | ||
#include "Objects/Regex.h" | ||
|
||
using std::string; | ||
|
||
TEST(TestCaseName, Test_random_regex_parsing) { | ||
RegexGenerator rg(15, 10, 5, 3); | ||
for (int i = 0; i < 30; i++) { | ||
string str = rg.generate_regex(); | ||
Regex r1(str); | ||
string r1_str = r1.to_txt(); | ||
Regex r2(r1_str); | ||
ASSERT_EQ(true, Regex::equivalent(r1, r2)); | ||
} | ||
} | ||
|
||
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())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.