summaryrefslogtreecommitdiff
path: root/src/lib/utf8_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/utf8_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/utf8_test.go')
-rw-r--r--src/lib/utf8_test.go66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/lib/utf8_test.go b/src/lib/utf8_test.go
index 7999afd2e..5499263ae 100644
--- a/src/lib/utf8_test.go
+++ b/src/lib/utf8_test.go
@@ -17,33 +17,33 @@ type Utf8Map struct {
str string;
}
-var utf8map = []Utf8Map {
- Utf8Map{ 0x0000, "\x00" },
- Utf8Map{ 0x0001, "\x01" },
- Utf8Map{ 0x007e, "\x7e" },
- Utf8Map{ 0x007f, "\x7f" },
- Utf8Map{ 0x0080, "\xc2\x80" },
- Utf8Map{ 0x0081, "\xc2\x81" },
- Utf8Map{ 0x00bf, "\xc2\xbf" },
- Utf8Map{ 0x00c0, "\xc3\x80" },
- Utf8Map{ 0x00c1, "\xc3\x81" },
- Utf8Map{ 0x00c8, "\xc3\x88" },
- Utf8Map{ 0x00d0, "\xc3\x90" },
- Utf8Map{ 0x00e0, "\xc3\xa0" },
- Utf8Map{ 0x00f0, "\xc3\xb0" },
- Utf8Map{ 0x00f8, "\xc3\xb8" },
- Utf8Map{ 0x00ff, "\xc3\xbf" },
- Utf8Map{ 0x0100, "\xc4\x80" },
- Utf8Map{ 0x07ff, "\xdf\xbf" },
- Utf8Map{ 0x0800, "\xe0\xa0\x80" },
- Utf8Map{ 0x0801, "\xe0\xa0\x81" },
- Utf8Map{ 0xfffe, "\xef\xbf\xbe" },
- Utf8Map{ 0xffff, "\xef\xbf\xbf" },
- Utf8Map{ 0x10000, "\xf0\x90\x80\x80" },
- Utf8Map{ 0x10001, "\xf0\x90\x80\x81" },
- Utf8Map{ 0x10fffe, "\xf4\x8f\xbf\xbe" },
- Utf8Map{ 0x10ffff, "\xf4\x8f\xbf\xbf" },
-}
+var utf8map = []Utf8Map (
+ Utf8Map( 0x0000, "\x00" ),
+ Utf8Map( 0x0001, "\x01" ),
+ Utf8Map( 0x007e, "\x7e" ),
+ Utf8Map( 0x007f, "\x7f" ),
+ Utf8Map( 0x0080, "\xc2\x80" ),
+ Utf8Map( 0x0081, "\xc2\x81" ),
+ Utf8Map( 0x00bf, "\xc2\xbf" ),
+ Utf8Map( 0x00c0, "\xc3\x80" ),
+ Utf8Map( 0x00c1, "\xc3\x81" ),
+ Utf8Map( 0x00c8, "\xc3\x88" ),
+ Utf8Map( 0x00d0, "\xc3\x90" ),
+ Utf8Map( 0x00e0, "\xc3\xa0" ),
+ Utf8Map( 0x00f0, "\xc3\xb0" ),
+ Utf8Map( 0x00f8, "\xc3\xb8" ),
+ Utf8Map( 0x00ff, "\xc3\xbf" ),
+ Utf8Map( 0x0100, "\xc4\x80" ),
+ Utf8Map( 0x07ff, "\xdf\xbf" ),
+ Utf8Map( 0x0800, "\xe0\xa0\x80" ),
+ Utf8Map( 0x0801, "\xe0\xa0\x81" ),
+ Utf8Map( 0xfffe, "\xef\xbf\xbe" ),
+ Utf8Map( 0xffff, "\xef\xbf\xbf" ),
+ Utf8Map( 0x10000, "\xf0\x90\x80\x80" ),
+ Utf8Map( 0x10001, "\xf0\x90\x80\x81" ),
+ Utf8Map( 0x10fffe, "\xf4\x8f\xbf\xbe" ),
+ Utf8Map( 0x10ffff, "\xf4\x8f\xbf\xbf" ),
+)
// io.StringBytes with one extra byte at end
func bytes(s string) []byte {
@@ -161,12 +161,12 @@ type RuneCountTest struct {
in string;
out int;
}
-var runecounttests = []RuneCountTest {
- RuneCountTest{ "abcd", 4 },
- RuneCountTest{ "☺☻☹", 3 },
- RuneCountTest{ "1,2,3,4", 7 },
- RuneCountTest{ "\xe2\x00", 2 },
-}
+var runecounttests = []RuneCountTest (
+ RuneCountTest( "abcd", 4 ),
+ RuneCountTest( "☺☻☹", 3 ),
+ RuneCountTest( "1,2,3,4", 7 ),
+ RuneCountTest( "\xe2\x00", 2 ),
+)
func TestRuneCount(t *testing.T) {
for i := 0; i < len(runecounttests); i++ {
tt := runecounttests[i];