mirror of
https://github.com/cubixle/codekata-golang.git
synced 2026-04-30 14:38:47 +01:00
20201113
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func Test_isCompliance(t *testing.T) {
|
||||
type args struct {
|
||||
nums []int
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
"example_1",
|
||||
args{[]int{4, 2, 3}},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"example_2",
|
||||
args{[]int{4, 2, 1}},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := isCompliance(tt.args.nums); got != tt.want {
|
||||
t.Errorf("isCompliance() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user