This commit is contained in:
24
tests/s0010_regular_expression_matching.cpp
Normal file
24
tests/s0010_regular_expression_matching.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "s0010_regular_expression_matching.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(Problem10, Case1) {
|
||||
string s{"aa"};
|
||||
string p{"a"};
|
||||
Solution solution;
|
||||
EXPECT_FALSE(solution.isMatch(s, p));
|
||||
}
|
||||
|
||||
TEST(Problem10, Case2) {
|
||||
string s{"aa"};
|
||||
string p{"a*"};
|
||||
Solution solution;
|
||||
EXPECT_TRUE(solution.isMatch(s, p));
|
||||
}
|
||||
|
||||
TEST(Problem10, Case3) {
|
||||
string s{"ab"};
|
||||
string p{".*"};
|
||||
Solution solution;
|
||||
EXPECT_TRUE(solution.isMatch(s, p));
|
||||
}
|
Reference in New Issue
Block a user