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