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

Function Test_combinationSum4

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

Source from the content-addressed store, hash-verified

6)
7
8func Test_combinationSum4(t *testing.T) {
9 type args struct {
10 nums []int
11 target int
12 }
13 tests := []struct {
14 name string
15 args args
16 want int
17 }{
18 {
19 name: "combination sum iv",
20 args: args{
21 nums: []int{
22 1, 2, 3,
23 },
24 target: 4,
25 },
26 want: 7,
27 },
28 {
29 name: "combination sum iv",
30 args: args{
31 nums: []int{
32 3,
33 },
34 target: 5,
35 },
36 want: 0,
37 },
38 }
39 for _, tt := range tests {
40 t.Run(tt.name, func(t *testing.T) {
41 assert.Equal(t, tt.want, combinationSum4(tt.args.nums, tt.args.target))
42 })
43 }
44}

Callers

nothing calls this directly

Calls 1

combinationSum4Function · 0.85

Tested by

no test coverage detected