leetcode/tests/s0076_minimum_window_substring.cpp
2022-11-30 18:20:36 +08:00

28 lines
548 B
C++

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