leetcode/tests/s0496_next_greater_element_i.cpp
Sainnhe Park 39bb8ffc36
All checks were successful
continuous-integration/drone/push Build is passing
s0496
2022-12-16 15:45:21 +08:00

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);
}