mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
strconv: add a test case when base is illegal
Increase unit test coverage of strconv/itoa.go from 83.8% to 85%
Change-Id: I0abdfc70a3f06251106f229c12ffb105eeb43fc8
GitHub-Last-Rev: da9755368b
GitHub-Pull-Request: golang/go#55014
Reviewed-on: https://go-review.googlesource.com/c/go/+/430137
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
This commit is contained in:
parent
f6436c60e4
commit
95ec579eb6
|
@ -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 a new issue