leetcode/tests/s0014_longest_common_prefix.cpp
Sainnhe Park 20463a604d
All checks were successful
continuous-integration/drone/push Build is passing
s0014
2022-11-03 16:27:54 +08:00

18 lines
388 B
C++

#include "s0014_longest_common_prefix.hpp"
#include <gtest/gtest.h>
TEST(Problem14, Case1) {
vector<string> i{"flower","flow","flight"};
string o{"fl"};
Solution solution;
EXPECT_EQ(solution.longestCommonPrefix(i), o);
}
TEST(Problem14, Case2) {
vector<string> i{"dog","racecar","car"};
string o{""};
Solution solution;
EXPECT_EQ(solution.longestCommonPrefix(i), o);
}