mirror of
https://github.com/golang/go
synced 2024-11-18 08:14:41 -07:00
strconv: add a test case when base is illegal
Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
54182ff54a
commit
da9755368b
@ -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 {
|
type uitob64Test struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user