leetcode/tests/s0518_coin_change_ii.cpp

28 lines
556 B
C++

#include "s0518_coin_change_ii.hpp"
#include <gtest/gtest.h>
TEST(Problem518, Case1) {
vector<int> coins{1, 2, 5};
int amount{5};
int expected{4};
S0518 solution;
EXPECT_EQ(solution.change(amount, coins), expected);
}
TEST(Problem518, Case2) {
vector<int> coins{2};
int amount{3};
int expected{0};
S0518 solution;
EXPECT_EQ(solution.change(amount, coins), expected);
}
TEST(Problem518, Case3) {
vector<int> coins{10};
int amount{10};
int expected{1};
S0518 solution;
EXPECT_EQ(solution.change(amount, coins), expected);
}