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