18 lines
421 B
C++
18 lines
421 B
C++
|
#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);
|
||
|
}
|