leetcode/tests/s0017_letter_combinations_of_a_phone_number.cpp

25 lines
558 B
C++
Raw Normal View History

2022-11-04 07:50:54 +00:00
#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);
}