Files
codekata-golang/20201217/main_test.go
2020-12-17 08:59:15 +08:00

40 lines
540 B
Go

package main
import "testing"
func Test_process(t *testing.T) {
type args struct {
g []int
s []int
}
tests := []struct {
name string
args args
want int
}{
{
"test1",
args{
g: []int{1, 2, 3},
s: []int{1, 1},
},
1,
},
{
"test2",
args{
g: []int{1, 2},
s: []int{1, 2, 3},
},
2,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := process(tt.args.g, tt.args.s); got != tt.want {
t.Errorf("process() = %v, want %v", got, tt.want)
}
})
}
}