Files
codekata-golang/20201211/main_test.go
2020-12-11 10:19:38 +08:00

40 lines
516 B
Go

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