18 lines
384 B
C++
18 lines
384 B
C++
#include "s0416_partition_equal_subset_sum.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(Problem416, Case1) {
|
|
vector<int> nums{1, 5, 11, 5};
|
|
bool expected{true};
|
|
S0416 solution;
|
|
EXPECT_EQ(solution.canPartition(nums), expected);
|
|
}
|
|
|
|
TEST(Problem416, Case2) {
|
|
vector<int> nums{1, 2, 3, 5};
|
|
bool expected{false};
|
|
S0416 solution;
|
|
EXPECT_EQ(solution.canPartition(nums), expected);
|
|
}
|