Skip to content

Commit b07b9a8

Browse files
committed
Create n-th-tribonacci-number_test.go
1 parent f2edead commit b07b9a8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

n-th-tribonacci-number_test.go

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package leetcode_solutions_golang
2+
3+
import "testing"
4+
5+
func Test_tribonacci(t *testing.T) {
6+
type args struct {
7+
n int
8+
}
9+
tests := []struct {
10+
name string
11+
args args
12+
want int
13+
}{
14+
{
15+
name: "test case 1",
16+
args: args{
17+
n: 37,
18+
},
19+
want: 2082876103,
20+
},
21+
}
22+
for _, tt := range tests {
23+
t.Run(tt.name, func(t *testing.T) {
24+
if got := tribonacci(tt.args.n); got != tt.want {
25+
t.Errorf("tribonacci() = %v, want %v", got, tt.want)
26+
}
27+
})
28+
}
29+
}

0 commit comments

Comments
 (0)