32 lines
543 B
C++
32 lines
543 B
C++
#include "s0020_valid_parentheses.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(Problem20, Case1) {
|
|
string i{"()"};
|
|
bool o{true};
|
|
S0020 solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|
|
|
|
TEST(Problem20, Case2) {
|
|
string i{"()[]{}"};
|
|
bool o{true};
|
|
S0020 solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|
|
|
|
TEST(Problem20, Case3) {
|
|
string i{"(]"};
|
|
bool o{false};
|
|
S0020 solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|
|
|
|
TEST(Problem20, Case4) {
|
|
string i{"(){}}{"};
|
|
bool o{false};
|
|
S0020 solution;
|
|
EXPECT_EQ(solution.isValid(i), o);
|
|
}
|