MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Test_coinChange

Function Test_coinChange

coin_change_322/solution_test.go:8–74  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func Test_coinChange(t *testing.T) {
9 type args struct {
10 coins []int
11 amount int
12 }
13 tests := []struct {
14 name string
15 args args
16 want int
17 }{
18 {
19 name: "coin change",
20 args: args{
21 coins: []int{
22 1, 2,
23 },
24 amount: 3,
25 },
26 want: 2,
27 },
28 {
29 name: "coin change",
30 args: args{
31 coins: []int{
32 1, 2, 5,
33 },
34 amount: 11,
35 },
36 want: 3,
37 },
38 {
39 name: "coin change",
40 args: args{
41 coins: []int{
42 1, 2,
43 },
44 amount: 3,
45 },
46 want: 2,
47 },
48 {
49 name: "coin change",
50 args: args{
51 coins: []int{
52 3,
53 },
54 amount: 1,
55 },
56 want: -1,
57 },
58 {
59 name: "coin change",
60 args: args{
61 coins: []int{
62 186, 419, 83, 408,
63 },
64 amount: 6249,
65 },

Callers

nothing calls this directly

Calls 1

coinChangeFunction · 0.85

Tested by

no test coverage detected