rename directory

This commit is contained in:
VicRen
2020-10-22 14:04:57 +08:00
parent 66813aa5ca
commit acfe8ce353
18 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package main
import "testing"
func TestIsPrime(t *testing.T) {
tt := []struct {
name string
input int
want bool
}{
{
"1",
1,
false,
},
{
"2",
2,
true,
},
{
"10",
10,
false,
},
{
"17",
17,
true,
},
{
"97",
97,
true,
},
}
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
got := IsPrime(tc.input)
if got != tc.want {
t.Errorf("IsPrime(%d)=%v, want %v", tc.input, got, tc.want)
}
})
}
}