summaryrefslogtreecommitdiff
path: root/src/lib/strconv/itoa_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-02-13 14:48:32 -0800
committerRuss Cox <rsc@golang.org>2009-02-13 14:48:32 -0800
commit526837026995aa88a05eb73f83f8573d5c024882 (patch)
treea3b6c6ab9f68981976738f0efc7988353d5a0d82 /src/lib/strconv/itoa_test.go
parentc2feca8a8dd68958c476a71b1e07b5cf43421a98 (diff)
downloadgolang-526837026995aa88a05eb73f83f8573d5c024882.tar.gz
convert composite literals from { } to ( ).
only non-trivial changes are in convlit1.go golden.out R=gri OCL=25019 CL=25024
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" ),
+)