20 lines
485 B
C++
20 lines
485 B
C++
|
#include "s0496_next_greater_element_i.hpp"
|
||
|
|
||
|
#include <gtest/gtest.h>
|
||
|
|
||
|
TEST(Problem496, Case1) {
|
||
|
vector<int> nums1{4, 1, 2};
|
||
|
vector<int> nums2{1, 3, 4, 2};
|
||
|
vector<int> expected{-1, 3, -1};
|
||
|
S0496 solution;
|
||
|
EXPECT_EQ(solution.nextGreaterElement(nums1, nums2), expected);
|
||
|
}
|
||
|
|
||
|
TEST(Problem496, Case2) {
|
||
|
vector<int> nums1{2, 4};
|
||
|
vector<int> nums2{1, 2, 3, 4};
|
||
|
vector<int> expected{3, -1};
|
||
|
S0496 solution;
|
||
|
EXPECT_EQ(solution.nextGreaterElement(nums1, nums2), expected);
|
||
|
}
|