This commit is contained in:
24
tests/s0017_letter_combinations_of_a_phone_number.cpp
Normal file
24
tests/s0017_letter_combinations_of_a_phone_number.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user