diff options
author | Robert Griesemer <gri@golang.org> | 2010-10-22 10:06:33 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2010-10-22 10:06:33 -0700 |
commit | 6c22ffd9563a8a2fba03d4183ee58c4cc266d2f1 (patch) | |
tree | e4dba91379ab8226fc4402e917c759682efea859 /src/pkg/strconv/itoa_test.go | |
parent | 92e109e978267c447be0fd18141ea591d5019f47 (diff) | |
download | go-6c22ffd9563a8a2fba03d4183ee58c4cc266d2f1.tar.gz |
gofmt -s -w src misc
R=r, rsc
CC=golang-dev
http://codereview.appspot.com/2662041
Diffstat (limited to 'src/pkg/strconv/itoa_test.go')
-rw-r--r-- | src/pkg/strconv/itoa_test.go | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/pkg/strconv/itoa_test.go b/src/pkg/strconv/itoa_test.go index 8333e6c00..8514b21e4 100644 --- a/src/pkg/strconv/itoa_test.go +++ b/src/pkg/strconv/itoa_test.go @@ -16,46 +16,46 @@ type itob64Test struct { } var itob64tests = []itob64Test{ - itob64Test{0, 10, "0"}, - itob64Test{1, 10, "1"}, - itob64Test{-1, 10, "-1"}, - itob64Test{12345678, 10, "12345678"}, - itob64Test{-987654321, 10, "-987654321"}, - itob64Test{1<<31 - 1, 10, "2147483647"}, - itob64Test{-1<<31 + 1, 10, "-2147483647"}, - itob64Test{1 << 31, 10, "2147483648"}, - itob64Test{-1 << 31, 10, "-2147483648"}, - itob64Test{1<<31 + 1, 10, "2147483649"}, - itob64Test{-1<<31 - 1, 10, "-2147483649"}, - itob64Test{1<<32 - 1, 10, "4294967295"}, - itob64Test{-1<<32 + 1, 10, "-4294967295"}, - itob64Test{1 << 32, 10, "4294967296"}, - itob64Test{-1 << 32, 10, "-4294967296"}, - itob64Test{1<<32 + 1, 10, "4294967297"}, - itob64Test{-1<<32 - 1, 10, "-4294967297"}, - itob64Test{1 << 50, 10, "1125899906842624"}, - itob64Test{1<<63 - 1, 10, "9223372036854775807"}, - itob64Test{-1<<63 + 1, 10, "-9223372036854775807"}, - itob64Test{-1 << 63, 10, "-9223372036854775808"}, - - itob64Test{0, 2, "0"}, - itob64Test{10, 2, "1010"}, - itob64Test{-1, 2, "-1"}, - itob64Test{1 << 15, 2, "1000000000000000"}, - - itob64Test{-8, 8, "-10"}, - itob64Test{057635436545, 8, "57635436545"}, - itob64Test{1 << 24, 8, "100000000"}, - - itob64Test{16, 16, "10"}, - itob64Test{-0x123456789abcdef, 16, "-123456789abcdef"}, - itob64Test{1<<63 - 1, 16, "7fffffffffffffff"}, - itob64Test{1<<63 - 1, 2, "111111111111111111111111111111111111111111111111111111111111111"}, - - itob64Test{16, 17, "g"}, - itob64Test{25, 25, "10"}, - itob64Test{(((((17*35+24)*35+21)*35+34)*35+12)*35+24)*35 + 32, 35, "holycow"}, - itob64Test{(((((17*36+24)*36+21)*36+34)*36+12)*36+24)*36 + 32, 36, "holycow"}, + {0, 10, "0"}, + {1, 10, "1"}, + {-1, 10, "-1"}, + {12345678, 10, "12345678"}, + {-987654321, 10, "-987654321"}, + {1<<31 - 1, 10, "2147483647"}, + {-1<<31 + 1, 10, "-2147483647"}, + {1 << 31, 10, "2147483648"}, + {-1 << 31, 10, "-2147483648"}, + {1<<31 + 1, 10, "2147483649"}, + {-1<<31 - 1, 10, "-2147483649"}, + {1<<32 - 1, 10, "4294967295"}, + {-1<<32 + 1, 10, "-4294967295"}, + {1 << 32, 10, "4294967296"}, + {-1 << 32, 10, "-4294967296"}, + {1<<32 + 1, 10, "4294967297"}, + {-1<<32 - 1, 10, "-4294967297"}, + {1 << 50, 10, "1125899906842624"}, + {1<<63 - 1, 10, "9223372036854775807"}, + {-1<<63 + 1, 10, "-9223372036854775807"}, + {-1 << 63, 10, "-9223372036854775808"}, + + {0, 2, "0"}, + {10, 2, "1010"}, + {-1, 2, "-1"}, + {1 << 15, 2, "1000000000000000"}, + + {-8, 8, "-10"}, + {057635436545, 8, "57635436545"}, + {1 << 24, 8, "100000000"}, + + {16, 16, "10"}, + {-0x123456789abcdef, 16, "-123456789abcdef"}, + {1<<63 - 1, 16, "7fffffffffffffff"}, + {1<<63 - 1, 2, "111111111111111111111111111111111111111111111111111111111111111"}, + + {16, 17, "g"}, + {25, 25, "10"}, + {(((((17*35+24)*35+21)*35+34)*35+12)*35+24)*35 + 32, 35, "holycow"}, + {(((((17*36+24)*36+21)*36+34)*36+12)*36+24)*36 + 32, 36, "holycow"}, } func TestItoa(t *testing.T) { @@ -131,12 +131,12 @@ type uitob64Test struct { } var uitob64tests = []uitob64Test{ - uitob64Test{1<<63 - 1, 10, "9223372036854775807"}, - uitob64Test{1 << 63, 10, "9223372036854775808"}, - uitob64Test{1<<63 + 1, 10, "9223372036854775809"}, - uitob64Test{1<<64 - 2, 10, "18446744073709551614"}, - uitob64Test{1<<64 - 1, 10, "18446744073709551615"}, - uitob64Test{1<<64 - 1, 2, "1111111111111111111111111111111111111111111111111111111111111111"}, + {1<<63 - 1, 10, "9223372036854775807"}, + {1 << 63, 10, "9223372036854775808"}, + {1<<63 + 1, 10, "9223372036854775809"}, + {1<<64 - 2, 10, "18446744073709551614"}, + {1<<64 - 1, 10, "18446744073709551615"}, + {1<<64 - 1, 2, "1111111111111111111111111111111111111111111111111111111111111111"}, } func TestUitoa(t *testing.T) { |