summaryrefslogtreecommitdiff
path: root/src/pkg/fmt/fmt_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/fmt/fmt_test.go')
-rw-r--r--src/pkg/fmt/fmt_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/fmt/fmt_test.go b/src/pkg/fmt/fmt_test.go
index 758fc50d0..de0342967 100644
--- a/src/pkg/fmt/fmt_test.go
+++ b/src/pkg/fmt/fmt_test.go
@@ -461,6 +461,9 @@ var fmttests = []struct {
// zero reflect.Value, which formats as <nil>.
// This test is just to check that it shows the two NaNs at all.
{"%v", map[float64]int{math.NaN(): 1, math.NaN(): 2}, "map[NaN:<nil> NaN:<nil>]"},
+
+ // Used to crash because nByte didn't allow for a sign.
+ {"%b", int64(-1 << 63), "-1000000000000000000000000000000000000000000000000000000000000000"},
}
func TestSprintf(t *testing.T) {