summaryrefslogtreecommitdiff
path: root/src/lib/strconv/itoa_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/strconv/itoa_test.go')
-rw-r--r--src/lib/strconv/itoa_test.go60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/lib/strconv/itoa_test.go b/src/lib/strconv/itoa_test.go
index e965a1c16..7a2f86b6c 100644
--- a/src/lib/strconv/itoa_test.go
+++ b/src/lib/strconv/itoa_test.go
@@ -16,29 +16,29 @@ type itoa64Test struct {
out string;
}
-var itoa64tests = []itoa64Test {
- itoa64Test{ 0, "0" },
- itoa64Test{ 1, "1" },
- itoa64Test{ -1, "-1" },
- itoa64Test{ 12345678, "12345678" },
- itoa64Test{ -987654321, "-987654321" },
- itoa64Test{ 1<<31-1, "2147483647" },
- itoa64Test{ -1<<31+1, "-2147483647" },
- itoa64Test{ 1<<31, "2147483648" },
- itoa64Test{ -1<<31, "-2147483648" },
- itoa64Test{ 1<<31+1, "2147483649" },
- itoa64Test{ -1<<31-1, "-2147483649" },
- itoa64Test{ 1<<32-1, "4294967295" },
- itoa64Test{ -1<<32+1, "-4294967295" },
- itoa64Test{ 1<<32, "4294967296" },
- itoa64Test{ -1<<32, "-4294967296" },
- itoa64Test{ 1<<32+1, "4294967297" },
- itoa64Test{ -1<<32-1, "-4294967297" },
- itoa64Test{ 1<<50, "1125899906842624" },
- itoa64Test{ 1<<63-1, "9223372036854775807" },
- itoa64Test{ -1<<63+1, "-9223372036854775807" },
- itoa64Test{ -1<<63, "-9223372036854775808" },
-}
+var itoa64tests = []itoa64Test (
+ itoa64Test( 0, "0" ),
+ itoa64Test( 1, "1" ),
+ itoa64Test( -1, "-1" ),
+ itoa64Test( 12345678, "12345678" ),
+ itoa64Test( -987654321, "-987654321" ),
+ itoa64Test( 1<<31-1, "2147483647" ),
+ itoa64Test( -1<<31+1, "-2147483647" ),
+ itoa64Test( 1<<31, "2147483648" ),
+ itoa64Test( -1<<31, "-2147483648" ),
+ itoa64Test( 1<<31+1, "2147483649" ),
+ itoa64Test( -1<<31-1, "-2147483649" ),
+ itoa64Test( 1<<32-1, "4294967295" ),
+ itoa64Test( -1<<32+1, "-4294967295" ),
+ itoa64Test( 1<<32, "4294967296" ),
+ itoa64Test( -1<<32, "-4294967296" ),
+ itoa64Test( 1<<32+1, "4294967297" ),
+ itoa64Test( -1<<32-1, "-4294967297" ),
+ itoa64Test( 1<<50, "1125899906842624" ),
+ itoa64Test( 1<<63-1, "9223372036854775807" ),
+ itoa64Test( -1<<63+1, "-9223372036854775807" ),
+ itoa64Test( -1<<63, "-9223372036854775808" ),
+)
func TestItoa(t *testing.T) {
for i := 0; i < len(itoa64tests); i++ {
@@ -65,11 +65,11 @@ type uitoa64Test struct {
}
// TODO: should be able to call this atoui64tests.
-var uitoa64tests = []uitoa64Test {
- uitoa64Test{ 1<<63-1, "9223372036854775807" },
- uitoa64Test{ 1<<63, "9223372036854775808" },
- uitoa64Test{ 1<<63+1, "9223372036854775809" },
- uitoa64Test{ 1<<64-2, "18446744073709551614" },
- uitoa64Test{ 1<<64-1, "18446744073709551615" },
-}
+var uitoa64tests = []uitoa64Test (
+ uitoa64Test( 1<<63-1, "9223372036854775807" ),
+ uitoa64Test( 1<<63, "9223372036854775808" ),
+ uitoa64Test( 1<<63+1, "9223372036854775809" ),
+ uitoa64Test( 1<<64-2, "18446744073709551614" ),
+ uitoa64Test( 1<<64-1, "18446744073709551615" ),
+)