Repeated Substring Pattern
This commit is contained in:
31
tests/s0459_repeated_substring_pattern.cpp
Normal file
31
tests/s0459_repeated_substring_pattern.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "s0459_repeated_substring_pattern.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(Problem459, Case1) {
|
||||
string s{"abab"};
|
||||
bool expected{true};
|
||||
S0459 solution;
|
||||
EXPECT_EQ(solution.repeatedSubstringPattern(s), expected);
|
||||
}
|
||||
|
||||
TEST(Problem459, Case2) {
|
||||
string s{"aba"};
|
||||
bool expected{false};
|
||||
S0459 solution;
|
||||
EXPECT_EQ(solution.repeatedSubstringPattern(s), expected);
|
||||
}
|
||||
|
||||
TEST(Problem459, Case3) {
|
||||
string s{"abcabcabcabc"};
|
||||
bool expected{true};
|
||||
S0459 solution;
|
||||
EXPECT_EQ(solution.repeatedSubstringPattern(s), expected);
|
||||
}
|
||||
|
||||
TEST(Problem459, Case4) {
|
||||
string s{"abac"};
|
||||
bool expected{false};
|
||||
S0459 solution;
|
||||
EXPECT_EQ(solution.repeatedSubstringPattern(s), expected);
|
||||
}
|
Reference in New Issue
Block a user