leetcode/tests/s0503_next_greater_element_ii.cpp

18 lines
421 B
C++
Raw Normal View History

2022-12-16 08:12:04 +00:00
#include "s0503_next_greater_element_ii.hpp"
#include <gtest/gtest.h>
TEST(Problem503, Case1) {
vector<int> nums{1, 2, 1};
vector<int> expected{2, -1, 2};
S0503 solution;
EXPECT_EQ(solution.nextGreaterElements(nums), expected);
}
TEST(Problem503, Case2) {
vector<int> nums{1, 2, 3, 4, 3};
vector<int> expected{2, 3, 4, -1, 4};
S0503 solution;
EXPECT_EQ(solution.nextGreaterElements(nums), expected);
}