s0022
This commit is contained in:
24
tests/s0022_generate_parentheses.cpp
Normal file
24
tests/s0022_generate_parentheses.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "s0022_generate_parentheses.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(Problem22, Case1) {
|
||||
int i{3};
|
||||
vector<string> o{"((()))", "(()())", "(())()", "()(())", "()()()"};
|
||||
Solution solution;
|
||||
EXPECT_EQ(solution.generateParenthesis(i), o);
|
||||
}
|
||||
|
||||
TEST(Problem22, Case2) {
|
||||
int i{1};
|
||||
vector<string> o{"()"};
|
||||
Solution solution;
|
||||
EXPECT_EQ(solution.generateParenthesis(i), o);
|
||||
}
|
||||
|
||||
TEST(Problem22, Case3) {
|
||||
int i{4};
|
||||
vector<string> o{"(((())))","((()()))","((())())","((()))()","(()(()))","(()()())","(()())()","(())(())","(())()()","()((()))","()(()())","()(())()","()()(())","()()()()"};
|
||||
Solution solution;
|
||||
EXPECT_EQ(solution.generateParenthesis(i), o);
|
||||
}
|
Reference in New Issue
Block a user