leetcode/tests/s0020_valid_parentheses.cpp
Sainnhe Park 955655bb0f
All checks were successful
continuous-integration/drone/push Build is passing
s0020
2022-11-04 17:22:15 +08:00

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);
}