mirror of
https://github.com/cubixle/codekata-golang.git
synced 2026-04-30 16:48:39 +01:00
refactor 04
This commit is contained in:
@@ -46,3 +46,28 @@ func TestIsPalindrome(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_findMaxPalindrome(t *testing.T) {
|
||||
type args struct {
|
||||
start int
|
||||
end int
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want int
|
||||
}{
|
||||
{
|
||||
"1",
|
||||
args{10, 99},
|
||||
9009,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := findMaxPalindrome(tt.args.start, tt.args.end); got != tt.want {
|
||||
t.Errorf("findMaxPalindrome() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user