Sainnhe Park
4ec72db468
All checks were successful
continuous-integration/drone/push Build is passing
20 lines
391 B
C++
20 lines
391 B
C++
#include "s0016_3sum_closest.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(Problem16, Case1) {
|
|
vector<int> nums{-1, 2, 1, -4};
|
|
int target{1};
|
|
int o{2};
|
|
Solution solution;
|
|
EXPECT_EQ(solution.threeSumClosest(nums, target), o);
|
|
}
|
|
|
|
TEST(Problem16, Case2) {
|
|
vector<int> nums{0, 0, 0};
|
|
int target{1};
|
|
int o{0};
|
|
Solution solution;
|
|
EXPECT_EQ(solution.threeSumClosest(nums, target), o);
|
|
}
|