leetcode/tests/s0518_coin_change_ii.cpp

28 lines
556 B
C++
Raw Normal View History

2023-02-09 09:06:22 +00:00
#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);
}