Sainnhe Park
955655bb0f
All checks were successful
continuous-integration/drone/push Build is passing
32 lines
555 B
C++
32 lines
555 B
C++
#include "s0020_valid_parentheses.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(Problem20, Case1) {
|
|
string i{"()"};
|
|
bool o{true};
|
|
Solution solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|
|
|
|
TEST(Problem20, Case2) {
|
|
string i{"()[]{}"};
|
|
bool o{true};
|
|
Solution solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|
|
|
|
TEST(Problem20, Case3) {
|
|
string i{"(]"};
|
|
bool o{false};
|
|
Solution solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|
|
|
|
TEST(Problem20, Case4) {
|
|
string i{"(){}}{"};
|
|
bool o{false};
|
|
Solution solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|