92: Square digit chains

This commit is contained in:
VicRen
2020-12-27 17:42:49 +08:00
parent 4b3b8cbfae
commit 116e0e4f66
2 changed files with 63 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
package main
import "testing"
func Test_goChain(t *testing.T) {
type args struct {
n int
}
tests := []struct {
name string
args args
want bool
}{
{
"test1",
args{44},
false,
},
{
"test2",
args{85},
true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := goChain(tt.args.n); got != tt.want {
t.Errorf("goChain() = %v, want %v", got, tt.want)
}
})
}
}