1
0
mirror of https://github.com/golang/go synced 2024-09-30 12:08:32 -06:00

strconv: add a test case when base is illegal

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2022-09-12 17:11:51 +08:00
parent 54182ff54a
commit da9755368b

View File

@ -93,6 +93,14 @@ func TestItoa(t *testing.T) {
}
}
}
// Override when base is illegal
defer func() {
if r := recover(); r == nil {
t.Fatalf("expected panic due to illegal base")
}
}()
FormatUint(12345678, 1)
}
type uitob64Test struct {