diff --git a/src/strconv/itoa_test.go b/src/strconv/itoa_test.go index b5ee3aa828..b8bc52490a 100644 --- a/src/strconv/itoa_test.go +++ b/src/strconv/itoa_test.go @@ -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 {