s0030
This commit is contained in:
19
tests/s0030_substring_with_concatenation_of_all_words.cpp
Normal file
19
tests/s0030_substring_with_concatenation_of_all_words.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "s0030_substring_with_concatenation_of_all_words.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(Problem30, Case1) {
|
||||
string s{"barfoothefoobarman"};
|
||||
vector<string> words{"foo", "bar"};
|
||||
vector<int> o{0, 9};
|
||||
Solution solution;
|
||||
EXPECT_EQ(solution.findSubstring(s, words), o);
|
||||
}
|
||||
|
||||
TEST(Problem30, Case2) {
|
||||
string s{"wordgoodgoodgoodbestword"};
|
||||
vector<string> words{"word","good","best","word"};
|
||||
vector<int> o{};
|
||||
Solution solution;
|
||||
EXPECT_EQ(solution.findSubstring(s, words), o);
|
||||
}
|
Reference in New Issue
Block a user