From 0668b595b604a4bd3e5327bd14ffd71cfa7dbc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mo=CC=88hrmann?= Date: Sat, 27 Dec 2014 11:53:09 +0100 Subject: [PATCH] strconv/itoa: add test to generate the longest output string possible by formatBits The new test case produces the longest string representation possible and thereby uses all of the 65 bytes in the buffer array used by the formatBits function. Change-Id: I11320c4de56ced5ff098b7e37f1be08e456573e2 Reviewed-on: https://go-review.googlesource.com/2108 Reviewed-by: Brad Fitzpatrick --- src/strconv/itoa_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/strconv/itoa_test.go b/src/strconv/itoa_test.go index e0213ae9af..48dc03e839 100644 --- a/src/strconv/itoa_test.go +++ b/src/strconv/itoa_test.go @@ -51,6 +51,7 @@ var itob64tests = []itob64Test{ {-0x123456789abcdef, 16, "-123456789abcdef"}, {1<<63 - 1, 16, "7fffffffffffffff"}, {1<<63 - 1, 2, "111111111111111111111111111111111111111111111111111111111111111"}, + {-1 << 63, 2, "-1000000000000000000000000000000000000000000000000000000000000000"}, {16, 17, "g"}, {25, 25, "10"},