This commit is contained in:
19
tests/s0496_next_greater_element_i.cpp
Normal file
19
tests/s0496_next_greater_element_i.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user