25 lines
558 B
C++
25 lines
558 B
C++
|
#include "s0017_letter_combinations_of_a_phone_number.hpp"
|
||
|
|
||
|
#include <gtest/gtest.h>
|
||
|
|
||
|
TEST(Problem17, Case1) {
|
||
|
string i{"23"};
|
||
|
vector<string> o{"ad", "bd", "cd", "ae", "be", "ce", "af", "bf", "cf"};
|
||
|
Solution solution;
|
||
|
EXPECT_EQ(solution.letterCombinations(i), o);
|
||
|
}
|
||
|
|
||
|
TEST(Problem17, Case2) {
|
||
|
string i{""};
|
||
|
vector<string> o{};
|
||
|
Solution solution;
|
||
|
EXPECT_EQ(solution.letterCombinations(i), o);
|
||
|
}
|
||
|
|
||
|
TEST(Problem17, Case3) {
|
||
|
string i{"2"};
|
||
|
vector<string> o{"a", "b", "c"};
|
||
|
Solution solution;
|
||
|
EXPECT_EQ(solution.letterCombinations(i), o);
|
||
|
}
|