leetcode/tests/s0076_minimum_window_substring.cpp

28 lines
557 B
C++

#include "s0076_minimum_window_substring.hpp"
#include <gtest/gtest.h>
TEST(Problem76, Case1) {
string s{"ADOBECODEBANC"};
string t{"ABC"};
string expected{"BANC"};
Solution solution;
EXPECT_EQ(solution.minWindow(s, t), expected);
}
TEST(Problem76, Case2) {
string s{"a"};
string t{"a"};
string expected{"a"};
Solution solution;
EXPECT_EQ(solution.minWindow(s, t), expected);
}
TEST(Problem76, Case3) {
string s{"a"};
string t{"aa"};
string expected{""};
Solution solution;
EXPECT_EQ(solution.minWindow(s, t), expected);
}