leetcode/tests/s0239_sliding_window_maximum.cpp

20 lines
444 B
C++
Raw Normal View History

2022-12-08 13:05:07 +00:00
#include "s0239_sliding_window_maximum.hpp"
#include <gtest/gtest.h>
TEST(Problem239, Case1) {
vector<int> nums{1, 3, -1, -3, 5, 3, 6, 7};
int k{3};
vector<int> expected{3, 3, 5, 5, 6, 7};
S0239 solution;
EXPECT_EQ(solution.maxSlidingWindow(nums, k), expected);
}
TEST(Problem239, Case2) {
vector<int> nums{1};
int k{1};
vector<int> expected{1};
S0239 solution;
EXPECT_EQ(solution.maxSlidingWindow(nums, k), expected);
}