aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-10-22 10:06:33 -0700
committerRobert Griesemer <gri@golang.org>2010-10-22 10:06:33 -0700
commit3478891d1202c1324b096a61da2294dade732c63 (patch)
tree73931a3378db0085bf5aa8d5fa512e70065a5f9a
parentf613015e0eeb9560579bf40dbdb40fac5e371bbc (diff)
downloadgo-3478891d1202c1324b096a61da2294dade732c63.tar.gz
go-3478891d1202c1324b096a61da2294dade732c63.zip
gofmt -s -w src misc
R=r, rsc CC=golang-dev https://golang.org/cl/2662041
-rw-r--r--misc/dashboard/builder/exec.go4
-rw-r--r--src/cmd/goyacc/goyacc.go22
-rw-r--r--src/pkg/archive/zip/reader_test.go14
-rw-r--r--src/pkg/asn1/asn1_test.go160
-rw-r--r--src/pkg/asn1/marshal_test.go52
-rw-r--r--src/pkg/big/arith_test.go176
-rwxr-xr-xsrc/pkg/big/int_test.go330
-rwxr-xr-xsrc/pkg/big/nat_test.go130
-rw-r--r--src/pkg/big/rat_test.go140
-rw-r--r--src/pkg/bufio/bufio_test.go52
-rw-r--r--src/pkg/bytes/bytes_test.go432
-rw-r--r--src/pkg/cmath/cmath_test.go24
-rw-r--r--src/pkg/compress/flate/deflate.go20
-rw-r--r--src/pkg/compress/gzip/gunzip_test.go18
-rw-r--r--src/pkg/compress/zlib/reader_test.go12
-rw-r--r--src/pkg/crypto/aes/aes_test.go14
-rw-r--r--src/pkg/crypto/aes/const.go16
-rw-r--r--src/pkg/crypto/block/cbc_aes_test.go6
-rw-r--r--src/pkg/crypto/block/cfb_aes_test.go18
-rw-r--r--src/pkg/crypto/block/cmac_aes_test.go24
-rw-r--r--src/pkg/crypto/block/ctr_aes_test.go6
-rw-r--r--src/pkg/crypto/block/eax_aes_test.go20
-rw-r--r--src/pkg/crypto/block/ecb_aes_test.go8
-rw-r--r--src/pkg/crypto/block/ofb_aes_test.go6
-rw-r--r--src/pkg/crypto/blowfish/blowfish_test.go68
-rw-r--r--src/pkg/crypto/hmac/hmac_test.go8
-rw-r--r--src/pkg/crypto/md4/md4_test.go62
-rw-r--r--src/pkg/crypto/md5/md5_test.go62
-rw-r--r--src/pkg/crypto/rc4/rc4_test.go10
-rw-r--r--src/pkg/crypto/ripemd160/ripemd160_test.go16
-rw-r--r--src/pkg/crypto/rsa/pkcs1v15.go12
-rw-r--r--src/pkg/crypto/rsa/pkcs1v15_test.go18
-rw-r--r--src/pkg/crypto/rsa/rsa_test.go12
-rw-r--r--src/pkg/crypto/sha1/sha1_test.go62
-rw-r--r--src/pkg/crypto/sha256/sha256_test.go124
-rw-r--r--src/pkg/crypto/sha512/sha512_test.go124
-rw-r--r--src/pkg/crypto/subtle/constant_time_test.go16
-rw-r--r--src/pkg/crypto/tls/handshake_server.go2
-rw-r--r--src/pkg/crypto/tls/handshake_server_test.go8
-rw-r--r--src/pkg/crypto/tls/prf_test.go16
-rw-r--r--src/pkg/crypto/x509/x509.go18
-rw-r--r--src/pkg/crypto/x509/x509_test.go20
-rw-r--r--src/pkg/crypto/xtea/xtea_test.go20
-rw-r--r--src/pkg/debug/elf/elf.go908
-rw-r--r--src/pkg/debug/elf/elf_test.go44
-rw-r--r--src/pkg/debug/elf/file_test.go150
-rw-r--r--src/pkg/debug/macho/file_test.go6
-rw-r--r--src/pkg/debug/macho/macho.go12
-rw-r--r--src/pkg/encoding/ascii85/ascii85_test.go6
-rw-r--r--src/pkg/encoding/base64/base64_test.go48
-rw-r--r--src/pkg/encoding/git85/git_test.go6
-rw-r--r--src/pkg/encoding/hex/hex_test.go114
-rw-r--r--src/pkg/encoding/pem/pem_test.go28
-rw-r--r--src/pkg/exp/4s/data.go246
-rw-r--r--src/pkg/exp/4s/xs.go20
-rw-r--r--src/pkg/exp/draw/draw_test.go32
-rw-r--r--src/pkg/exp/eval/eval_test.go22
-rw-r--r--src/pkg/exp/eval/gen.go46
-rw-r--r--src/pkg/exp/ogle/cmd.go4
-rw-r--r--src/pkg/fmt/fmt_test.go498
-rw-r--r--src/pkg/fmt/scan_test.go292
-rw-r--r--src/pkg/go/printer/printer_test.go16
-rw-r--r--src/pkg/go/scanner/scanner_test.go296
-rw-r--r--src/pkg/gob/codec_test.go28
-rw-r--r--src/pkg/gob/encoder_test.go16
-rw-r--r--src/pkg/gob/type_test.go12
-rw-r--r--src/pkg/hash/adler32/adler32_test.go64
-rw-r--r--src/pkg/hash/crc32/crc32_test.go62
-rw-r--r--src/pkg/hash/crc64/crc64_test.go62
-rw-r--r--src/pkg/html/token_test.go12
-rw-r--r--src/pkg/http/lex_test.go10
-rw-r--r--src/pkg/http/readrequest_test.go2
-rw-r--r--src/pkg/http/request_test.go14
-rw-r--r--src/pkg/http/requestwrite_test.go8
-rw-r--r--src/pkg/http/response_test.go8
-rw-r--r--src/pkg/http/responsewrite_test.go6
-rw-r--r--src/pkg/http/url_test.go116
-rw-r--r--src/pkg/index/suffixarray/suffixarray_test.go10
-rw-r--r--src/pkg/io/pipe_test.go12
-rw-r--r--src/pkg/json/decode_test.go46
-rw-r--r--src/pkg/json/scanner_test.go16
-rw-r--r--src/pkg/log/log_test.go22
-rw-r--r--src/pkg/math/all_test.go408
-rw-r--r--src/pkg/mime/mediatype_test.go44
-rw-r--r--src/pkg/mime/multipart/multipart_test.go14
-rw-r--r--src/pkg/net/dnsclient.go2
-rw-r--r--src/pkg/net/hosts_test.go10
-rw-r--r--src/pkg/net/ip_test.go30
-rw-r--r--src/pkg/net/net_test.go16
-rw-r--r--src/pkg/net/port_test.go48
-rw-r--r--src/pkg/net/textproto/reader_test.go16
-rw-r--r--src/pkg/os/os_test.go22
-rw-r--r--src/pkg/patch/patch_test.go28
-rw-r--r--src/pkg/path/match_test.go98
-rw-r--r--src/pkg/path/path_test.go152
-rw-r--r--src/pkg/reflect/all_test.go234
-rw-r--r--src/pkg/regexp/all_test.go154
-rw-r--r--src/pkg/regexp/find_test.go108
-rw-r--r--src/pkg/scanner/scanner_test.go314
-rw-r--r--src/pkg/smtp/smtp_test.go4
-rw-r--r--src/pkg/strconv/atob_test.go24
-rw-r--r--src/pkg/strconv/atof_test.go110
-rw-r--r--src/pkg/strconv/atoi_test.go188
-rw-r--r--src/pkg/strconv/decimal.go56
-rw-r--r--src/pkg/strconv/decimal_test.go62
-rw-r--r--src/pkg/strconv/ftoa_test.go178
-rw-r--r--src/pkg/strconv/itoa_test.go92
-rw-r--r--src/pkg/strconv/quote_test.go154
-rw-r--r--src/pkg/strings/strings_test.go394
-rw-r--r--src/pkg/tabwriter/tabwriter_test.go106
-rw-r--r--src/pkg/testing/regexp_test.go76
-rw-r--r--src/pkg/time/time_test.go86
-rw-r--r--src/pkg/try/try_test.go10
-rw-r--r--src/pkg/unicode/letter_test.go138
-rw-r--r--src/pkg/unicode/script_test.go312
-rw-r--r--src/pkg/unicode/tables.go6834
-rw-r--r--src/pkg/utf16/utf16_test.go14
-rw-r--r--src/pkg/utf8/utf8_test.go60
-rw-r--r--src/pkg/xml/read_test.go16
-rw-r--r--src/pkg/xml/xml.go604
-rw-r--r--src/pkg/xml/xml_test.go14
121 files changed, 8466 insertions, 8466 deletions
diff --git a/misc/dashboard/builder/exec.go b/misc/dashboard/builder/exec.go
index 91e991eb4c..6236c915a5 100644
--- a/misc/dashboard/builder/exec.go
+++ b/misc/dashboard/builder/exec.go
@@ -58,8 +58,8 @@ func runLog(envv []string, logfile, dir string, argv ...string) (output string,
// Find bin in PATH if a relative or absolute path hasn't been specified
func pathLookup(s string) (string, os.Error) {
- if strings.HasPrefix(s, "/") || strings.HasPrefix(s, "./") || strings.HasPrefix(s, "../") {
+ if strings.HasPrefix(s, "/") || strings.HasPrefix(s, "./") || strings.HasPrefix(s, "../") {
return s, nil
- }
+ }
return exec.LookPath(s)
}
diff --git a/src/cmd/goyacc/goyacc.go b/src/cmd/goyacc/goyacc.go
index ff7dcd2501..63e287a9a5 100644
--- a/src/cmd/goyacc/goyacc.go
+++ b/src/cmd/goyacc/goyacc.go
@@ -299,17 +299,17 @@ type Resrv struct {
}
var resrv = []Resrv{
- Resrv{"binary", BINARY},
- Resrv{"left", LEFT},
- Resrv{"nonassoc", BINARY},
- Resrv{"prec", PREC},
- Resrv{"right", RIGHT},
- Resrv{"start", START},
- Resrv{"term", TERM},
- Resrv{"token", TERM},
- Resrv{"type", TYPEDEF},
- Resrv{"union", UNION},
- Resrv{"struct", UNION},
+ {"binary", BINARY},
+ {"left", LEFT},
+ {"nonassoc", BINARY},
+ {"prec", PREC},
+ {"right", RIGHT},
+ {"start", START},
+ {"term", TERM},
+ {"token", TERM},
+ {"type", TYPEDEF},
+ {"union", UNION},
+ {"struct", UNION},
}
var zznewstate = 0
diff --git a/src/pkg/archive/zip/reader_test.go b/src/pkg/archive/zip/reader_test.go
index 36b925c4fc..8e1fbbfa51 100644
--- a/src/pkg/archive/zip/reader_test.go
+++ b/src/pkg/archive/zip/reader_test.go
@@ -27,31 +27,31 @@ type ZipTestFile struct {
}
var tests = []ZipTest{
- ZipTest{
+ {
Name: "test.zip",
Comment: "This is a zipfile comment.",
File: []ZipTestFile{
- ZipTestFile{
+ {
Name: "test.txt",
Content: []byte("This is a test text file.\n"),
},
- ZipTestFile{
+ {
Name: "gophercolor16x16.png",
File: "gophercolor16x16.png",
},
},
},
- ZipTest{
+ {
Name: "r.zip",
File: []ZipTestFile{
- ZipTestFile{
+ {
Name: "r/r.zip",
File: "r.zip",
},
},
},
- ZipTest{Name: "readme.zip"},
- ZipTest{Name: "readme.notzip", Error: FormatError},
+ {Name: "readme.zip"},
+ {Name: "readme.notzip", Error: FormatError},
}
func TestReader(t *testing.T) {
diff --git a/src/pkg/asn1/asn1_test.go b/src/pkg/asn1/asn1_test.go
index 17ff1fd03b..34b5f1ecda 100644
--- a/src/pkg/asn1/asn1_test.go
+++ b/src/pkg/asn1/asn1_test.go
@@ -18,16 +18,16 @@ type int64Test struct {
}
var int64TestData = []int64Test{
- int64Test{[]byte{0x00}, true, 0},
- int64Test{[]byte{0x7f}, true, 127},
- int64Test{[]byte{0x00, 0x80}, true, 128},
- int64Test{[]byte{0x01, 0x00}, true, 256},
- int64Test{[]byte{0x80}, true, -128},
- int64Test{[]byte{0xff, 0x7f}, true, -129},
- int64Test{[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, true, -1},
- int64Test{[]byte{0xff}, true, -1},
- int64Test{[]byte{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, true, -9223372036854775808},
- int64Test{[]byte{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, false, 0},
+ {[]byte{0x00}, true, 0},
+ {[]byte{0x7f}, true, 127},
+ {[]byte{0x00, 0x80}, true, 128},
+ {[]byte{0x01, 0x00}, true, 256},
+ {[]byte{0x80}, true, -128},
+ {[]byte{0xff, 0x7f}, true, -129},
+ {[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, true, -1},
+ {[]byte{0xff}, true, -1},
+ {[]byte{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, true, -9223372036854775808},
+ {[]byte{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, false, 0},
}
func TestParseInt64(t *testing.T) {
@@ -50,12 +50,12 @@ type bitStringTest struct {
}
var bitStringTestData = []bitStringTest{
- bitStringTest{[]byte{}, false, []byte{}, 0},
- bitStringTest{[]byte{0x00}, true, []byte{}, 0},
- bitStringTest{[]byte{0x07, 0x00}, true, []byte{0x00}, 1},
- bitStringTest{[]byte{0x07, 0x01}, false, []byte{}, 0},
- bitStringTest{[]byte{0x07, 0x40}, false, []byte{}, 0},
- bitStringTest{[]byte{0x08, 0x00}, false, []byte{}, 0},
+ {[]byte{}, false, []byte{}, 0},
+ {[]byte{0x00}, true, []byte{}, 0},
+ {[]byte{0x07, 0x00}, true, []byte{0x00}, 1},
+ {[]byte{0x07, 0x01}, false, []byte{}, 0},
+ {[]byte{0x07, 0x40}, false, []byte{}, 0},
+ {[]byte{0x08, 0x00}, false, []byte{}, 0},
}
func TestBitString(t *testing.T) {
@@ -95,12 +95,12 @@ type bitStringRightAlignTest struct {
}
var bitStringRightAlignTests = []bitStringRightAlignTest{
- bitStringRightAlignTest{[]byte{0x80}, 1, []byte{0x01}},
- bitStringRightAlignTest{[]byte{0x80, 0x80}, 9, []byte{0x01, 0x01}},
- bitStringRightAlignTest{[]byte{}, 0, []byte{}},
- bitStringRightAlignTest{[]byte{0xce}, 8, []byte{0xce}},
- bitStringRightAlignTest{[]byte{0xce, 0x47}, 16, []byte{0xce, 0x47}},
- bitStringRightAlignTest{[]byte{0x34, 0x50}, 12, []byte{0x03, 0x45}},
+ {[]byte{0x80}, 1, []byte{0x01}},
+ {[]byte{0x80, 0x80}, 9, []byte{0x01, 0x01}},
+ {[]byte{}, 0, []byte{}},
+ {[]byte{0xce}, 8, []byte{0xce}},
+ {[]byte{0xce, 0x47}, 16, []byte{0xce, 0x47}},
+ {[]byte{0x34, 0x50}, 12, []byte{0x03, 0x45}},
}
func TestBitStringRightAlign(t *testing.T) {
@@ -120,11 +120,11 @@ type objectIdentifierTest struct {
}
var objectIdentifierTestData = []objectIdentifierTest{
- objectIdentifierTest{[]byte{}, false, []int{}},
- objectIdentifierTest{[]byte{85}, true, []int{2, 5}},
- objectIdentifierTest{[]byte{85, 0x02}, true, []int{2, 5, 2}},
- objectIdentifierTest{[]byte{85, 0x02, 0xc0, 0x00}, true, []int{2, 5, 2, 0x2000}},
- objectIdentifierTest{[]byte{85, 0x02, 0xc0, 0x80, 0x80, 0x80, 0x80}, false, []int{}},
+ {[]byte{}, false, []int{}},
+ {[]byte{85}, true, []int{2, 5}},
+ {[]byte{85, 0x02}, true, []int{2, 5, 2}},
+ {[]byte{85, 0x02, 0xc0, 0x00}, true, []int{2, 5, 2, 0x2000}},
+ {[]byte{85, 0x02, 0xc0, 0x80, 0x80, 0x80, 0x80}, false, []int{}},
}
func TestObjectIdentifier(t *testing.T) {
@@ -148,18 +148,18 @@ type timeTest struct {
}
var utcTestData = []timeTest{
- timeTest{"910506164540-0700", true, &time.Time{1991, 05, 06, 16, 45, 40, 0, -7 * 60 * 60, ""}},
- timeTest{"910506164540+0730", true, &time.Time{1991, 05, 06, 16, 45, 40, 0, 7*60*60 + 30*60, ""}},
- timeTest{"910506234540Z", true, &time.Time{1991, 05, 06, 23, 45, 40, 0, 0, "UTC"}},
- timeTest{"9105062345Z", true, &time.Time{1991, 05, 06, 23, 45, 0, 0, 0, "UTC"}},
- timeTest{"a10506234540Z", false, nil},
- timeTest{"91a506234540Z", false, nil},
- timeTest{"9105a6234540Z", false, nil},
- timeTest{"910506a34540Z", false, nil},
- timeTest{"910506334a40Z", false, nil},
- timeTest{"91050633444aZ", false, nil},
- timeTest{"910506334461Z", false, nil},
- timeTest{"910506334400Za", false, nil},
+ {"910506164540-0700", true, &time.Time{1991, 05, 06, 16, 45, 40, 0, -7 * 60 * 60, ""}},
+ {"910506164540+0730", true, &time.Time{1991, 05, 06, 16, 45, 40, 0, 7*60*60 + 30*60, ""}},
+ {"910506234540Z", true, &time.Time{1991, 05, 06, 23, 45, 40, 0, 0, "UTC"}},
+ {"9105062345Z", true, &time.Time{1991, 05, 06, 23, 45, 0, 0, 0, "UTC"}},
+ {"a10506234540Z", false, nil},
+ {"91a506234540Z", false, nil},
+ {"9105a6234540Z", false, nil},
+ {"910506a34540Z", false, nil},
+ {"910506334a40Z", false, nil},
+ {"91050633444aZ", false, nil},
+ {"910506334461Z", false, nil},
+ {"910506334400Za", false, nil},
}
func TestUTCTime(t *testing.T) {
@@ -177,10 +177,10 @@ func TestUTCTime(t *testing.T) {
}
var generalizedTimeTestData = []timeTest{
- timeTest{"20100102030405Z", true, &time.Time{2010, 01, 02, 03, 04, 05, 0, 0, "UTC"}},
- timeTest{"20100102030405", false, nil},
- timeTest{"20100102030405+0607", true, &time.Time{2010, 01, 02, 03, 04, 05, 0, 6*60*60 + 7*60, ""}},
- timeTest{"20100102030405-0607", true, &time.Time{2010, 01, 02, 03, 04, 05, 0, -6*60*60 - 7*60, ""}},
+ {"20100102030405Z", true, &time.Time{2010, 01, 02, 03, 04, 05, 0, 0, "UTC"}},
+ {"20100102030405", false, nil},
+ {"20100102030405+0607", true, &time.Time{2010, 01, 02, 03, 04, 05, 0, 6*60*60 + 7*60, ""}},
+ {"20100102030405-0607", true, &time.Time{2010, 01, 02, 03, 04, 05, 0, -6*60*60 - 7*60, ""}},
}
func TestGeneralizedTime(t *testing.T) {
@@ -204,18 +204,18 @@ type tagAndLengthTest struct {
}
var tagAndLengthData = []tagAndLengthTest{
- tagAndLengthTest{[]byte{0x80, 0x01}, true, tagAndLength{2, 0, 1, false}},
- tagAndLengthTest{[]byte{0xa0, 0x01}, true, tagAndLength{2, 0, 1, true}},
- tagAndLengthTest{[]byte{0x02, 0x00}, true, tagAndLength{0, 2, 0, false}},
- tagAndLengthTest{[]byte{0xfe, 0x00}, true, tagAndLength{3, 30, 0, true}},
- tagAndLengthTest{[]byte{0x1f, 0x01, 0x00}, true, tagAndLength{0, 1, 0, false}},
- tagAndLengthTest{[]byte{0x1f, 0x81, 0x00, 0x00}, true, tagAndLength{0, 128, 0, false}},
- tagAndLengthTest{[]byte{0x1f, 0x81, 0x80, 0x01, 0x00}, true, tagAndLength{0, 0x4001, 0, false}},
- tagAndLengthTest{[]byte{0x00, 0x81, 0x01}, true, tagAndLength{0, 0, 1, false}},
- tagAndLengthTest{[]byte{0x00, 0x82, 0x01, 0x00}, true, tagAndLength{0, 0, 256, false}},
- tagAndLengthTest{[]byte{0x00, 0x83, 0x01, 0x00}, false, tagAndLength{}},
- tagAndLengthTest{[]byte{0x1f, 0x85}, false, tagAndLength{}},
- tagAndLengthTest{[]byte{0x30, 0x80}, false, tagAndLength{}},
+ {[]byte{0x80, 0x01}, true, tagAndLength{2, 0, 1, false}},
+ {[]byte{0xa0, 0x01}, true, tagAndLength{2, 0, 1, true}},
+ {[]byte{0x02, 0x00}, true, tagAndLength{0, 2, 0, false}},
+ {[]byte{0xfe, 0x00}, true, tagAndLength{3, 30, 0, true}},
+ {[]byte{0x1f, 0x01, 0x00}, true, tagAndLength{0, 1, 0, false}},
+ {[]byte{0x1f, 0x81, 0x00, 0x00}, true, tagAndLength{0, 128, 0, false}},
+ {[]byte{0x1f, 0x81, 0x80, 0x01, 0x00}, true, tagAndLength{0, 0x4001, 0, false}},
+ {[]byte{0x00, 0x81, 0x01}, true, tagAndLength{0, 0, 1, false}},
+ {[]byte{0x00, 0x82, 0x01, 0x00}, true, tagAndLength{0, 0, 256, false}},
+ {[]byte{0x00, 0x83, 0x01, 0x00}, false, tagAndLength{}},
+ {[]byte{0x1f, 0x85}, false, tagAndLength{}},
+ {[]byte{0x30, 0x80}, false, tagAndLength{}},
}
func TestParseTagAndLength(t *testing.T) {
@@ -244,17 +244,17 @@ func newString(s string) *string { return &s }
func newBool(b bool) *bool { return &b }
var parseFieldParametersTestData []parseFieldParametersTest = []parseFieldParametersTest{
- parseFieldParametersTest{"", fieldParameters{}},
- parseFieldParametersTest{"ia5", fieldParameters{stringType: tagIA5String}},
- parseFieldParametersTest{"printable", fieldParameters{stringType: tagPrintableString}},
- parseFieldParametersTest{"optional", fieldParameters{optional: true}},
- parseFieldParametersTest{"explicit", fieldParameters{explicit: true, tag: new(int)}},
- parseFieldParametersTest{"optional,explicit", fieldParameters{optional: true, explicit: true, tag: new(int)}},
- parseFieldParametersTest{"default:42", fieldParameters{defaultValue: newInt64(42)}},
- parseFieldParametersTest{"tag:17", fieldParameters{tag: newInt(17)}},
- parseFieldParametersTest{"optional,explicit,default:42,tag:17", fieldParameters{optional: true, explicit: true, defaultValue: newInt64(42), tag: newInt(17)}},
- parseFieldParametersTest{"optional,explicit,default:42,tag:17,rubbish1", fieldParameters{true, true, newInt64(42), newInt(17), 0, false}},
- parseFieldParametersTest{"set", fieldParameters{set: true}},
+ {"", fieldParameters{}},
+ {"ia5", fieldParameters{stringType: tagIA5String}},
+ {"printable", fieldParameters{stringType: tagPrintableString}},
+ {"optional", fieldParameters{optional: true}},
+ {"explicit", fieldParameters{explicit: true, tag: new(int)}},
+ {"optional,explicit", fieldParameters{optional: true, explicit: true, tag: new(int)}},
+ {"default:42", fieldParameters{defaultValue: newInt64(42)}},
+ {"tag:17", fieldParameters{tag: newInt(17)}},
+ {"optional,explicit,default:42,tag:17", fieldParameters{optional: true, explicit: true, defaultValue: newInt64(42), tag: newInt(17)}},
+ {"optional,explicit,default:42,tag:17,rubbish1", fieldParameters{true, true, newInt64(42), newInt(17), 0, false}},
+ {"set", fieldParameters{set: true}},
}
func TestParseFieldParameters(t *testing.T) {
@@ -290,20 +290,20 @@ type TestElementsAfterString struct {
}
var unmarshalTestData []unmarshalTest = []unmarshalTest{
- unmarshalTest{[]byte{0x02, 0x01, 0x42}, newInt(0x42)},
- unmarshalTest{[]byte{0x30, 0x08, 0x06, 0x06, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d}, &TestObjectIdentifierStruct{[]int{1, 2, 840, 113549}}},
- unmarshalTest{[]byte{0x03, 0x04, 0x06, 0x6e, 0x5d, 0xc0}, &BitString{[]byte{110, 93, 192}, 18}},
- unmarshalTest{[]byte{0x30, 0x09, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x01, 0x03}, &[]int{1, 2, 3}},
- unmarshalTest{[]byte{0x02, 0x01, 0x10}, newInt(16)},
- unmarshalTest{[]byte{0x13, 0x04, 't', 'e', 's', 't'}, newString("test")},
- unmarshalTest{[]byte{0x16, 0x04, 't', 'e', 's', 't'}, newString("test")},
- unmarshalTest{[]byte{0x16, 0x04, 't', 'e', 's', 't'}, &RawValue{0, 22, false, []byte("test"), []byte("\x16\x04test")}},
- unmarshalTest{[]byte{0x04, 0x04, 1, 2, 3, 4}, &RawValue{0, 4, false, []byte{1, 2, 3, 4}, []byte{4, 4, 1, 2, 3, 4}}},
- unmarshalTest{[]byte{0x30, 0x03, 0x81, 0x01, 0x01}, &TestContextSpecificTags{1}},
- unmarshalTest{[]byte{0x30, 0x08, 0xa1, 0x03, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02}, &TestContextSpecificTags2{1, 2}},
- unmarshalTest{[]byte{0x01, 0x01, 0x00}, newBool(false)},
- unmarshalTest{[]byte{0x01, 0x01, 0x01}, newBool(true)},
- unmarshalTest{[]byte{0x30, 0x0b, 0x13, 0x03, 0x66, 0x6f, 0x6f, 0x02, 0x01, 0x22, 0x02, 0x01, 0x33}, &TestElementsAfterString{"foo", 0x22, 0x33}},
+ {[]byte{0x02, 0x01, 0x42}, newInt(0x42)},
+ {[]byte{0x30, 0x08, 0x06, 0x06, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d}, &TestObjectIdentifierStruct{[]int{1, 2, 840, 113549}}},
+ {[]byte{0x03, 0x04, 0x06, 0x6e, 0x5d, 0xc0}, &BitString{[]byte{110, 93, 192}, 18}},
+ {[]byte{0x30, 0x09, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x01, 0x03}, &[]int{1, 2, 3}},
+ {[]byte{0x02, 0x01, 0x10}, newInt(16)},
+ {[]byte{0x13, 0x04, 't', 'e', 's', 't'}, newString("test")},
+ {[]byte{0x16, 0x04, 't', 'e', 's', 't'}, newString("test")},
+ {[]byte{0x16, 0x04, 't', 'e', 's', 't'}, &RawValue{0, 22, false, []byte("test"), []byte("\x16\x04test")}},
+ {[]byte{0x04, 0x04, 1, 2, 3, 4}, &RawValue{0, 4, false, []byte{1, 2, 3, 4}, []byte{4, 4, 1, 2, 3, 4}}},
+ {[]byte{0x30, 0x03, 0x81, 0x01, 0x01}, &TestContextSpecificTags{1}},
+ {[]byte{0x30, 0x08, 0xa1, 0x03, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02}, &TestContextSpecificTags2{1, 2}},
+ {[]byte{0x01, 0x01, 0x00}, newBool(false)},
+ {[]byte{0x01, 0x01, 0x01}, newBool(true)},
+ {[]byte{0x30, 0x0b, 0x13, 0x03, 0x66, 0x6f, 0x6f, 0x02, 0x01, 0x22, 0x02, 0x01, 0x33}, &TestElementsAfterString{"foo", 0x22, 0x33}},
}
func TestUnmarshal(t *testing.T) {
diff --git a/src/pkg/asn1/marshal_test.go b/src/pkg/asn1/marshal_test.go
index 56c0e1c946..85eafc9e4d 100644
--- a/src/pkg/asn1/marshal_test.go
+++ b/src/pkg/asn1/marshal_test.go
@@ -58,32 +58,32 @@ type marshalTest struct {
}
var marshalTests = []marshalTest{
- marshalTest{10, "02010a"},
- marshalTest{127, "02017f"},
- marshalTest{128, "02020080"},
- marshalTest{-128, "020180"},
- marshalTest{-129, "0202ff7f"},
- marshalTest{intStruct{64}, "3003020140"},
- marshalTest{twoIntStruct{64, 65}, "3006020140020141"},
- marshalTest{nestedStruct{intStruct{127}}, "3005300302017f"},
- marshalTest{[]byte{1, 2, 3}, "0403010203"},
- marshalTest{implicitTagTest{64}, "3003850140"},
- marshalTest{explicitTagTest{64}, "3005a503020140"},
- marshalTest{time.SecondsToUTC(0), "170d3730303130313030303030305a"},
- marshalTest{time.SecondsToUTC(1258325776), "170d3039313131353232353631365a"},
- marshalTest{setPST(time.SecondsToUTC(1258325776)), "17113039313131353232353631362d30383030"},
- marshalTest{BitString{[]byte{0x80}, 1}, "03020780"},
- marshalTest{BitString{[]byte{0x81, 0xf0}, 12}, "03030481f0"},
- marshalTest{ObjectIdentifier([]int{1, 2, 3, 4}), "06032a0304"},
- marshalTest{ObjectIdentifier([]int{1, 2, 840, 133549, 1, 1, 5}), "06092a864888932d010105"},
- marshalTest{"test", "130474657374"},
- marshalTest{ia5StringTest{"test"}, "3006160474657374"},
- marshalTest{printableStringTest{"test"}, "3006130474657374"},
- marshalTest{printableStringTest{"test*"}, "30071305746573742a"},
- marshalTest{rawContentsStruct{nil, 64}, "3003020140"},
- marshalTest{rawContentsStruct{[]byte{0x30, 3, 1, 2, 3}, 64}, "3003010203"},
- marshalTest{RawValue{Tag: 1, Class: 2, IsCompound: false, Bytes: []byte{1, 2, 3}}, "8103010203"},
- marshalTest{testSET([]int{10}), "310302010a"},
+ {10, "02010a"},
+ {127, "02017f"},
+ {128, "02020080"},
+ {-128, "020180"},
+ {-129, "0202ff7f"},
+ {intStruct{64}, "3003020140"},
+ {twoIntStruct{64, 65}, "3006020140020141"},
+ {nestedStruct{intStruct{127}}, "3005300302017f"},
+ {[]byte{1, 2, 3}, "0403010203"},
+ {implicitTagTest{64}, "3003850140"},
+ {explicitTagTest{64}, "3005a503020140"},
+ {time.SecondsToUTC(0), "170d3730303130313030303030305a"},
+ {time.SecondsToUTC(1258325776), "170d3039313131353232353631365a"},
+ {setPST(time.SecondsToUTC(1258325776)), "17113039313131353232353631362d30383030"},
+ {BitString{[]byte{0x80}, 1}, "03020780"},
+ {BitString{[]byte{0x81, 0xf0}, 12}, "03030481f0"},
+ {ObjectIdentifier([]int{1, 2, 3, 4}), "06032a0304"},
+ {ObjectIdentifier([]int{1, 2, 840, 133549, 1, 1, 5}), "06092a864888932d010105"},
+ {"test", "130474657374"},
+ {ia5StringTest{"test"}, "3006160474657374"},
+ {printableStringTest{"test"}, "3006130474657374"},
+ {printableStringTest{"test*"}, "30071305746573742a"},
+ {rawContentsStruct{nil, 64}, "3003020140"},
+ {rawContentsStruct{[]byte{0x30, 3, 1, 2, 3}, 64}, "3003010203"},
+ {RawValue{Tag: 1, Class: 2, IsCompound: false, Bytes: []byte{1, 2, 3}}, "8103010203"},
+ {testSET([]int{10}), "310302010a"},
}
func TestMarshal(t *testing.T) {
diff --git a/src/pkg/big/arith_test.go b/src/pkg/big/arith_test.go
index efdb65123f..576bd5a09c 100644
--- a/src/pkg/big/arith_test.go
+++ b/src/pkg/big/arith_test.go
@@ -13,17 +13,17 @@ type argWW struct {
}
var sumWW = []argWW{
- argWW{0, 0, 0, 0, 0},
- argWW{0, 1, 0, 0, 1},
- argWW{0, 0, 1, 0, 1},
- argWW{0, 1, 1, 0, 2},
- argWW{12345, 67890, 0, 0, 80235},
- argWW{12345, 67890, 1, 0, 80236},
- argWW{_M, 1, 0, 1, 0},
- argWW{_M, 0, 1, 1, 0},
- argWW{_M, 1, 1, 1, 1},
- argWW{_M, _M, 0, 1, _M - 1},
- argWW{_M, _M, 1, 1, _M},
+ {0, 0, 0, 0, 0},
+ {0, 1, 0, 0, 1},
+ {0, 0, 1, 0, 1},
+ {0, 1, 1, 0, 2},
+ {12345, 67890, 0, 0, 80235},
+ {12345, 67890, 1, 0, 80236},
+ {_M, 1, 0, 1, 0},
+ {_M, 0, 1, 1, 0},
+ {_M, 1, 1, 1, 1},
+ {_M, _M, 0, 1, _M - 1},
+ {_M, _M, 1, 1, _M},
}
@@ -59,15 +59,15 @@ type argVV struct {
}
var sumVV = []argVV{
- argVV{},
- argVV{nat{0}, nat{0}, nat{0}, 0},
- argVV{nat{1}, nat{1}, nat{0}, 0},
- argVV{nat{0}, nat{_M}, nat{1}, 1},
- argVV{nat{80235}, nat{12345}, nat{67890}, 0},
- argVV{nat{_M - 1}, nat{_M}, nat{_M}, 1},
- argVV{nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, nat{1, 0, 0, 0}, 1},
- argVV{nat{0, 0, 0, _M}, nat{_M, _M, _M, _M - 1}, nat{1, 0, 0, 0}, 0},
- argVV{nat{0, 0, 0, 0}, nat{_M, 0, _M, 0}, nat{1, _M, 0, _M}, 1},
+ {},
+ {nat{0}, nat{0}, nat{0}, 0},
+ {nat{1}, nat{1}, nat{0}, 0},
+ {nat{0}, nat{_M}, nat{1}, 1},
+ {nat{80235}, nat{12345}, nat{67890}, 0},
+ {nat{_M - 1}, nat{_M}, nat{_M}, 1},
+ {nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, nat{1, 0, 0, 0}, 1},
+ {nat{0, 0, 0, _M}, nat{_M, _M, _M, _M - 1}, nat{1, 0, 0, 0}, 0},
+ {nat{0, 0, 0, 0}, nat{_M, 0, _M, 0}, nat{1, _M, 0, _M}, 1},
}
@@ -115,57 +115,57 @@ type argVW struct {
}
var sumVW = []argVW{
- argVW{},
- argVW{nat{0}, nat{0}, 0, 0},
- argVW{nat{1}, nat{0}, 1, 0},
- argVW{nat{1}, nat{1}, 0, 0},
- argVW{nat{0}, nat{_M}, 1, 1},
- argVW{nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, 1, 1},
+ {},
+ {nat{0}, nat{0}, 0, 0},
+ {nat{1}, nat{0}, 1, 0},
+ {nat{1}, nat{1}, 0, 0},
+ {nat{0}, nat{_M}, 1, 1},
+ {nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, 1, 1},
}
var prodVW = []argVW{
- argVW{},
- argVW{nat{0}, nat{0}, 0, 0},
- argVW{nat{0}, nat{_M}, 0, 0},
- argVW{nat{0}, nat{0}, _M, 0},
- argVW{nat{1}, nat{1}, 1, 0},
- argVW{nat{22793}, nat{991}, 23, 0},
- argVW{nat{0, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 0},
- argVW{nat{0, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 0},
- argVW{nat{0, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 0},
- argVW{nat{_M << 1 & _M}, nat{_M}, 1 << 1, _M >> (_W - 1)},
- argVW{nat{_M << 7 & _M}, nat{_M}, 1 << 7, _M >> (_W - 7)},
- argVW{nat{_M << 7 & _M, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, _M >> (_W - 7)},
+ {},
+ {nat{0}, nat{0}, 0, 0},
+ {nat{0}, nat{_M}, 0, 0},
+ {nat{0}, nat{0}, _M, 0},
+ {nat{1}, nat{1}, 1, 0},
+ {nat{22793}, nat{991}, 23, 0},
+ {nat{0, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 0},
+ {nat{0, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 0},
+ {nat{0, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 0},
+ {nat{_M << 1 & _M}, nat{_M}, 1 << 1, _M >> (_W - 1)},
+ {nat{_M << 7 & _M}, nat{_M}, 1 << 7, _M >> (_W - 7)},
+ {nat{_M << 7 & _M, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, _M >> (_W - 7)},
}
var lshVW = []argVW{
- argVW{},
- argVW{nat{0}, nat{0}, 0, 0},
- argVW{nat{0}, nat{0}, 1, 0},
- argVW{nat{0}, nat{0}, 20, 0},
-
- argVW{nat{_M}, nat{_M}, 0, 0},
- argVW{nat{_M << 1 & _M}, nat{_M}, 1, 1},
- argVW{nat{_M << 20 & _M}, nat{_M}, 20, _M >> (_W - 20)},
-
- argVW{nat{_M, _M, _M}, nat{_M, _M, _M}, 0, 0},
- argVW{nat{_M << 1 & _M, _M, _M}, nat{_M, _M, _M}, 1, 1},
- argVW{nat{_M << 20 & _M, _M, _M}, nat{_M, _M, _M}, 20, _M >> (_W - 20)},
+ {},
+ {nat{0}, nat{0}, 0, 0},
+ {nat{0}, nat{0}, 1, 0},
+ {nat{0}, nat{0}, 20, 0},
+
+ {nat{_M}, nat{_M}, 0, 0},
+ {nat{_M << 1 & _M}, nat{_M}, 1, 1},
+ {nat{_M << 20 & _M}, nat{_M}, 20, _M >> (_W - 20)},
+
+ {nat{_M, _M, _M}, nat{_M, _M, _M}, 0, 0},
+ {nat{_M << 1 & _M, _M, _M}, nat{_M, _M, _M}, 1, 1},
+ {nat{_M << 20 & _M, _M, _M}, nat{_M, _M, _M}, 20, _M >> (_W - 20)},
}
var rshVW = []argVW{
- argVW{},
- argVW{nat{0}, nat{0}, 0, 0},
- argVW{nat{0}, nat{0}, 1, 0},
- argVW{nat{0}, nat{0}, 20, 0},
-
- argVW{nat{_M}, nat{_M}, 0, 0},
- argVW{nat{_M >> 1}, nat{_M}, 1, _M << (_W - 1) & _M},
- argVW{nat{_M >> 20}, nat{_M}, 20, _M << (_W - 20) & _M},
-
- argVW{nat{_M, _M, _M}, nat{_M, _M, _M}, 0, 0},
- argVW{nat{_M, _M, _M >> 1}, nat{_M, _M, _M}, 1, _M << (_W - 1) & _M},
- argVW{nat{_M, _M, _M >> 20}, nat{_M, _M, _M}, 20, _M << (_W - 20) & _M},
+ {},
+ {nat{0}, nat{0}, 0, 0},
+ {nat{0}, nat{0}, 1, 0},
+ {nat{0}, nat{0}, 20, 0},
+
+ {nat{_M}, nat{_M}, 0, 0},
+ {nat{_M >> 1}, nat{_M}, 1, _M << (_W - 1) & _M},
+ {nat{_M >> 20}, nat{_M}, 20, _M << (_W - 20) & _M},
+
+ {nat{_M, _M, _M}, nat{_M, _M, _M}, 0, 0},
+ {nat{_M, _M, _M >> 1}, nat{_M, _M, _M}, 1, _M << (_W - 1) & _M},
+ {nat{_M, _M, _M >> 20}, nat{_M, _M, _M}, 20, _M << (_W - 20) & _M},
}
@@ -217,29 +217,29 @@ type argVWW struct {
}
var prodVWW = []argVWW{
- argVWW{},
- argVWW{nat{0}, nat{0}, 0, 0, 0},
- argVWW{nat{991}, nat{0}, 0, 991, 0},
- argVWW{nat{0}, nat{_M}, 0, 0, 0},
- argVWW{nat{991}, nat{_M}, 0, 991, 0},
- argVWW{nat{0}, nat{0}, _M, 0, 0},
- argVWW{nat{991}, nat{0}, _M, 991, 0},
- argVWW{nat{1}, nat{1}, 1, 0, 0},
- argVWW{nat{992}, nat{1}, 1, 991, 0},
- argVWW{nat{22793}, nat{991}, 23, 0, 0},
- argVWW{nat{22800}, nat{991}, 23, 7, 0},
- argVWW{nat{0, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 0, 0},
- argVWW{nat{7, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 7, 0},
- argVWW{nat{0, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 0, 0},
- argVWW{nat{991, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 991, 0},
- argVWW{nat{0, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 0, 0},
- argVWW{nat{991, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 991, 0},
- argVWW{nat{_M << 1 & _M}, nat{_M}, 1 << 1, 0, _M >> (_W - 1)},
- argVWW{nat{_M<<1&_M + 1}, nat{_M}, 1 << 1, 1, _M >> (_W - 1)},
- argVWW{nat{_M << 7 & _M}, nat{_M}, 1 << 7, 0, _M >> (_W - 7)},
- argVWW{nat{_M<<7&_M + 1<<6}, nat{_M}, 1 << 7, 1 << 6, _M >> (_W - 7)},
- argVWW{nat{_M << 7 & _M, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 0, _M >> (_W - 7)},
- argVWW{nat{_M<<7&_M + 1<<6, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 1 << 6, _M >> (_W - 7)},
+ {},
+ {nat{0}, nat{0}, 0, 0, 0},
+ {nat{991}, nat{0}, 0, 991, 0},
+ {nat{0}, nat{_M}, 0, 0, 0},
+ {nat{991}, nat{_M}, 0, 991, 0},
+ {nat{0}, nat{0}, _M, 0, 0},
+ {nat{991}, nat{0}, _M, 991, 0},
+ {nat{1}, nat{1}, 1, 0, 0},
+ {nat{992}, nat{1}, 1, 991, 0},
+ {nat{22793}, nat{991}, 23, 0, 0},
+ {nat{22800}, nat{991}, 23, 7, 0},
+ {nat{0, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 0, 0},
+ {nat{7, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 7, 0},
+ {nat{0, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 0, 0},
+ {nat{991, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 991, 0},
+ {nat{0, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 0, 0},
+ {nat{991, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 991, 0},
+ {nat{_M << 1 & _M}, nat{_M}, 1 << 1, 0, _M >> (_W - 1)},
+ {nat{_M<<1&_M + 1}, nat{_M}, 1 << 1, 1, _M >> (_W - 1)},
+ {nat{_M << 7 & _M}, nat{_M}, 1 << 7, 0, _M >> (_W - 7)},
+ {nat{_M<<7&_M + 1<<6}, nat{_M}, 1 << 7, 1 << 6, _M >> (_W - 7)},
+ {nat{_M << 7 & _M, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 0, _M >> (_W - 7)},
+ {nat{_M<<7&_M + 1<<6, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 1 << 6, _M >> (_W - 7)},
}
@@ -307,7 +307,7 @@ type mulWWTest struct {
var mulWWTests = []mulWWTest{
- mulWWTest{_M, _M, _M - 1, 1},
+ {_M, _M, _M - 1, 1},
// 32 bit only: mulWWTest{0xc47dfa8c, 50911, 0x98a4, 0x998587f4},
}
@@ -332,8 +332,8 @@ var mulAddWWWTests = []mulAddWWWTest{
// TODO(agl): These will only work on 64-bit platforms.
// mulAddWWWTest{15064310297182388543, 0xe7df04d2d35d5d80, 13537600649892366549, 13644450054494335067, 10832252001440893781},
// mulAddWWWTest{15064310297182388543, 0xdab2f18048baa68d, 13644450054494335067, 12869334219691522700, 14233854684711418382},
- mulAddWWWTest{_M, _M, 0, _M - 1, 1},
- mulAddWWWTest{_M, _M, _M, _M, 0},
+ {_M, _M, 0, _M - 1, 1},
+ {_M, _M, _M, _M, 0},
}
diff --git a/src/pkg/big/int_test.go b/src/pkg/big/int_test.go
index 184bce5bfd..3a2f2a0657 100755
--- a/src/pkg/big/int_test.go
+++ b/src/pkg/big/int_test.go
@@ -29,20 +29,20 @@ type argZZ struct {
var sumZZ = []argZZ{
- argZZ{NewInt(0), NewInt(0), NewInt(0)},
- argZZ{NewInt(1), NewInt(1), NewInt(0)},
- argZZ{NewInt(1111111110), NewInt(123456789), NewInt(987654321)},
- argZZ{NewInt(-1), NewInt(-1), NewInt(0)},
- argZZ{NewInt(864197532), NewInt(-123456789), NewInt(987654321)},
- argZZ{NewInt(-1111111110), NewInt(-123456789), NewInt(-987654321)},
+ {NewInt(0), NewInt(0), NewInt(0)},
+ {NewInt(1), NewInt(1), NewInt(0)},
+ {NewInt(1111111110), NewInt(123456789), NewInt(987654321)},
+ {NewInt(-1), NewInt(-1), NewInt(0)},
+ {NewInt(864197532), NewInt(-123456789), NewInt(987654321)},
+ {NewInt(-1111111110), NewInt(-123456789), NewInt(-987654321)},
}
var prodZZ = []argZZ{
- argZZ{NewInt(0), NewInt(0), NewInt(0)},
- argZZ{NewInt(0), NewInt(1), NewInt(0)},
- argZZ{NewInt(1), NewInt(1), NewInt(1)},
- argZZ{NewInt(-991 * 991), NewInt(991), NewInt(-991)},
+ {NewInt(0), NewInt(0), NewInt(0)},
+ {NewInt(0), NewInt(1), NewInt(0)},
+ {NewInt(1), NewInt(1), NewInt(1)},
+ {NewInt(-991 * 991), NewInt(991), NewInt(-991)},
// TODO(gri) add larger products
}
@@ -194,20 +194,20 @@ type mulRangeZ struct {
var mulRangesZ = []mulRangeZ{
// entirely positive ranges are covered by mulRangesN
- mulRangeZ{-1, 1, "0"},
- mulRangeZ{-2, -1, "2"},
- mulRangeZ{-3, -2, "6"},
- mulRangeZ{-3, -1, "-6"},
- mulRangeZ{1, 3, "6"},
- mulRangeZ{-10, -10, "-10"},
- mulRangeZ{0, -1, "1"}, // empty range
- mulRangeZ{-1, -100, "1"}, // empty range
- mulRangeZ{-1, 1, "0"}, // range includes 0
- mulRangeZ{-1e9, 0, "0"}, // range includes 0
- mulRangeZ{-1e9, 1e9, "0"}, // range includes 0
- mulRangeZ{-10, -1, "3628800"}, // 10!
- mulRangeZ{-20, -2, "-2432902008176640000"}, // -20!
- mulRangeZ{-99, -1,
+ {-1, 1, "0"},
+ {-2, -1, "2"},
+ {-3, -2, "6"},
+ {-3, -1, "-6"},
+ {1, 3, "6"},
+ {-10, -10, "-10"},
+ {0, -1, "1"}, // empty range
+ {-1, -100, "1"}, // empty range
+ {-1, 1, "0"}, // range includes 0
+ {-1e9, 0, "0"}, // range includes 0
+ {-1e9, 1e9, "0"}, // range includes 0
+ {-10, -1, "3628800"}, // 10!
+ {-20, -2, "-2432902008176640000"}, // -20!
+ {-99, -1,
"-933262154439441526816992388562667004907159682643816214685929" +
"638952175999932299156089414639761565182862536979208272237582" +
"511852109168640000000000000000000000", // -99!
@@ -244,45 +244,45 @@ type stringTest struct {
var stringTests = []stringTest{
- stringTest{in: "", ok: false},
- stringTest{in: "a", ok: false},
- stringTest{in: "z", ok: false},
- stringTest{in: "+", ok: false},
- stringTest{in: "-", ok: false},
- stringTest{in: "0b", ok: false},
- stringTest{in: "0x", ok: false},
- stringTest{in: "2", base: 2, ok: false},
- stringTest{in: "0b2", base: 0, ok: false},
- stringTest{in: "08", ok: false},
- stringTest{in: "8", base: 8, ok: false},
- stringTest{in: "0xg", base: 0, ok: false},
- stringTest{in: "g", base: 16, ok: false},
- stringTest{"0", "0", 0, 0, true},
- stringTest{"0", "0", 10, 0, true},
- stringTest{"0", "0", 16, 0, true},
- stringTest{"+0", "0", 0, 0, true},
- stringTest{"-0", "0", 0, 0, true},
- stringTest{"10", "10", 0, 10, true},
- stringTest{"10", "10", 10, 10, true},
- stringTest{"10", "10", 16, 16, true},
- stringTest{"-10", "-10", 16, -16, true},
- stringTest{"+10", "10", 16, 16, true},
- stringTest{"0x10", "16", 0, 16, true},
- stringTest{in: "0x10", base: 16, ok: false},
- stringTest{"-0x10", "-16", 0, -16, true},
- stringTest{"+0x10", "16", 0, 16, true},
- stringTest{"00", "0", 0, 0, true},
- stringTest{"0", "0", 8, 0, true},
- stringTest{"07", "7", 0, 7, true},
- stringTest{"7", "7", 8, 7, true},
- stringTest{"023", "19", 0, 19, true},
- stringTest{"23", "23", 8, 19, true},
- stringTest{"cafebabe", "cafebabe", 16, 0xcafebabe, true},
- stringTest{"0b0", "0", 0, 0, true},
- stringTest{"-111", "-111", 2, -7, true},
- stringTest{"-0b111", "-7", 0, -7, true},
- stringTest{"0b1001010111", "599", 0, 0x257, true},
- stringTest{"1001010111", "1001010111", 2, 0x257, true},
+ {in: "", ok: false},
+ {in: "a", ok: false},
+ {in: "z", ok: false},
+ {in: "+", ok: false},
+ {in: "-", ok: false},
+ {in: "0b", ok: false},
+ {in: "0x", ok: false},
+ {in: "2", base: 2, ok: false},
+ {in: "0b2", base: 0, ok: false},
+ {in: "08", ok: false},
+ {in: "8", base: 8, ok: false},
+ {in: "0xg", base: 0, ok: false},
+ {in: "g", base: 16, ok: false},
+ {"0", "0", 0, 0, true},
+ {"0", "0", 10, 0, true},
+ {"0", "0", 16, 0, true},
+ {"+0", "0", 0, 0, true},
+ {"-0", "0", 0, 0, true},
+ {"10", "10", 0, 10, true},
+ {"10", "10", 10, 10, true},
+ {"10", "10", 16, 16, true},
+ {"-10", "-10", 16, -16, true},
+ {"+10", "10", 16, 16, true},
+ {"0x10", "16", 0, 16, true},
+ {in: "0x10", base: 16, ok: false},
+ {"-0x10", "-16", 0, -16, true},
+ {"+0x10", "16", 0, 16, true},
+ {"00", "0", 0, 0, true},
+ {"0", "0", 8, 0, true},
+ {"07", "7", 0, 7, true},
+ {"7", "7", 8, 7, true},
+ {"023", "19", 0, 19, true},
+ {"23", "23", 8, 19, true},
+ {"cafebabe", "cafebabe", 16, 0xcafebabe, true},
+ {"0b0", "0", 0, 0, true},
+ {"-111", "-111", 2, -7, true},
+ {"-0b111", "-7", 0, -7, true},
+ {"0b1001010111", "599", 0, 0x257, true},
+ {"1001010111", "1001010111", 2, 0x257, true},
}
@@ -362,12 +362,12 @@ type divisionSignsTest struct {
// Examples from the Go Language Spec, section "Arithmetic operators"
var divisionSignsTests = []divisionSignsTest{
- divisionSignsTest{5, 3, 1, 2, 1, 2},
- divisionSignsTest{-5, 3, -1, -2, -2, 1},
- divisionSignsTest{5, -3, -1, 2, -1, 2},
- divisionSignsTest{-5, -3, 1, -2, 2, 1},
- divisionSignsTest{1, 2, 0, 1, 0, 1},
- divisionSignsTest{8, 4, 2, 0, 2, 0},
+ {5, 3, 1, 2, 1, 2},
+ {-5, 3, -1, -2, -2, 1},
+ {5, -3, -1, 2, -1, 2},
+ {-5, -3, 1, -2, 2, 1},
+ {1, 2, 0, 1, 0, 1},
+ {8, 4, 2, 0, 2, 0},
}
@@ -495,13 +495,13 @@ type quoTest struct {
var quoTests = []quoTest{
- quoTest{
+ {
"476217953993950760840509444250624797097991362735329973741718102894495832294430498335824897858659711275234906400899559094370964723884706254265559534144986498357",
"9353930466774385905609975137998169297361893554149986716853295022578535724979483772383667534691121982974895531435241089241440253066816724367338287092081996",
"50911",
"1",
},
- quoTest{
+ {
"11510768301994997771168",
"1328165573307167369775",
"8",
@@ -558,18 +558,18 @@ type bitLenTest struct {
var bitLenTests = []bitLenTest{
- bitLenTest{"-1", 1},
- bitLenTest{"0", 0},
- bitLenTest{"1", 1},
- bitLenTest{"2", 2},
- bitLenTest{"4", 3},
- bitLenTest{"0xabc", 12},
- bitLenTest{"0x8000", 16},
- bitLenTest{"0x80000000", 32},
- bitLenTest{"0x800000000000", 48},
- bitLenTest{"0x8000000000000000", 64},
- bitLenTest{"0x80000000000000000000", 80},
- bitLenTest{"-0x4000000000000000000000", 87},
+ {"-1", 1},
+ {"0", 0},
+ {"1", 1},
+ {"2", 2},
+ {"4", 3},
+ {"0xabc", 12},
+ {"0x8000", 16},
+ {"0x80000000", 32},
+ {"0x800000000000", 48},
+ {"0x8000000000000000", 64},
+ {"0x80000000000000000000", 80},
+ {"-0x4000000000000000000000", 87},
}
@@ -595,19 +595,19 @@ type expTest struct {
var expTests = []expTest{
- expTest{"5", "0", "", "1"},
- expTest{"-5", "0", "", "-1"},
- expTest{"5", "1", "", "5"},
- expTest{"-5", "1", "", "-5"},
- expTest{"-2", "3", "2", "0"},
- expTest{"5", "2", "", "25"},
- expTest{"1", "65537", "2", "1"},
- expTest{"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"},
- expTest{"0x8000000000000000", "2", "6719", "4944"},
- expTest{"0x8000000000000000", "3", "6719", "5447"},
- expTest{"0x8000000000000000", "1000", "6719", "1603"},
- expTest{"0x8000000000000000", "1000000", "6719", "3199"},
- expTest{
+ {"5", "0", "", "1"},
+ {"-5", "0", "", "-1"},
+ {"5", "1", "", "5"},
+ {"-5", "1", "", "-5"},
+ {"-2", "3", "2", "0"},
+ {"5", "2", "", "25"},
+ {"1", "65537", "2", "1"},
+ {"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"},
+ {"0x8000000000000000", "2", "6719", "4944"},
+ {"0x8000000000000000", "3", "6719", "5447"},
+ {"0x8000000000000000", "1000", "6719", "1603"},
+ {"0x8000000000000000", "1000000", "6719", "3199"},
+ {
"2938462938472983472983659726349017249287491026512746239764525612965293865296239471239874193284792387498274256129746192347",
"298472983472983471903246121093472394872319615612417471234712061",
"29834729834729834729347290846729561262544958723956495615629569234729836259263598127342374289365912465901365498236492183464",
@@ -671,7 +671,7 @@ type gcdTest struct {
var gcdTests = []gcdTest{
- gcdTest{120, 23, 1, -9, 47},
+ {120, 23, 1, -9, 47},
}
@@ -760,30 +760,30 @@ type intShiftTest struct {
var rshTests = []intShiftTest{
- intShiftTest{"0", 0, "0"},
- intShiftTest{"-0", 0, "0"},
- intShiftTest{"0", 1, "0"},
- intShiftTest{"0", 2, "0"},
- intShiftTest{"1", 0, "1"},
- intShiftTest{"1", 1, "0"},
- intShiftTest{"1", 2, "0"},
- intShiftTest{"2", 0, "2"},
- intShiftTest{"2", 1, "1"},
- intShiftTest{"-1", 0, "-1"},
- intShiftTest{"-1", 1, "-1"},
- intShiftTest{"-1", 10, "-1"},
- intShiftTest{"-100", 2, "-25"},
- intShiftTest{"-100", 3, "-13"},
- intShiftTest{"-100", 100, "-1"},
- intShiftTest{"4294967296", 0, "4294967296"},
- intShiftTest{"4294967296", 1, "2147483648"},
- intShiftTest{"4294967296", 2, "1073741824"},
- intShiftTest{"18446744073709551616", 0, "18446744073709551616"},
- intShiftTest{"18446744073709551616", 1, "9223372036854775808"},
- intShiftTest{"18446744073709551616", 2, "4611686018427387904"},
- intShiftTest{"18446744073709551616", 64, "1"},
- intShiftTest{"340282366920938463463374607431768211456", 64, "18446744073709551616"},
- intShiftTest{"340282366920938463463374607431768211456", 128, "1"},
+ {"0", 0, "0"},
+ {"-0", 0, "0"},
+ {"0", 1, "0"},
+ {"0", 2, "0"},
+ {"1", 0, "1"},
+ {"1", 1, "0"},
+ {"1", 2, "0"},
+ {"2", 0, "2"},
+ {"2", 1, "1"},
+ {"-1", 0, "-1"},
+ {"-1", 1, "-1"},
+ {"-1", 10, "-1"},
+ {"-100", 2, "-25"},
+ {"-100", 3, "-13"},
+ {"-100", 100, "-1"},
+ {"4294967296", 0, "4294967296"},
+ {"4294967296", 1, "2147483648"},
+ {"4294967296", 2, "1073741824"},
+ {"18446744073709551616", 0, "18446744073709551616"},
+ {"18446744073709551616", 1, "9223372036854775808"},
+ {"18446744073709551616", 2, "4611686018427387904"},
+ {"18446744073709551616", 64, "1"},
+ {"340282366920938463463374607431768211456", 64, "18446744073709551616"},
+ {"340282366920938463463374607431768211456", 128, "1"},
}
@@ -820,25 +820,25 @@ func TestRshSelf(t *testing.T) {
var lshTests = []intShiftTest{
- intShiftTest{"0", 0, "0"},
- intShiftTest{"0", 1, "0"},
- intShiftTest{"0", 2, "0"},
- intShiftTest{"1", 0, "1"},
- intShiftTest{"1", 1, "2"},
- intShiftTest{"1", 2, "4"},
- intShiftTest{"2", 0, "2"},
- intShiftTest{"2", 1, "4"},
- intShiftTest{"2", 2, "8"},
- intShiftTest{"-87", 1, "-174"},
- intShiftTest{"4294967296", 0, "4294967296"},
- intShiftTest{"4294967296", 1, "8589934592"},
- intShiftTest{"4294967296", 2, "17179869184"},
- intShiftTest{"18446744073709551616", 0, "18446744073709551616"},
- intShiftTest{"9223372036854775808", 1, "18446744073709551616"},
- intShiftTest{"4611686018427387904", 2, "18446744073709551616"},
- intShiftTest{"1", 64, "18446744073709551616"},
- intShiftTest{"18446744073709551616", 64, "340282366920938463463374607431768211456"},
- intShiftTest{"1", 128, "340282366920938463463374607431768211456"},
+ {"0", 0, "0"},
+ {"0", 1, "0"},
+ {"0", 2, "0"},
+ {"1", 0, "1"},
+ {"1", 1, "2"},
+ {"1", 2, "4"},
+ {"2", 0, "2"},
+ {"2", 1, "4"},
+ {"2", 2, "8"},
+ {"-87", 1, "-174"},
+ {"4294967296", 0, "4294967296"},
+ {"4294967296", 1, "8589934592"},
+ {"4294967296", 2, "17179869184"},
+ {"18446744073709551616", 0, "18446744073709551616"},
+ {"9223372036854775808", 1, "18446744073709551616"},
+ {"4611686018427387904", 2, "18446744073709551616"},
+ {"1", 64, "18446744073709551616"},
+ {"18446744073709551616", 64, "340282366920938463463374607431768211456"},
+ {"1", 128, "340282366920938463463374607431768211456"},
}
@@ -934,20 +934,20 @@ type bitwiseTest struct {
}
var bitwiseTests = []bitwiseTest{
- bitwiseTest{"0x00", "0x00", "0x00", "0x00", "0x00", "0x00"},
- bitwiseTest{"0x00", "0x01", "0x00", "0x01", "0x01", "0x00"},
- bitwiseTest{"0x01", "0x00", "0x00", "0x01", "0x01", "0x01"},
- bitwiseTest{"-0x01", "0x00", "0x00", "-0x01", "-0x01", "-0x01"},
- bitwiseTest{"-0xaf", "-0x50", "-0xf0", "-0x0f", "0xe1", "0x41"},
- bitwiseTest{"0x00", "-0x01", "0x00", "-0x01", "-0x01", "0x00"},
- bitwiseTest{"0x01", "0x01", "0x01", "0x01", "0x00", "0x00"},
- bitwiseTest{"-0x01", "-0x01", "-0x01", "-0x01", "0x00", "0x00"},
- bitwiseTest{"0x07", "0x08", "0x00", "0x0f", "0x0f", "0x07"},
- bitwiseTest{"0x05", "0x0f", "0x05", "0x0f", "0x0a", "0x00"},
- bitwiseTest{"0x013ff6", "0x9a4e", "0x1a46", "0x01bffe", "0x01a5b8", "0x0125b0"},
- bitwiseTest{"-0x013ff6", "0x9a4e", "0x800a", "-0x0125b2", "-0x01a5bc", "-0x01c000"},
- bitwiseTest{"-0x013ff6", "-0x9a4e", "-0x01bffe", "-0x1a46", "0x01a5b8", "0x8008"},
- bitwiseTest{
+ {"0x00", "0x00", "0x00", "0x00", "0x00", "0x00"},
+ {"0x00", "0x01", "0x00", "0x01", "0x01", "0x00"},
+ {"0x01", "0x00", "0x00", "0x01", "0x01", "0x01"},
+ {"-0x01", "0x00", "0x00", "-0x01", "-0x01", "-0x01"},
+ {"-0xaf", "-0x50", "-0xf0", "-0x0f", "0xe1", "0x41"},
+ {"0x00", "-0x01", "0x00", "-0x01", "-0x01", "0x00"},
+ {"0x01", "0x01", "0x01", "0x01", "0x00", "0x00"},
+ {"-0x01", "-0x01", "-0x01", "-0x01", "0x00", "0x00"},
+ {"0x07", "0x08", "0x00", "0x0f", "0x0f", "0x07"},
+ {"0x05", "0x0f", "0x05", "0x0f", "0x0a", "0x00"},
+ {"0x013ff6", "0x9a4e", "0x1a46", "0x01bffe", "0x01a5b8", "0x0125b0"},
+ {"-0x013ff6", "0x9a4e", "0x800a", "-0x0125b2", "-0x01a5bc", "-0x01c000"},
+ {"-0x013ff6", "-0x9a4e", "-0x01bffe", "-0x1a46", "0x01a5b8", "0x8008"},
+ {
"0x1000009dc6e3d9822cba04129bcbe3401",
"0xb9bd7d543685789d57cb918e833af352559021483cdb05cc21fd",
"0x1000001186210100001000009048c2001",
@@ -955,7 +955,7 @@ var bitwiseTests = []bitwiseTest{
"0xb9bd7d543685789d57ca918e8ae69d6fcdb2eae87df2b97215fc",
"0x8c40c2d8822caa04120b8321400",
},
- bitwiseTest{
+ {
"0x1000009dc6e3d9822cba04129bcbe3401",
"-0xb9bd7d543685789d57cb918e833af352559021483cdb05cc21fd",
"0x8c40c2d8822caa04120b8321401",
@@ -963,7 +963,7 @@ var bitwiseTests = []bitwiseTest{
"-0xb9bd7d543685789d57ca918e8ae69d6fcdb2eae87df2b97215fe",
"0x1000001186210100001000009048c2000",
},
- bitwiseTest{
+ {
"-0x1000009dc6e3d9822cba04129bcbe3401",
"-0xb9bd7d543685789d57cb918e833af352559021483cdb05cc21fd",
"-0xb9bd7d543685789d57cb918e8bfeff7fddb2ebe87dfbbdfe35fd",
@@ -1025,12 +1025,12 @@ type notTest struct {
}
var notTests = []notTest{
- notTest{"0", "-1"},
- notTest{"1", "-2"},
- notTest{"7", "-8"},
- notTest{"0", "-1"},
- notTest{"-81910", "81909"},
- notTest{
+ {"0", "-1"},
+ {"1", "-2"},
+ {"7", "-8"},
+ {"0", "-1"},
+ {"-81910", "81909"},
+ {
"298472983472983471903246121093472394872319615612417471234712061",
"-298472983472983471903246121093472394872319615612417471234712062",
},
@@ -1061,9 +1061,9 @@ type modInverseTest struct {
}
var modInverseTests = []modInverseTest{
- modInverseTest{"1", "7"},
- modInverseTest{"1", "13"},
- modInverseTest{"239487239847", "2410312426921032588552076022197566074856950548502459942654116941958108831682612228890093858261341614673227141477904012196503648957050582631942730706805009223062734745341073406696246014589361659774041027169249453200378729434170325843778659198143763193776859869524088940195577346119843545301547043747207749969763750084308926339295559968882457872412993810129130294592999947926365264059284647209730384947211681434464714438488520940127459844288859336526896320919633919"},
+ {"1", "7"},
+ {"1", "13"},
+ {"239487239847", "2410312426921032588552076022197566074856950548502459942654116941958108831682612228890093858261341614673227141477904012196503648957050582631942730706805009223062734745341073406696246014589361659774041027169249453200378729434170325843778659198143763193776859869524088940195577346119843545301547043747207749969763750084308926339295559968882457872412993810129130294592999947926365264059284647209730384947211681434464714438488520940127459844288859336526896320919633919"},
}
func TestModInverse(t *testing.T) {
diff --git a/src/pkg/big/nat_test.go b/src/pkg/big/nat_test.go
index 440ad7c70a..455d029ad9 100755
--- a/src/pkg/big/nat_test.go
+++ b/src/pkg/big/nat_test.go
@@ -13,20 +13,20 @@ type cmpTest struct {
var cmpTests = []cmpTest{
- cmpTest{nil, nil, 0},
- cmpTest{nil, nat{}, 0},
- cmpTest{nat{}, nil, 0},
- cmpTest{nat{}, nat{}, 0},
- cmpTest{nat{0}, nat{0}, 0},
- cmpTest{nat{0}, nat{1}, -1},
- cmpTest{nat{1}, nat{0}, 1},
- cmpTest{nat{1}, nat{1}, 0},
- cmpTest{nat{0, _M}, nat{1}, 1},
- cmpTest{nat{1}, nat{0, _M}, -1},
- cmpTest{nat{1, _M}, nat{0, _M}, 1},
- cmpTest{nat{0, _M}, nat{1, _M}, -1},
- cmpTest{nat{16, 571956, 8794, 68}, nat{837, 9146, 1, 754489}, -1},
- cmpTest{nat{34986, 41, 105, 1957}, nat{56, 7458, 104, 1957}, 1},
+ {nil, nil, 0},
+ {nil, nat{}, 0},
+ {nat{}, nil, 0},
+ {nat{}, nat{}, 0},
+ {nat{0}, nat{0}, 0},
+ {nat{0}, nat{1}, -1},
+ {nat{1}, nat{0}, 1},
+ {nat{1}, nat{1}, 0},
+ {nat{0, _M}, nat{1}, 1},
+ {nat{1}, nat{0, _M}, -1},
+ {nat{1, _M}, nat{0, _M}, 1},
+ {nat{0, _M}, nat{1, _M}, -1},
+ {nat{16, 571956, 8794, 68}, nat{837, 9146, 1, 754489}, -1},
+ {nat{34986, 41, 105, 1957}, nat{56, 7458, 104, 1957}, 1},
}
@@ -47,24 +47,24 @@ type argNN struct {
var sumNN = []argNN{
- argNN{},
- argNN{nat{1}, nil, nat{1}},
- argNN{nat{1111111110}, nat{123456789}, nat{987654321}},
- argNN{nat{0, 0, 0, 1}, nil, nat{0, 0, 0, 1}},
- argNN{nat{0, 0, 0, 1111111110}, nat{0, 0, 0, 123456789}, nat{0, 0, 0, 987654321}},
- argNN{nat{0, 0, 0, 1}, nat{0, 0, _M}, nat{0, 0, 1}},
+ {},
+ {nat{1}, nil, nat{1}},
+ {nat{1111111110}, nat{123456789}, nat{987654321}},
+ {nat{0, 0, 0, 1}, nil, nat{0, 0, 0, 1}},
+ {nat{0, 0, 0, 1111111110}, nat{0, 0, 0, 123456789}, nat{0, 0, 0, 987654321}},
+ {nat{0, 0, 0, 1}, nat{0, 0, _M}, nat{0, 0, 1}},
}
var prodNN = []argNN{
- argNN{},
- argNN{nil, nil, nil},
- argNN{nil, nat{991}, nil},
- argNN{nat{991}, nat{991}, nat{1}},
- argNN{nat{991 * 991}, nat{991}, nat{991}},
- argNN{nat{0, 0, 991 * 991}, nat{0, 991}, nat{0, 991}},
- argNN{nat{1 * 991, 2 * 991, 3 * 991, 4 * 991}, nat{1, 2, 3, 4}, nat{991}},
- argNN{nat{4, 11, 20, 30, 20, 11, 4}, nat{1, 2, 3, 4}, nat{4, 3, 2, 1}},
+ {},
+ {nil, nil, nil},
+ {nil, nat{991}, nil},
+ {nat{991}, nat{991}, nat{1}},
+ {nat{991 * 991}, nat{991}, nat{991}},
+ {nat{0, 0, 991 * 991}, nat{0, 991}, nat{0, 991}},
+ {nat{1 * 991, 2 * 991, 3 * 991, 4 * 991}, nat{1, 2, 3, 4}, nat{991}},
+ {nat{4, 11, 20, 30, 20, 11, 4}, nat{1, 2, 3, 4}, nat{4, 3, 2, 1}},
}
@@ -118,18 +118,18 @@ type mulRangeN struct {
var mulRangesN = []mulRangeN{
- mulRangeN{0, 0, "0"},
- mulRangeN{1, 1, "1"},
- mulRangeN{1, 2, "2"},
- mulRangeN{1, 3, "6"},
- mulRangeN{10, 10, "10"},
- mulRangeN{0, 100, "0"},
- mulRangeN{0, 1e9, "0"},
- mulRangeN{1, 0, "1"}, // empty range
- mulRangeN{100, 1, "1"}, // empty range
- mulRangeN{1, 10, "3628800"}, // 10!
- mulRangeN{1, 20, "2432902008176640000"}, // 20!
- mulRangeN{1, 100,
+ {0, 0, "0"},
+ {1, 1, "1"},
+ {1, 2, "2"},
+ {1, 3, "6"},
+ {10, 10, "10"},
+ {0, 100, "0"},
+ {0, 1e9, "0"},
+ {1, 0, "1"}, // empty range
+ {100, 1, "1"}, // empty range
+ {1, 10, "3628800"}, // 10!
+ {1, 20, "2432902008176640000"}, // 20!
+ {1, 100,
"933262154439441526816992388562667004907159682643816214685929" +
"638952175999932299156089414639761565182862536979208272237582" +
"51185210916864000000000000000000000000", // 100!
@@ -181,10 +181,10 @@ type str struct {
var tab = []str{
- str{nil, 10, "0"},
- str{nat{1}, 10, "1"},
- str{nat{10}, 10, "10"},
- str{nat{1234567890}, 10, "1234567890"},
+ {nil, 10, "0"},
+ {nat{1}, 10, "1"},
+ {nat{10}, 10, "10"},
+ {nat{1234567890}, 10, "1234567890"},
}
@@ -228,12 +228,12 @@ type shiftTest struct {
var leftShiftTests = []shiftTest{
- shiftTest{nil, 0, nil},
- shiftTest{nil, 1, nil},
- shiftTest{natOne, 0, natOne},
- shiftTest{natOne, 1, natTwo},
- shiftTest{nat{1 << (_W - 1)}, 1, nat{0}},
- shiftTest{nat{1 << (_W - 1), 0}, 1, nat{0, 1}},
+ {nil, 0, nil},
+ {nil, 1, nil},
+ {natOne, 0, natOne},
+ {natOne, 1, natTwo},
+ {nat{1 << (_W - 1)}, 1, nat{0}},
+ {nat{1 << (_W - 1), 0}, 1, nat{0, 1}},
}
@@ -252,13 +252,13 @@ func TestShiftLeft(t *testing.T) {
var rightShiftTests = []shiftTest{
- shiftTest{nil, 0, nil},
- shiftTest{nil, 1, nil},
- shiftTest{natOne, 0, natOne},
- shiftTest{natOne, 1, nil},
- shiftTest{natTwo, 1, natOne},
- shiftTest{nat{0, 1}, 1, nat{1 << (_W - 1)}},
- shiftTest{nat{2, 1, 1}, 1, nat{1<<(_W-1) + 1, 1 << (_W - 1)}},
+ {nil, 0, nil},
+ {nil, 1, nil},
+ {natOne, 0, natOne},
+ {natOne, 1, nil},
+ {natTwo, 1, natOne},
+ {nat{0, 1}, 1, nat{1 << (_W - 1)}},
+ {nat{2, 1, 1}, 1, nat{1<<(_W-1) + 1, 1 << (_W - 1)}},
}
@@ -284,12 +284,12 @@ type modWTest struct {
var modWTests32 = []modWTest{
- modWTest{"23492635982634928349238759823742", "252341", "220170"},
+ {"23492635982634928349238759823742", "252341", "220170"},
}
var modWTests64 = []modWTest{
- modWTest{"6527895462947293856291561095690465243862946", "524326975699234", "375066989628668"},
+ {"6527895462947293856291561095690465243862946", "524326975699234", "375066989628668"},
}
@@ -336,12 +336,12 @@ type expNNTest struct {
var expNNTests = []expNNTest{
- expNNTest{"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"},
- expNNTest{"0x8000000000000000", "2", "6719", "4944"},
- expNNTest{"0x8000000000000000", "3", "6719", "5447"},
- expNNTest{"0x8000000000000000", "1000", "6719", "1603"},
- expNNTest{"0x8000000000000000", "1000000", "6719", "3199"},
- expNNTest{
+ {"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"},
+ {"0x8000000000000000", "2", "6719", "4944"},
+ {"0x8000000000000000", "3", "6719", "5447"},
+ {"0x8000000000000000", "1000", "6719", "1603"},
+ {"0x8000000000000000", "1000000", "6719", "3199"},
+ {
"2938462938472983472983659726349017249287491026512746239764525612965293865296239471239874193284792387498274256129746192347",
"298472983472983471903246121093472394872319615612417471234712061",
"29834729834729834729347290846729561262544958723956495615629569234729836259263598127342374289365912465901365498236492183464",
diff --git a/src/pkg/big/rat_test.go b/src/pkg/big/rat_test.go
index ff2bb9978b..b9f15ff9d6 100644
--- a/src/pkg/big/rat_test.go
+++ b/src/pkg/big/rat_test.go
@@ -13,35 +13,35 @@ type setStringTest struct {
}
var setStringTests = []setStringTest{
- setStringTest{"0", "0", true},
- setStringTest{"-0", "0", true},
- setStringTest{"1", "1", true},
- setStringTest{"-1", "-1", true},
- setStringTest{"1.", "1", true},
- setStringTest{"1e0", "1", true},
- setStringTest{"1.e1", "10", true},
- setStringTest{in: "1e", ok: false},
- setStringTest{in: "1.e", ok: false},
- setStringTest{in: "1e+14e-5", ok: false},
- setStringTest{in: "1e4.5", ok: false},
- setStringTest{in: "r", ok: false},
- setStringTest{in: "a/b", ok: false},
- setStringTest{in: "a.b", ok: false},
- setStringTest{"-0.1", "-1/10", true},
- setStringTest{"-.1", "-1/10", true},
- setStringTest{"2/4", "1/2", true},
- setStringTest{".25", "1/4", true},
- setStringTest{"-1/5", "-1/5", true},
- setStringTest{"8129567.7690E14", "812956776900000000000", true},
- setStringTest{"78189e+4", "781890000", true},
- setStringTest{"553019.8935e+8", "55301989350000", true},
- setStringTest{"98765432109876543210987654321e-10", "98765432109876543210987654321/10000000000", true},
- setStringTest{"9877861857500000E-7", "3951144743/4", true},
- setStringTest{"2169378.417e-3", "2169378417/1000000", true},
- setStringTest{"884243222337379604041632732738665534", "884243222337379604041632732738665534", true},
- setStringTest{"53/70893980658822810696", "53/70893980658822810696", true},
- setStringTest{"106/141787961317645621392", "53/70893980658822810696", true},
- setStringTest{"204211327800791583.81095", "4084226556015831676219/20000", true},
+ {"0", "0", true},
+ {"-0", "0", true},
+ {"1", "1", true},
+ {"-1", "-1", true},
+ {"1.", "1", true},
+ {"1e0", "1", true},
+ {"1.e1", "10", true},
+ {in: "1e", ok: false},
+ {in: "1.e", ok: false},
+ {in: "1e+14e-5", ok: false},
+ {in: "1e4.5", ok: false},
+ {in: "r", ok: false},
+ {in: "a/b", ok: false},
+ {in: "a.b", ok: false},
+ {"-0.1", "-1/10", true},
+ {"-.1", "-1/10", true},
+ {"2/4", "1/2", true},
+ {".25", "1/4", true},
+ {"-1/5", "-1/5", true},
+ {"8129567.7690E14", "812956776900000000000", true},
+ {"78189e+4", "781890000", true},
+ {"553019.8935e+8", "55301989350000", true},
+ {"98765432109876543210987654321e-10", "98765432109876543210987654321/10000000000", true},
+ {"9877861857500000E-7", "3951144743/4", true},
+ {"2169378.417e-3", "2169378417/1000000", true},
+ {"884243222337379604041632732738665534", "884243222337379604041632732738665534", true},
+ {"53/70893980658822810696", "53/70893980658822810696", true},
+ {"106/141787961317645621392", "53/70893980658822810696", true},
+ {"204211327800791583.81095", "4084226556015831676219/20000", true},
}
func TestRatSetString(t *testing.T) {
@@ -62,20 +62,20 @@ type floatStringTest struct {
}
var floatStringTests = []floatStringTest{
- floatStringTest{"0", 0, "0"},
- floatStringTest{"0", 4, "0"},
- floatStringTest{"1", 0, "1"},
- floatStringTest{"1", 2, "1"},
- floatStringTest{"-1", 0, "-1"},
- floatStringTest{".25", 2, "0.25"},
- floatStringTest{".25", 1, "0.3"},
- floatStringTest{"-1/3", 3, "-0.333"},
- floatStringTest{"-2/3", 4, "-0.6667"},
- floatStringTest{"0.96", 1, "1.0"},
- floatStringTest{"0.999", 2, "1.00"},
- floatStringTest{"0.9", 0, "1"},
- floatStringTest{".25", -1, "0"},
- floatStringTest{".55", -1, "1"},
+ {"0", 0, "0"},
+ {"0", 4, "0"},
+ {"1", 0, "1"},
+ {"1", 2, "1"},
+ {"-1", 0, "-1"},
+ {".25", 2, "0.25"},
+ {".25", 1, "0.3"},
+ {"-1/3", 3, "-0.333"},
+ {"-2/3", 4, "-0.6667"},
+ {"0.96", 1, "1.0"},
+ {"0.999", 2, "1.00"},
+ {"0.9", 0, "1"},
+ {".25", -1, "0"},
+ {".55", -1, "1"},
}
func TestFloatString(t *testing.T) {
@@ -109,15 +109,15 @@ type ratCmpTest struct {
}
var ratCmpTests = []ratCmpTest{
- ratCmpTest{"0", "0/1", 0},
- ratCmpTest{"1/1", "1", 0},
- ratCmpTest{"-1", "-2/2", 0},
- ratCmpTest{"1", "0", 1},
- ratCmpTest{"0/1", "1/1", -1},
- ratCmpTest{"-5/1434770811533343057144", "-5/1434770811533343057145", -1},
- ratCmpTest{"49832350382626108453/8964749413", "49832350382626108454/8964749413", -1},
- ratCmpTest{"-37414950961700930/7204075375675961", "37414950961700930/7204075375675961", -1},
- ratCmpTest{"37414950961700930/7204075375675961", "74829901923401860/14408150751351922", 0},
+ {"0", "0/1", 0},
+ {"1/1", "1", 0},
+ {"-1", "-2/2", 0},
+ {"1", "0", 1},
+ {"0/1", "1/1", -1},
+ {"-5/1434770811533343057144", "-5/1434770811533343057145", -1},
+ {"49832350382626108453/8964749413", "49832350382626108454/8964749413", -1},
+ {"-37414950961700930/7204075375675961", "37414950961700930/7204075375675961", -1},
+ {"37414950961700930/7204075375675961", "74829901923401860/14408150751351922", 0},
}
func TestRatCmp(t *testing.T) {
@@ -188,24 +188,24 @@ type ratBinTest struct {
}
var ratBinTests = []ratBinTest{
- ratBinTest{"0", "0", "0", "0"},
- ratBinTest{"0", "1", "1", "0"},
- ratBinTest{"-1", "0", "-1", "0"},
- ratBinTest{"-1", "1", "0", "-1"},
- ratBinTest{"1", "1", "2", "1"},
- ratBinTest{"1/2", "1/2", "1", "1/4"},
- ratBinTest{"1/4", "1/3", "7/12", "1/12"},
- ratBinTest{"2/5", "-14/3", "-64/15", "-28/15"},
- ratBinTest{"4707/49292519774798173060", "-3367/70976135186689855734", "84058377121001851123459/1749296273614329067191168098769082663020", "-1760941/388732505247628681598037355282018369560"},
- ratBinTest{"-61204110018146728334/3", "-31052192278051565633/2", "-215564796870448153567/6", "950260896245257153059642991192710872711/3"},
- ratBinTest{"-854857841473707320655/4237645934602118692642972629634714039", "-18/31750379913563777419", "-27/133467566250814981", "15387441146526731771790/134546868362786310073779084329032722548987800600710485341"},
- ratBinTest{"618575745270541348005638912139/19198433543745179392300736", "-19948846211000086/637313996471", "27674141753240653/30123979153216", "-6169936206128396568797607742807090270137721977/6117715203873571641674006593837351328"},
- ratBinTest{"-3/26206484091896184128", "5/2848423294177090248", "15310893822118706237/9330894968229805033368778458685147968", "-5/24882386581946146755650075889827061248"},
- ratBinTest{"26946729/330400702820", "41563965/225583428284", "1238218672302860271/4658307703098666660055", "224002580204097/14906584649915733312176"},
- ratBinTest{"-8259900599013409474/7", "-84829337473700364773/56707961321161574960", "-468402123685491748914621885145127724451/396955729248131024720", "350340947706464153265156004876107029701/198477864624065512360"},
- ratBinTest{"575775209696864/1320203974639986246357", "29/712593081308", "410331716733912717985762465/940768218243776489278275419794956", "808/45524274987585732633"},
- ratBinTest{"1786597389946320496771/2066653520653241", "6269770/1992362624741777", "3559549865190272133656109052308126637/4117523232840525481453983149257", "8967230/3296219033"},
- ratBinTest{"-36459180403360509753/32150500941194292113930", "9381566963714/9633539", "301622077145533298008420642898530153/309723104686531919656937098270", "-3784609207827/3426986245"},
+ {"0", "0", "0", "0"},
+ {"0", "1", "1", "0"},
+ {"-1", "0", "-1", "0"},
+ {"-1", "1", "0", "-1"},
+ {"1", "1", "2", "1"},
+ {"1/2", "1/2", "1", "1/4"},
+ {"1/4", "1/3", "7/12", "1/12"},
+ {"2/5", "-14/3", "-64/15", "-28/15"},
+ {"4707/49292519774798173060", "-3367/70976135186689855734", "84058377121001851123459/1749296273614329067191168098769082663020", "-1760941/388732505247628681598037355282018369560"},
+ {"-61204110018146728334/3", "-31052192278051565633/2", "-215564796870448153567/6", "950260896245257153059642991192710872711/3"},
+ {"-854857841473707320655/4237645934602118692642972629634714039", "-18/31750379913563777419", "-27/133467566250814981", "15387441146526731771790/134546868362786310073779084329032722548987800600710485341"},
+ {"618575745270541348005638912139/19198433543745179392300736", "-19948846211000086/637313996471", "27674141753240653/30123979153216", "-6169936206128396568797607742807090270137721977/6117715203873571641674006593837351328"},
+ {"-3/26206484091896184128", "5/2848423294177090248", "15310893822118706237/9330894968229805033368778458685147968", "-5/24882386581946146755650075889827061248"},
+ {"26946729/330400702820", "41563965/225583428284", "1238218672302860271/4658307703098666660055", "224002580204097/14906584649915733312176"},
+ {"-8259900599013409474/7", "-84829337473700364773/56707961321161574960", "-468402123685491748914621885145127724451/396955729248131024720", "350340947706464153265156004876107029701/198477864624065512360"},
+ {"575775209696864/1320203974639986246357", "29/712593081308", "410331716733912717985762465/940768218243776489278275419794956", "808/45524274987585732633"},
+ {"1786597389946320496771/2066653520653241", "6269770/1992362624741777", "3559549865190272133656109052308126637/4117523232840525481453983149257", "8967230/3296219033"},
+ {"-36459180403360509753/32150500941194292113930", "9381566963714/9633539", "301622077145533298008420642898530153/309723104686531919656937098270", "-3784609207827/3426986245"},
}
func TestRatBin(t *testing.T) {
diff --git a/src/pkg/bufio/bufio_test.go b/src/pkg/bufio/bufio_test.go
index fe04b91691..753cf3e77f 100644
--- a/src/pkg/bufio/bufio_test.go
+++ b/src/pkg/bufio/bufio_test.go
@@ -80,10 +80,10 @@ type readMaker struct {
}
var readMakers = []readMaker{
- readMaker{"full", func(r io.Reader) io.Reader { return r }},
- readMaker{"byte", iotest.OneByteReader},
- readMaker{"half", iotest.HalfReader},
- readMaker{"data+err", iotest.DataErrReader},
+ {"full", func(r io.Reader) io.Reader { return r }},
+ {"byte", iotest.OneByteReader},
+ {"half", iotest.HalfReader},
+ {"data+err", iotest.DataErrReader},
}
// Call ReadString (which ends up calling everything else)
@@ -123,14 +123,14 @@ type bufReader struct {
}
var bufreaders = []bufReader{
- bufReader{"1", func(b *Reader) string { return reads(b, 1) }},
- bufReader{"2", func(b *Reader) string { return reads(b, 2) }},
- bufReader{"3", func(b *Reader) string { return reads(b, 3) }},
- bufReader{"4", func(b *Reader) string { return reads(b, 4) }},
- bufReader{"5", func(b *Reader) string { return reads(b, 5) }},
- bufReader{"7", func(b *Reader) string { return reads(b, 7) }},
- bufReader{"bytes", readBytes},
- bufReader{"lines", readLines},
+ {"1", func(b *Reader) string { return reads(b, 1) }},
+ {"2", func(b *Reader) string { return reads(b, 2) }},
+ {"3", func(b *Reader) string { return reads(b, 3) }},
+ {"4", func(b *Reader) string { return reads(b, 4) }},
+ {"5", func(b *Reader) string { return reads(b, 5) }},
+ {"7", func(b *Reader) string { return reads(b, 7) }},
+ {"bytes", readBytes},
+ {"lines", readLines},
}
var bufsizes = []int{
@@ -210,14 +210,14 @@ func readRuneSegments(t *testing.T, segments []string) {
}
var segmentList = [][]string{
- []string{},
- []string{""},
- []string{"日", "本語"},
- []string{"\u65e5", "\u672c", "\u8a9e"},
- []string{"\U000065e5", "\U0000672c", "\U00008a9e"},
- []string{"\xe6", "\x97\xa5\xe6", "\x9c\xac\xe8\xaa\x9e"},
- []string{"Hello", ", ", "World", "!"},
- []string{"Hello", ", ", "", "World", "!"},
+ {},
+ {""},
+ {"日", "本語"},
+ {"\u65e5", "\u672c", "\u8a9e"},
+ {"\U000065e5", "\U0000672c", "\U00008a9e"},
+ {"\xe6", "\x97\xa5\xe6", "\x9c\xac\xe8\xaa\x9e"},
+ {"Hello", ", ", "World", "!"},
+ {"Hello", ", ", "", "World", "!"},
}
func TestReadRune(t *testing.T) {
@@ -422,12 +422,12 @@ func (w errorWriterTest) Write(p []byte) (int, os.Error) {
}
var errorWriterTests = []errorWriterTest{
- errorWriterTest{0, 1, nil, io.ErrShortWrite},
- errorWriterTest{1, 2, nil, io.ErrShortWrite},
- errorWriterTest{1, 1, nil, nil},
- errorWriterTest{0, 1, os.EPIPE, os.EPIPE},
- errorWriterTest{1, 2, os.EPIPE, os.EPIPE},
- errorWriterTest{1, 1, os.EPIPE, os.EPIPE},
+ {0, 1, nil, io.ErrShortWrite},
+ {1, 2, nil, io.ErrShortWrite},
+ {1, 1, nil, nil},
+ {0, 1, os.EPIPE, os.EPIPE},
+ {1, 2, os.EPIPE, os.EPIPE},
+ {1, 1, os.EPIPE, os.EPIPE},
}
func TestWriteErrors(t *testing.T) {
diff --git a/src/pkg/bytes/bytes_test.go b/src/pkg/bytes/bytes_test.go
index de503878cd..a43708e0d8 100644
--- a/src/pkg/bytes/bytes_test.go
+++ b/src/pkg/bytes/bytes_test.go
@@ -46,16 +46,16 @@ type BinOpTest struct {
}
var comparetests = []BinOpTest{
- BinOpTest{"", "", 0},
- BinOpTest{"a", "", 1},
- BinOpTest{"", "a", -1},
- BinOpTest{"abc", "abc", 0},
- BinOpTest{"ab", "abc", -1},
- BinOpTest{"abc", "ab", 1},
- BinOpTest{"x", "ab", 1},
- BinOpTest{"ab", "x", -1},
- BinOpTest{"x", "a", 1},
- BinOpTest{"b", "x", -1},
+ {"", "", 0},
+ {"a", "", 1},
+ {"", "a", -1},
+ {"abc", "abc", 0},
+ {"ab", "abc", -1},
+ {"abc", "ab", 1},
+ {"x", "ab", 1},
+ {"ab", "x", -1},
+ {"x", "a", 1},
+ {"b", "x", -1},
}
func TestCompare(t *testing.T) {
@@ -74,64 +74,64 @@ func TestCompare(t *testing.T) {
}
var indexTests = []BinOpTest{
- BinOpTest{"", "", 0},
- BinOpTest{"", "a", -1},
- BinOpTest{"", "foo", -1},
- BinOpTest{"fo", "foo", -1},
- BinOpTest{"foo", "foo", 0},
- BinOpTest{"oofofoofooo", "f", 2},
- BinOpTest{"oofofoofooo", "foo", 4},
- BinOpTest{"barfoobarfoo", "foo", 3},
- BinOpTest{"foo", "", 0},
- BinOpTest{"foo", "o", 1},
- BinOpTest{"abcABCabc", "A", 3},
+ {"", "", 0},
+ {"", "a", -1},
+ {"", "foo", -1},
+ {"fo", "foo", -1},
+ {"foo", "foo", 0},
+ {"oofofoofooo", "f", 2},
+ {"oofofoofooo", "foo", 4},
+ {"barfoobarfoo", "foo", 3},
+ {"foo", "", 0},
+ {"foo", "o", 1},
+ {"abcABCabc", "A", 3},
// cases with one byte strings - test IndexByte and special case in Index()
- BinOpTest{"", "a", -1},
- BinOpTest{"x", "a", -1},
- BinOpTest{"x", "x", 0},
- BinOpTest{"abc", "a", 0},
- BinOpTest{"abc", "b", 1},
- BinOpTest{"abc", "c", 2},
- BinOpTest{"abc", "x", -1},
+ {"", "a", -1},
+ {"x", "a", -1},
+ {"x", "x", 0},
+ {"abc", "a", 0},
+ {"abc", "b", 1},
+ {"abc", "c", 2},
+ {"abc", "x", -1},
}
var lastIndexTests = []BinOpTest{
- BinOpTest{"", "", 0},
- BinOpTest{"", "a", -1},
- BinOpTest{"", "foo", -1},
- BinOpTest{"fo", "foo", -1},
- BinOpTest{"foo", "foo", 0},
- BinOpTest{"foo", "f", 0},
- BinOpTest{"oofofoofooo", "f", 7},
- BinOpTest{"oofofoofooo", "foo", 7},
- BinOpTest{"barfoobarfoo", "foo", 9},
- BinOpTest{"foo", "", 3},
- BinOpTest{"foo", "o", 2},
- BinOpTest{"abcABCabc", "A", 3},
- BinOpTest{"abcABCabc", "a", 6},
+ {"", "", 0},
+ {"", "a", -1},
+ {"", "foo", -1},
+ {"fo", "foo", -1},
+ {"foo", "foo", 0},
+ {"foo", "f", 0},
+ {"oofofoofooo", "f", 7},
+ {"oofofoofooo", "foo", 7},
+ {"barfoobarfoo", "foo", 9},
+ {"foo", "", 3},
+ {"foo", "o", 2},
+ {"abcABCabc", "A", 3},
+ {"abcABCabc", "a", 6},
}
var indexAnyTests = []BinOpTest{
- BinOpTest{"", "", -1},
- BinOpTest{"", "a", -1},
- BinOpTest{"", "abc", -1},
- BinOpTest{"a", "", -1},
- BinOpTest{"a", "a", 0},
- BinOpTest{"aaa", "a", 0},
- BinOpTest{"abc", "xyz", -1},
- BinOpTest{"abc", "xcz", 2},
- BinOpTest{"ab☺c", "x☺yz", 2},
- BinOpTest{"aRegExp*", ".(|)*+?^$[]", 7},
- BinOpTest{dots + dots + dots, " ", -1},
+ {"", "", -1},
+ {"", "a", -1},
+ {"", "abc", -1},
+ {"a", "", -1},
+ {"a", "a", 0},
+ {"aaa", "a", 0},
+ {"abc", "xyz", -1},
+ {"abc", "xcz", 2},
+ {"ab☺c", "x☺yz", 2},
+ {"aRegExp*", ".(|)*+?^$[]", 7},
+ {dots + dots + dots, " ", -1},
}
var indexRuneTests = []BinOpTest{
- BinOpTest{"", "a", -1},
- BinOpTest{"", "☺", -1},
- BinOpTest{"foo", "☹", -1},
- BinOpTest{"foo", "o", 1},
- BinOpTest{"foo☺bar", "☺", 3},
- BinOpTest{"foo☺☻☹bar", "☹", 9},
+ {"", "a", -1},
+ {"", "☺", -1},
+ {"foo", "☹", -1},
+ {"foo", "o", 1},
+ {"foo☺bar", "☺", 3},
+ {"foo☺☻☹bar", "☹", 9},
}
// Execute f on each test case. funcName should be the name of f; it's used
@@ -232,10 +232,10 @@ type ExplodeTest struct {
}
var explodetests = []ExplodeTest{
- ExplodeTest{"", -1, []string{}},
- ExplodeTest{abcd, -1, []string{"a", "b", "c", "d"}},
- ExplodeTest{faces, -1, []string{"☺", "☻", "☹"}},
- ExplodeTest{abcd, 2, []string{"a", "bcd"}},
+ {"", -1, []string{}},
+ {abcd, -1, []string{"a", "b", "c", "d"}},
+ {faces, -1, []string{"☺", "☻", "☹"}},
+ {abcd, 2, []string{"a", "bcd"}},
}
func TestExplode(t *testing.T) {
@@ -262,19 +262,19 @@ type SplitTest struct {
}
var splittests = []SplitTest{
- SplitTest{abcd, "a", 0, nil},
- SplitTest{abcd, "a", -1, []string{"", "bcd"}},
- SplitTest{abcd, "z", -1, []string{"abcd"}},
- SplitTest{abcd, "", -1, []string{"a", "b", "c", "d"}},
- SplitTest{commas, ",", -1, []string{"1", "2", "3", "4"}},
- SplitTest{dots, "...", -1, []string{"1", ".2", ".3", ".4"}},
- SplitTest{faces, "☹", -1, []string{"☺☻", ""}},
- SplitTest{faces, "~", -1, []string{faces}},
- SplitTest{faces, "", -1, []string{"☺", "☻", "☹"}},
- SplitTest{"1 2 3 4", " ", 3, []string{"1", "2", "3 4"}},
- SplitTest{"1 2", " ", 3, []string{"1", "2"}},
- SplitTest{"123", "", 2, []string{"1", "23"}},
- SplitTest{"123", "", 17, []string{"1", "2", "3"}},
+ {abcd, "a", 0, nil},
+ {abcd, "a", -1, []string{"", "bcd"}},
+ {abcd, "z", -1, []string{"abcd"}},
+ {abcd, "", -1, []string{"a", "b", "c", "d"}},
+ {commas, ",", -1, []string{"1", "2", "3", "4"}},
+ {dots, "...", -1, []string{"1", ".2", ".3", ".4"}},
+ {faces, "☹", -1, []string{"☺☻", ""}},
+ {faces, "~", -1, []string{faces}},
+ {faces, "", -1, []string{"☺", "☻", "☹"}},
+ {"1 2 3 4", " ", 3, []string{"1", "2", "3 4"}},
+ {"1 2", " ", 3, []string{"1", "2"}},
+ {"123", "", 2, []string{"1", "23"}},
+ {"123", "", 17, []string{"1", "2", "3"}},
}
func TestSplit(t *testing.T) {
@@ -296,19 +296,19 @@ func TestSplit(t *testing.T) {
}
var splitaftertests = []SplitTest{
- SplitTest{abcd, "a", -1, []string{"a", "bcd"}},
- SplitTest{abcd, "z", -1, []string{"abcd"}},
- SplitTest{abcd, "", -1, []string{"a", "b", "c", "d"}},
- SplitTest{commas, ",", -1, []string{"1,", "2,", "3,", "4"}},
- SplitTest{dots, "...", -1, []string{"1...", ".2...", ".3...", ".4"}},
- SplitTest{faces, "☹", -1, []string{"☺☻☹", ""}},
- SplitTest{faces, "~", -1, []string{faces}},
- SplitTest{faces, "", -1, []string{"☺", "☻", "☹"}},
- SplitTest{"1 2 3 4", " ", 3, []string{"1 ", "2 ", "3 4"}},
- SplitTest{"1 2 3", " ", 3, []string{"1 ", "2 ", "3"}},
- SplitTest{"1 2", " ", 3, []string{"1 ", "2"}},
- SplitTest{"123", "", 2, []string{"1", "23"}},
- SplitTest{"123", "", 17, []string{"1", "2", "3"}},
+ {abcd, "a", -1, []string{"a", "bcd"}},
+ {abcd, "z", -1, []string{"abcd"}},
+ {abcd, "", -1, []string{"a", "b", "c", "d"}},
+ {commas, ",", -1, []string{"1,", "2,", "3,", "4"}},
+ {dots, "...", -1, []string{"1...", ".2...", ".3...", ".4"}},
+ {faces, "☹", -1, []string{"☺☻☹", ""}},
+ {faces, "~", -1, []string{faces}},
+ {faces, "", -1, []string{"☺", "☻", "☹"}},
+ {"1 2 3 4", " ", 3, []string{"1 ", "2 ", "3 4"}},
+ {"1 2 3", " ", 3, []string{"1 ", "2 ", "3"}},
+ {"1 2", " ", 3, []string{"1 ", "2"}},
+ {"123", "", 2, []string{"1", "23"}},
+ {"123", "", 17, []string{"1", "2", "3"}},
}
func TestSplitAfter(t *testing.T) {
@@ -332,17 +332,17 @@ type FieldsTest struct {
}
var fieldstests = []FieldsTest{
- FieldsTest{"", []string{}},
- FieldsTest{" ", []string{}},
- FieldsTest{" \t ", []string{}},
- FieldsTest{" abc ", []string{"abc"}},
- FieldsTest{"1 2 3 4", []string{"1", "2", "3", "4"}},
- FieldsTest{"1 2 3 4", []string{"1", "2", "3", "4"}},
- FieldsTest{"1\t\t2\t\t3\t4", []string{"1", "2", "3", "4"}},
- FieldsTest{"1\u20002\u20013\u20024", []string{"1", "2", "3", "4"}},
- FieldsTest{"\u2000\u2001\u2002", []string{}},
- FieldsTest{"\n™\t™\n", []string{"™", "™"}},
- FieldsTest{faces, []string{faces}},
+ {"", []string{}},
+ {" ", []string{}},
+ {" \t ", []string{}},
+ {" abc ", []string{"abc"}},
+ {"1 2 3 4", []string{"1", "2", "3", "4"}},
+ {"1 2 3 4", []string{"1", "2", "3", "4"}},
+ {"1\t\t2\t\t3\t4", []string{"1", "2", "3", "4"}},
+ {"1\u20002\u20013\u20024", []string{"1", "2", "3", "4"}},
+ {"\u2000\u2001\u2002", []string{}},
+ {"\n™\t™\n", []string{"™", "™"}},
+ {faces, []string{faces}},
}
func TestFields(t *testing.T) {
@@ -359,10 +359,10 @@ func TestFields(t *testing.T) {
func TestFieldsFunc(t *testing.T) {
pred := func(c int) bool { return c == 'X' }
var fieldsFuncTests = []FieldsTest{
- FieldsTest{"", []string{}},
- FieldsTest{"XX", []string{}},
- FieldsTest{"XXhiXXX", []string{"hi"}},
- FieldsTest{"aXXbXXXcX", []string{"a", "b", "c"}},
+ {"", []string{}},
+ {"XX", []string{}},
+ {"XXhiXXX", []string{"hi"}},
+ {"aXXbXXXcX", []string{"a", "b", "c"}},
}
for _, tt := range fieldsFuncTests {
a := FieldsFunc([]byte(tt.s), pred)
@@ -380,40 +380,40 @@ type StringTest struct {
}
var upperTests = []StringTest{
- StringTest{"", ""},
- StringTest{"abc", "ABC"},
- StringTest{"AbC123", "ABC123"},
- StringTest{"azAZ09_", "AZAZ09_"},
- StringTest{"\u0250\u0250\u0250\u0250\u0250", "\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F"}, // grows one byte per char
+ {"", ""},
+ {"abc", "ABC"},
+ {"AbC123", "ABC123"},
+ {"azAZ09_", "AZAZ09_"},
+ {"\u0250\u0250\u0250\u0250\u0250", "\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F"}, // grows one byte per char
}
var lowerTests = []StringTest{
- StringTest{"", ""},
- StringTest{"abc", "abc"},
- StringTest{"AbC123", "abc123"},
- StringTest{"azAZ09_", "azaz09_"},
- StringTest{"\u2C6D\u2C6D\u2C6D\u2C6D\u2C6D", "\u0251\u0251\u0251\u0251\u0251"}, // shrinks one byte per char
+ {"", ""},
+ {"abc", "abc"},
+ {"AbC123", "abc123"},
+ {"azAZ09_", "azaz09_"},
+ {"\u2C6D\u2C6D\u2C6D\u2C6D\u2C6D", "\u0251\u0251\u0251\u0251\u0251"}, // shrinks one byte per char
}
const space = "\t\v\r\f\n\u0085\u00a0\u2000\u3000"
var trimSpaceTests = []StringTest{
- StringTest{"", ""},
- StringTest{"abc", "abc"},
- StringTest{space + "abc" + space, "abc"},
- StringTest{" ", ""},
- StringTest{" \t\r\n \t\t\r\r\n\n ", ""},
- StringTest{" \t\r\n x\t\t\r\r\n\n ", "x"},
- StringTest{" \u2000\t\r\n x\t\t\r\r\ny\n \u3000", "x\t\t\r\r\ny"},
- StringTest{"1 \t\r\n2", "1 \t\r\n2"},
- StringTest{" x\x80", "x\x80"},
- StringTest{" x\xc0", "x\xc0"},
- StringTest{"x \xc0\xc0 ", "x \xc0\xc0"},
- StringTest{"x \xc0", "x \xc0"},
- StringTest{"x \xc0 ", "x \xc0"},
- StringTest{"x \xc0\xc0 ", "x \xc0\xc0"},
- StringTest{"x ☺\xc0\xc0 ", "x ☺\xc0\xc0"},
- StringTest{"x ☺ ", "x ☺"},
+ {"", ""},
+ {"abc", "abc"},
+ {space + "abc" + space, "abc"},
+ {" ", ""},
+ {" \t\r\n \t\t\r\r\n\n ", ""},
+ {" \t\r\n x\t\t\r\r\n\n ", "x"},
+ {" \u2000\t\r\n x\t\t\r\r\ny\n \u3000", "x\t\t\r\r\ny"},
+ {"1 \t\r\n2", "1 \t\r\n2"},
+ {" x\x80", "x\x80"},
+ {" x\xc0", "x\xc0"},
+ {"x \xc0\xc0 ", "x \xc0\xc0"},
+ {"x \xc0", "x \xc0"},
+ {"x \xc0 ", "x \xc0"},
+ {"x \xc0\xc0 ", "x \xc0\xc0"},
+ {"x ☺\xc0\xc0 ", "x ☺\xc0\xc0"},
+ {"x ☺ ", "x ☺"},
}
// Bytes returns a new slice containing the bytes in s.
@@ -517,10 +517,10 @@ type AddTest struct {
}
var addtests = []AddTest{
- AddTest{"", "", 0},
- AddTest{"a", "", 1},
- AddTest{"a", "b", 1},
- AddTest{"abc", "def", 100},
+ {"", "", 0},
+ {"a", "", 1},
+ {"a", "b", 1},
+ {"abc", "def", 100},
}
func TestAdd(t *testing.T) {
@@ -558,13 +558,13 @@ type RepeatTest struct {
}
var RepeatTests = []RepeatTest{
- RepeatTest{"", "", 0},
- RepeatTest{"", "", 1},
- RepeatTest{"", "", 2},
- RepeatTest{"-", "", 0},
- RepeatTest{"-", "-", 1},
- RepeatTest{"-", "----------", 10},
- RepeatTest{"abc ", "abc abc abc ", 3},
+ {"", "", 0},
+ {"", "", 1},
+ {"", "", 2},
+ {"-", "", 0},
+ {"-", "-", 1},
+ {"-", "----------", 10},
+ {"abc ", "abc abc abc ", 3},
}
func TestRepeat(t *testing.T) {
@@ -598,13 +598,13 @@ type RunesTest struct {
}
var RunesTests = []RunesTest{
- RunesTest{"", []int{}, false},
- RunesTest{" ", []int{32}, false},
- RunesTest{"ABC", []int{65, 66, 67}, false},
- RunesTest{"abc", []int{97, 98, 99}, false},
- RunesTest{"\u65e5\u672c\u8a9e", []int{26085, 26412, 35486}, false},
- RunesTest{"ab\x80c", []int{97, 98, 0xFFFD, 99}, true},
- RunesTest{"ab\xc0c", []int{97, 98, 0xFFFD, 99}, true},
+ {"", []int{}, false},
+ {" ", []int{32}, false},
+ {"ABC", []int{65, 66, 67}, false},
+ {"abc", []int{97, 98, 99}, false},
+ {"\u65e5\u672c\u8a9e", []int{26085, 26412, 35486}, false},
+ {"ab\x80c", []int{97, 98, 0xFFFD, 99}, true},
+ {"ab\xc0c", []int{97, 98, 0xFFFD, 99}, true},
}
func TestRunes(t *testing.T) {
@@ -632,27 +632,27 @@ type TrimTest struct {
}
var trimTests = []TrimTest{
- TrimTest{Trim, "abba", "a", "bb"},
- TrimTest{Trim, "abba", "ab", ""},
- TrimTest{TrimLeft, "abba", "ab", ""},
- TrimTest{TrimRight, "abba", "ab", ""},
- TrimTest{TrimLeft, "abba", "a", "bba"},
- TrimTest{TrimRight, "abba", "a", "abb"},
- TrimTest{Trim, "<tag>", "<>", "tag"},
- TrimTest{Trim, "* listitem", " *", "listitem"},
- TrimTest{Trim, `"quote"`, `"`, "quote"},
- TrimTest{Trim, "\u2C6F\u2C6F\u0250\u0250\u2C6F\u2C6F", "\u2C6F", "\u0250\u0250"},
+ {Trim, "abba", "a", "bb"},
+ {Trim, "abba", "ab", ""},
+ {TrimLeft, "abba", "ab", ""},
+ {TrimRight, "abba", "ab", ""},
+ {TrimLeft, "abba", "a", "bba"},
+ {TrimRight, "abba", "a", "abb"},
+ {Trim, "<tag>", "<>", "tag"},
+ {Trim, "* listitem", " *", "listitem"},
+ {Trim, `"quote"`, `"`, "quote"},
+ {Trim, "\u2C6F\u2C6F\u0250\u0250\u2C6F\u2C6F", "\u2C6F", "\u0250\u0250"},
//empty string tests
- TrimTest{Trim, "abba", "", "abba"},
- TrimTest{Trim, "", "123", ""},
- TrimTest{Trim, "", "", ""},
- TrimTest{TrimLeft, "abba", "", "abba"},
- TrimTest{TrimLeft, "", "123", ""},
- TrimTest{TrimLeft, "", "", ""},
- TrimTest{TrimRight, "abba", "", "abba"},
- TrimTest{TrimRight, "", "123", ""},
- TrimTest{TrimRight, "", "", ""},
- TrimTest{TrimRight, "☺\xc0", "☺", "☺\xc0"},
+ {Trim, "abba", "", "abba"},
+ {Trim, "", "123", ""},
+ {Trim, "", "", ""},
+ {TrimLeft, "abba", "", "abba"},
+ {TrimLeft, "", "123", ""},
+ {TrimLeft, "", "", ""},
+ {TrimRight, "abba", "", "abba"},
+ {TrimRight, "", "123", ""},
+ {TrimRight, "", "", ""},
+ {TrimRight, "☺\xc0", "☺", "☺\xc0"},
}
func TestTrim(t *testing.T) {
@@ -705,13 +705,13 @@ func not(p predicate) predicate {
}
var trimFuncTests = []TrimFuncTest{
- TrimFuncTest{isSpace, space + " hello " + space, "hello"},
- TrimFuncTest{isDigit, "\u0e50\u0e5212hello34\u0e50\u0e51", "hello"},
- TrimFuncTest{isUpper, "\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", "hello"},
- TrimFuncTest{not(isSpace), "hello" + space + "hello", space},
- TrimFuncTest{not(isDigit), "hello\u0e50\u0e521234\u0e50\u0e51helo", "\u0e50\u0e521234\u0e50\u0e51"},
- TrimFuncTest{isValidRune, "ab\xc0a\xc0cd", "\xc0a\xc0"},
- TrimFuncTest{not(isValidRune), "\xc0a\xc0", "a"},
+ {isSpace, space + " hello " + space, "hello"},
+ {isDigit, "\u0e50\u0e5212hello34\u0e50\u0e51", "hello"},
+ {isUpper, "\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", "hello"},
+ {not(isSpace), "hello" + space + "hello", space},
+ {not(isDigit), "hello\u0e50\u0e521234\u0e50\u0e51helo", "\u0e50\u0e521234\u0e50\u0e51"},
+ {isValidRune, "ab\xc0a\xc0cd", "\xc0a\xc0"},
+ {not(isValidRune), "\xc0a\xc0", "a"},
}
func TestTrimFunc(t *testing.T) {
@@ -730,24 +730,24 @@ type IndexFuncTest struct {
}
var indexFuncTests = []IndexFuncTest{
- IndexFuncTest{"", isValidRune, -1, -1},
- IndexFuncTest{"abc", isDigit, -1, -1},
- IndexFuncTest{"0123", isDigit, 0, 3},
- IndexFuncTest{"a1b", isDigit, 1, 1},
- IndexFuncTest{space, isSpace, 0, len(space) - 3}, // last rune in space is 3 bytes
- IndexFuncTest{"\u0e50\u0e5212hello34\u0e50\u0e51", isDigit, 0, 18},
- IndexFuncTest{"\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", isUpper, 0, 34},
- IndexFuncTest{"12\u0e50\u0e52hello34\u0e50\u0e51", not(isDigit), 8, 12},
+ {"", isValidRune, -1, -1},
+ {"abc", isDigit, -1, -1},
+ {"0123", isDigit, 0, 3},
+ {"a1b", isDigit, 1, 1},
+ {space, isSpace, 0, len(space) - 3}, // last rune in space is 3 bytes
+ {"\u0e50\u0e5212hello34\u0e50\u0e51", isDigit, 0, 18},
+ {"\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", isUpper, 0, 34},
+ {"12\u0e50\u0e52hello34\u0e50\u0e51", not(isDigit), 8, 12},
// tests of invalid UTF-8
- IndexFuncTest{"\x801", isDigit, 1, 1},
- IndexFuncTest{"\x80abc", isDigit, -1, -1},
- IndexFuncTest{"\xc0a\xc0", isValidRune, 1, 1},
- IndexFuncTest{"\xc0a\xc0", not(isValidRune), 0, 2},
- IndexFuncTest{"\xc0☺\xc0", not(isValidRune), 0, 4},
- IndexFuncTest{"\xc0☺\xc0\xc0", not(isValidRune), 0, 5},
- IndexFuncTest{"ab\xc0a\xc0cd", not(isValidRune), 2, 4},
- IndexFuncTest{"a\xe0\x80cd", not(isValidRune), 1, 2},
+ {"\x801", isDigit, 1, 1},
+ {"\x80abc", isDigit, -1, -1},
+ {"\xc0a\xc0", isValidRune, 1, 1},
+ {"\xc0a\xc0", not(isValidRune), 0, 2},
+ {"\xc0☺\xc0", not(isValidRune), 0, 4},
+ {"\xc0☺\xc0\xc0", not(isValidRune), 0, 5},
+ {"ab\xc0a\xc0cd", not(isValidRune), 2, 4},
+ {"a\xe0\x80cd", not(isValidRune), 1, 2},
}
func TestIndexFunc(t *testing.T) {
@@ -771,25 +771,25 @@ type ReplaceTest struct {
}
var ReplaceTests = []ReplaceTest{
- ReplaceTest{"hello", "l", "L", 0, "hello"},
- ReplaceTest{"hello", "l", "L", -1, "heLLo"},
- ReplaceTest{"hello", "x", "X", -1, "hello"},
- ReplaceTest{"", "x", "X", -1, ""},
- ReplaceTest{"radar", "r", "<r>", -1, "<r>ada<r>"},
- ReplaceTest{"", "", "<>", -1, "<>"},
- ReplaceTest{"banana", "a", "<>", -1, "b<>n<>n<>"},
- ReplaceTest{"banana", "a", "<>", 1, "b<>nana"},
- ReplaceTest{"banana", "a", "<>", 1000, "b<>n<>n<>"},
- ReplaceTest{"banana", "an", "<>", -1, "b<><>a"},
- ReplaceTest{"banana", "ana", "<>", -1, "b<>na"},
- ReplaceTest{"banana", "", "<>", -1, "<>b<>a<>n<>a<>n<>a<>"},
- ReplaceTest{"banana", "", "<>", 10, "<>b<>a<>n<>a<>n<>a<>"},
- ReplaceTest{"banana", "", "<>", 6, "<>b<>a<>n<>a<>n<>a"},
- ReplaceTest{"banana", "", "<>", 5, "<>b<>a<>n<>a<>na"},
- ReplaceTest{"banana", "", "<>", 1, "<>banana"},
- ReplaceTest{"banana", "a", "a", -1, "banana"},
- ReplaceTest{"banana", "a", "a", 1, "banana"},
- ReplaceTest{"☺☻☹", "", "<>", -1, "<>☺<>☻<>☹<>"},
+ {"hello", "l", "L", 0, "hello"},
+ {"hello", "l", "L", -1, "heLLo"},
+ {"hello", "x", "X", -1, "hello"},
+ {"", "x", "X", -1, ""},
+ {"radar", "r", "<r>", -1, "<r>ada<r>"},
+ {"", "", "<>", -1, "<>"},
+ {"banana", "a", "<>", -1, "b<>n<>n<>"},
+ {"banana", "a", "<>", 1, "b<>nana"},
+ {"banana", "a", "<>", 1000, "b<>n<>n<>"},
+ {"banana", "an", "<>", -1, "b<><>a"},
+ {"banana", "ana", "<>", -1, "b<>na"},
+ {"banana", "", "<>", -1, "<>b<>a<>n<>a<>n<>a<>"},
+ {"banana", "", "<>", 10, "<>b<>a<>n<>a<>n<>a<>"},
+ {"banana", "", "<>", 6, "<>b<>a<>n<>a<>n<>a"},
+ {"banana", "", "<>", 5, "<>b<>a<>n<>a<>na"},
+ {"banana", "", "<>", 1, "<>banana"},
+ {"banana", "a", "a", -1, "banana"},
+ {"banana", "a", "a", 1, "banana"},
+ {"☺☻☹", "", "<>", -1, "<>☺<>☻<>☹<>"},
}
func TestReplace(t *testing.T) {
@@ -805,13 +805,13 @@ type TitleTest struct {
}
var TitleTests = []TitleTest{
- TitleTest{"", ""},
- TitleTest{"a", "A"},
- TitleTest{" aaa aaa aaa ", " Aaa Aaa Aaa "},
- TitleTest{" Aaa Aaa Aaa ", " Aaa Aaa Aaa "},
- TitleTest{"123a456", "123a456"},
- TitleTest{"double-blind", "Double-Blind"},
- TitleTest{"ÿøû", "Ÿøû"},
+ {"", ""},
+ {"a", "A"},
+ {" aaa aaa aaa ", " Aaa Aaa Aaa "},
+ {" Aaa Aaa Aaa ", " Aaa Aaa Aaa "},
+ {"123a456", "123a456"},
+ {"double-blind", "Double-Blind"},
+ {"ÿøû", "Ÿøû"},
}
func TestTitle(t *testing.T) {
diff --git a/src/pkg/cmath/cmath_test.go b/src/pkg/cmath/cmath_test.go
index 48aa5b2586..93fac4e206 100644
--- a/src/pkg/cmath/cmath_test.go
+++ b/src/pkg/cmath/cmath_test.go
@@ -203,16 +203,16 @@ type ff struct {
}
var polar = []ff{
- ff{9.2022120669932650313380972e+00, 9.9909115046919291062461269e-01},
- ff{7.7438239742296106616261394e+00, -3.5762575021856971295156489e-02},
- ff{5.0182478202557746902556648e+00, -1.6259990074019058442232221e+00},
- ff{1.0861137372799545160704002e+01, 2.0502936359659111755031062e+00},
- ff{1.0070841084922199607011905e+01, 2.9483213155446756211881774e-01},
- ff{5.9922447613166942183705192e+00, 1.0605860367252556281902109e+00},
- ff{5.8978784056736762299945176e+00, 4.8084556083358307819310911e-01},
- ff{3.2822866700678709020367184e+00, 5.8969634164776659423195222e-01},
- ff{8.8756430028990417290744307e+00, -1.3636647724582455028314573e+00},
- ff{1.0011785496777731986390856e+01, 2.6210913895386013290915234e+00},
+ {9.2022120669932650313380972e+00, 9.9909115046919291062461269e-01},
+ {7.7438239742296106616261394e+00, -3.5762575021856971295156489e-02},
+ {5.0182478202557746902556648e+00, -1.6259990074019058442232221e+00},
+ {1.0861137372799545160704002e+01, 2.0502936359659111755031062e+00},
+ {1.0070841084922199607011905e+01, 2.9483213155446756211881774e-01},
+ {5.9922447613166942183705192e+00, 1.0605860367252556281902109e+00},
+ {5.8978784056736762299945176e+00, 4.8084556083358307819310911e-01},
+ {3.2822866700678709020367184e+00, 5.8969634164776659423195222e-01},
+ {8.8756430028990417290744307e+00, -1.3636647724582455028314573e+00},
+ {1.0011785496777731986390856e+01, 2.6210913895386013290915234e+00},
}
var pow = []complex128{
(-2.499956739197529585028819e+00 + 1.759751724335650228957144e+00i),
@@ -392,10 +392,10 @@ var vcPolarSC = []complex128{
NaN(),
}
var polarSC = []ff{
- ff{math.NaN(), math.NaN()},
+ {math.NaN(), math.NaN()},
}
var vcPowSC = [][2]complex128{
- [2]complex128{NaN(), NaN()},
+ {NaN(), NaN()},
}
var powSC = []complex128{
NaN(),
diff --git a/src/pkg/compress/flate/deflate.go b/src/pkg/compress/flate/deflate.go
index 79952e713a..509c8debd1 100644
--- a/src/pkg/compress/flate/deflate.go
+++ b/src/pkg/compress/flate/deflate.go
@@ -53,19 +53,19 @@ type compressionLevel struct {
}
var levels = []compressionLevel{
- compressionLevel{}, // 0
+ {}, // 0
// For levels 1-3 we don't bother trying with lazy matches
- compressionLevel{3, 0, 8, 4, 4},
- compressionLevel{3, 0, 16, 8, 5},
- compressionLevel{3, 0, 32, 32, 6},
+ {3, 0, 8, 4, 4},
+ {3, 0, 16, 8, 5},
+ {3, 0, 32, 32, 6},
// Levels 4-9 use increasingly more lazy matching
// and increasingly stringent conditions for "good enough".
- compressionLevel{4, 4, 16, 16, math.MaxInt32},
- compressionLevel{8, 16, 32, 32, math.MaxInt32},
- compressionLevel{8, 16, 128, 128, math.MaxInt32},
- compressionLevel{8, 32, 128, 256, math.MaxInt32},
- compressionLevel{32, 128, 258, 1024, math.MaxInt32},
- compressionLevel{32, 258, 258, 4096, math.MaxInt32},
+ {4, 4, 16, 16, math.MaxInt32},
+ {8, 16, 32, 32, math.MaxInt32},
+ {8, 16, 128, 128, math.MaxInt32},
+ {8, 32, 128, 256, math.MaxInt32},
+ {32, 128, 258, 1024, math.MaxInt32},
+ {32, 258, 258, 4096, math.MaxInt32},
}
func (sw *syncPipeWriter) Close() os.Error {
diff --git a/src/pkg/compress/gzip/gunzip_test.go b/src/pkg/compress/gzip/gunzip_test.go
index d5ac0cc143..1c08c7374c 100644
--- a/src/pkg/compress/gzip/gunzip_test.go
+++ b/src/pkg/compress/gzip/gunzip_test.go
@@ -20,7 +20,7 @@ type gunzipTest struct {
}
var gunzipTests = []gunzipTest{
- gunzipTest{ // has 1 empty fixed-huffman block
+ { // has 1 empty fixed-huffman block
"empty.txt",
"empty.txt",
"",
@@ -32,7 +32,7 @@ var gunzipTests = []gunzipTest{
},
nil,
},
- gunzipTest{ // has 1 non-empty fixed huffman block
+ { // has 1 non-empty fixed huffman block
"hello.txt",
"hello.txt",
"hello world\n",
@@ -46,7 +46,7 @@ var gunzipTests = []gunzipTest{
},
nil,
},
- gunzipTest{ // concatenation
+ { // concatenation
"hello.txt",
"hello.txt x2",
"hello world\n" +
@@ -67,7 +67,7 @@ var gunzipTests = []gunzipTest{
},
nil,
},
- gunzipTest{ // has a fixed huffman block with some length-distance pairs
+ { // has a fixed huffman block with some length-distance pairs
"shesells.txt",
"shesells.txt",
"she sells seashells by the seashore\n",
@@ -83,7 +83,7 @@ var gunzipTests = []gunzipTest{
},
nil,
},
- gunzipTest{ // has dynamic huffman blocks
+ { // has dynamic huffman blocks
"gettysburg",
"gettysburg",
" Four score and seven years ago our fathers brought forth on\n" +
@@ -221,7 +221,7 @@ var gunzipTests = []gunzipTest{
},
nil,
},
- gunzipTest{ // has 1 non-empty fixed huffman block then garbage
+ { // has 1 non-empty fixed huffman block then garbage
"hello.txt",
"hello.txt + garbage",
"hello world\n",
@@ -235,7 +235,7 @@ var gunzipTests = []gunzipTest{
},
HeaderError,
},
- gunzipTest{ // has 1 non-empty fixed huffman block not enough header
+ { // has 1 non-empty fixed huffman block not enough header
"hello.txt",
"hello.txt + garbage",
"hello world\n",
@@ -249,7 +249,7 @@ var gunzipTests = []gunzipTest{
},
io.ErrUnexpectedEOF,
},
- gunzipTest{ // has 1 non-empty fixed huffman block but corrupt checksum
+ { // has 1 non-empty fixed huffman block but corrupt checksum
"hello.txt",
"hello.txt + corrupt checksum",
"hello world\n",
@@ -263,7 +263,7 @@ var gunzipTests = []gunzipTest{
},
ChecksumError,
},
- gunzipTest{ // has 1 non-empty fixed huffman block but corrupt size
+ { // has 1 non-empty fixed huffman block but corrupt size
"hello.txt",
"hello.txt + corrupt size",
"hello world\n",
diff --git a/src/pkg/compress/zlib/reader_test.go b/src/pkg/compress/zlib/reader_test.go
index 8ae8d00700..eaefc3a361 100644
--- a/src/pkg/compress/zlib/reader_test.go
+++ b/src/pkg/compress/zlib/reader_test.go
@@ -22,13 +22,13 @@ type zlibTest struct {
// http://www.zlib.net/zpipe.c
var zlibTests = []zlibTest{
- zlibTest{
+ {
"empty",
"",
[]byte{0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01},
nil,
},
- zlibTest{
+ {
"goodbye",
"goodbye, world",
[]byte{
@@ -38,25 +38,25 @@ var zlibTests = []zlibTest{
},
nil,
},
- zlibTest{
+ {
"bad header",
"",
[]byte{0x78, 0x9f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01},
HeaderError,
},
- zlibTest{
+ {
"bad checksum",
"",
[]byte{0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff},
ChecksumError,
},
- zlibTest{
+ {
"not enough data",
"",
[]byte{0x78, 0x9c, 0x03, 0x00, 0x00, 0x00},
io.ErrUnexpectedEOF,
},
- zlibTest{
+ {
"excess data is silently ignored",
"",
[]byte{
diff --git a/src/pkg/crypto/aes/aes_test.go b/src/pkg/crypto/aes/aes_test.go
index 1629a33ed7..f8cec0366a 100644
--- a/src/pkg/crypto/aes/aes_test.go
+++ b/src/pkg/crypto/aes/aes_test.go
@@ -130,7 +130,7 @@ type KeyTest struct {
}
var keyTests = []KeyTest{
- KeyTest{
+ {
// A.1. Expansion of a 128-bit Cipher Key
[]byte{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
[]uint32{
@@ -160,7 +160,7 @@ var keyTests = []KeyTest{
0x2b7e1516, 0x28aed2a6, 0xabf71588, 0x9cf4f3c,
},
},
- KeyTest{
+ {
// A.2. Expansion of a 192-bit Cipher Key
[]byte{
0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -183,7 +183,7 @@ var keyTests = []KeyTest{
},
nil,
},
- KeyTest{
+ {
// A.3. Expansion of a 256-bit Cipher Key
[]byte{
0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -245,19 +245,19 @@ type CryptTest struct {
}
var encryptTests = []CryptTest{
- CryptTest{
+ {
// Appendix B.
[]byte{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
[]byte{0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34},
[]byte{0x39, 0x25, 0x84, 0x1d, 0x02, 0xdc, 0x09, 0xfb, 0xdc, 0x11, 0x85, 0x97, 0x19, 0x6a, 0x0b, 0x32},
},
- CryptTest{
+ {
// Appendix C.1. AES-128
[]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
[]byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff},
[]byte{0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a},
},
- CryptTest{
+ {
// Appendix C.2. AES-192
[]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@@ -265,7 +265,7 @@ var encryptTests = []CryptTest{
[]byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff},
[]byte{0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91},
},
- CryptTest{
+ {
// Appendix C.3. AES-256
[]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
diff --git a/src/pkg/crypto/aes/const.go b/src/pkg/crypto/aes/const.go
index 8ddcaff260..97a5b64ec6 100644
--- a/src/pkg/crypto/aes/const.go
+++ b/src/pkg/crypto/aes/const.go
@@ -81,7 +81,7 @@ var sbox1 = [256]byte{
// These can be recomputed by adapting the tests in aes_test.go.
var te = [4][256]uint32{
- [256]uint32{
+ {
0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554,
0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a,
0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b,
@@ -115,7 +115,7 @@ var te = [4][256]uint32{
0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8,
0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a,
},
- [256]uint32{
+ {
0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5,
0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676,
0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0,
@@ -149,7 +149,7 @@ var te = [4][256]uint32{
0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868,
0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616,
},
- [256]uint32{
+ {
0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5,
0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76,
0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0,
@@ -183,7 +183,7 @@ var te = [4][256]uint32{
0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068,
0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16,
},
- [256]uint32{
+ {
0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491,
0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec,
0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb,
@@ -223,7 +223,7 @@ var te = [4][256]uint32{
// These can be recomputed by adapting the tests in aes_test.go.
var td = [4][256]uint32{
- [256]uint32{
+ {
0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393,
0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f,
0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6,
@@ -257,7 +257,7 @@ var td = [4][256]uint32{
0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541,
0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742,
},
- [256]uint32{
+ {
0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303,
0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3,
0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9,
@@ -291,7 +291,7 @@ var td = [4][256]uint32{
0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95,
0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857,
},
- [256]uint32{
+ {
0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3,
0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562,
0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3,
@@ -325,7 +325,7 @@ var td = [4][256]uint32{
0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d,
0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8,
},
- [256]uint32{
+ {
0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b,
0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5,
0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b,
diff --git a/src/pkg/crypto/block/cbc_aes_test.go b/src/pkg/crypto/block/cbc_aes_test.go
index 5531f3ab99..5e8cb35a2d 100644
--- a/src/pkg/crypto/block/cbc_aes_test.go
+++ b/src/pkg/crypto/block/cbc_aes_test.go
@@ -27,7 +27,7 @@ type cbcTest struct {
var cbcAESTests = []cbcTest{
// NIST SP 800-38A pp 27-29
- cbcTest{
+ {
"CBC-AES128",
commonKey128,
commonIV,
@@ -39,7 +39,7 @@ var cbcAESTests = []cbcTest{
0x3f, 0xf1, 0xca, 0xa1, 0x68, 0x1f, 0xac, 0x09, 0x12, 0x0e, 0xca, 0x30, 0x75, 0x86, 0xe1, 0xa7,
},
},
- cbcTest{
+ {
"CBC-AES192",
commonKey192,
commonIV,
@@ -51,7 +51,7 @@ var cbcAESTests = []cbcTest{
0x08, 0xb0, 0xe2, 0x79, 0x88, 0x59, 0x88, 0x81, 0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd,
},
},
- cbcTest{
+ {
"CBC-AES256",
commonKey256,
commonIV,
diff --git a/src/pkg/crypto/block/cfb_aes_test.go b/src/pkg/crypto/block/cfb_aes_test.go
index 8a245a2cbd..e400c182a2 100644
--- a/src/pkg/crypto/block/cfb_aes_test.go
+++ b/src/pkg/crypto/block/cfb_aes_test.go
@@ -27,7 +27,7 @@ type cfbTest struct {
}
var cfbAESTests = []cfbTest{
- cfbTest{
+ {
"CFB1-AES128",
1,
commonKey128,
@@ -41,7 +41,7 @@ var cfbAESTests = []cfbTest{
1<<7 | 0<<6 | 1<<5 | 1<<4 | 0<<3 | 0<<2 | 1<<1,
},
},
- cfbTest{
+ {
"CFB1-AES192",
1,
commonKey192,
@@ -55,7 +55,7 @@ var cfbAESTests = []cfbTest{
0<<7 | 1<<6 | 0<<5 | 1<<4 | 1<<3 | 0<<2 | 0<<1,
},
},
- cfbTest{
+ {
"CFB1-AES256",
1,
commonKey256,
@@ -70,7 +70,7 @@ var cfbAESTests = []cfbTest{
},
},
- cfbTest{
+ {
"CFB8-AES128",
8,
commonKey128,
@@ -117,7 +117,7 @@ var cfbAESTests = []cfbTest{
},
},
- cfbTest{
+ {
"CFB8-AES192",
8,
commonKey192,
@@ -164,7 +164,7 @@ var cfbAESTests = []cfbTest{
},
},
- cfbTest{
+ {
"CFB8-AES256",
8,
commonKey256,
@@ -211,7 +211,7 @@ var cfbAESTests = []cfbTest{
},
},
- cfbTest{
+ {
"CFB128-AES128",
128,
commonKey128,
@@ -230,7 +230,7 @@ var cfbAESTests = []cfbTest{
},
},
- cfbTest{
+ {
"CFB128-AES192",
128,
commonKey192,
@@ -249,7 +249,7 @@ var cfbAESTests = []cfbTest{
},
},
- cfbTest{
+ {
"CFB128-AES256",
128,
commonKey256,
diff --git a/src/pkg/crypto/block/cmac_aes_test.go b/src/pkg/crypto/block/cmac_aes_test.go
index a9cbc71a6c..0a4a1a418e 100644
--- a/src/pkg/crypto/block/cmac_aes_test.go
+++ b/src/pkg/crypto/block/cmac_aes_test.go
@@ -18,17 +18,17 @@ type cmacAESTest struct {
}
var cmacAESTests = []cmacAESTest{
- cmacAESTest{
+ {
commonKey128,
nil,
[]byte{0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, 0x7f, 0xa3, 0x7d, 0x12, 0x9b, 0x75, 0x67, 0x46},
},
- cmacAESTest{
+ {
commonKey128,
[]byte{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a},
[]byte{0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, 0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c},
},
- cmacAESTest{
+ {
commonKey128,
[]byte{
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
@@ -37,7 +37,7 @@ var cmacAESTests = []cmacAESTest{
},
[]byte{0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30, 0x30, 0xca, 0x32, 0x61, 0x14, 0x97, 0xc8, 0x27},
},
- cmacAESTest{
+ {
commonKey128,
[]byte{
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
@@ -47,17 +47,17 @@ var cmacAESTests = []cmacAESTest{
},
[]byte{0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92, 0xfc, 0x49, 0x74, 0x17, 0x79, 0x36, 0x3c, 0xfe},
},
- cmacAESTest{
+ {
commonKey192,
nil,
[]byte{0xd1, 0x7d, 0xdf, 0x46, 0xad, 0xaa, 0xcd, 0xe5, 0x31, 0xca, 0xc4, 0x83, 0xde, 0x7a, 0x93, 0x67},
},
- cmacAESTest{
+ {
commonKey192,
[]byte{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a},
[]byte{0x9e, 0x99, 0xa7, 0xbf, 0x31, 0xe7, 0x10, 0x90, 0x06, 0x62, 0xf6, 0x5e, 0x61, 0x7c, 0x51, 0x84},
},
- cmacAESTest{
+ {
commonKey192,
[]byte{
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
@@ -66,7 +66,7 @@ var cmacAESTests = []cmacAESTest{
},
[]byte{0x8a, 0x1d, 0xe5, 0xbe, 0x2e, 0xb3, 0x1a, 0xad, 0x08, 0x9a, 0x82, 0xe6, 0xee, 0x90, 0x8b, 0x0e},
},
- cmacAESTest{
+ {
commonKey192,
[]byte{
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
@@ -76,17 +76,17 @@ var cmacAESTests = []cmacAESTest{
},
[]byte{0xa1, 0xd5, 0xdf, 0x0e, 0xed, 0x79, 0x0f, 0x79, 0x4d, 0x77, 0x58, 0x96, 0x59, 0xf3, 0x9a, 0x11},
},
- cmacAESTest{
+ {
commonKey256,
nil,
[]byte{0x02, 0x89, 0x62, 0xf6, 0x1b, 0x7b, 0xf8, 0x9e, 0xfc, 0x6b, 0x55, 0x1f, 0x46, 0x67, 0xd9, 0x83},
},
- cmacAESTest{
+ {
commonKey256,
[]byte{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a},
[]byte{0x28, 0xa7, 0x02, 0x3f, 0x45, 0x2e, 0x8f, 0x82, 0xbd, 0x4b, 0xf2, 0x8d, 0x8c, 0x37, 0xc3, 0x5c},
},
- cmacAESTest{
+ {
commonKey256,
[]byte{
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
@@ -95,7 +95,7 @@ var cmacAESTests = []cmacAESTest{
},
[]byte{0xaa, 0xf3, 0xd8, 0xf1, 0xde, 0x56, 0x40, 0xc2, 0x32, 0xf5, 0xb1, 0x69, 0xb9, 0xc9, 0x11, 0xe6},
},
- cmacAESTest{
+ {
commonKey256,
[]byte{
0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
diff --git a/src/pkg/crypto/block/ctr_aes_test.go b/src/pkg/crypto/block/ctr_aes_test.go
index adb996c1dd..ce5fdd59d1 100644
--- a/src/pkg/crypto/block/ctr_aes_test.go
+++ b/src/pkg/crypto/block/ctr_aes_test.go
@@ -29,7 +29,7 @@ var commonCounter = []byte{0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
var ctrAESTests = []ctrTest{
// NIST SP 800-38A pp 55-58
- ctrTest{
+ {
"CTR-AES128",
commonKey128,
commonCounter,
@@ -41,7 +41,7 @@ var ctrAESTests = []ctrTest{
0x1e, 0x03, 0x1d, 0xda, 0x2f, 0xbe, 0x03, 0xd1, 0x79, 0x21, 0x70, 0xa0, 0xf3, 0x00, 0x9c, 0xee,
},
},
- ctrTest{
+ {
"CTR-AES192",
commonKey192,
commonCounter,
@@ -53,7 +53,7 @@ var ctrAESTests = []ctrTest{
0x4f, 0x78, 0xa7, 0xf6, 0xd2, 0x98, 0x09, 0x58, 0x5a, 0x97, 0xda, 0xec, 0x58, 0xc6, 0xb0, 0x50,
},
},
- ctrTest{
+ {
"CTR-AES256",
commonKey256,
commonCounter,
diff --git a/src/pkg/crypto/block/eax_aes_test.go b/src/pkg/crypto/block/eax_aes_test.go
index a1a0994293..93aa771be8 100644
--- a/src/pkg/crypto/block/eax_aes_test.go
+++ b/src/pkg/crypto/block/eax_aes_test.go
@@ -23,70 +23,70 @@ type eaxAESTest struct {
}
var eaxAESTests = []eaxAESTest{
- eaxAESTest{
+ {
[]byte{},
[]byte{0x23, 0x39, 0x52, 0xDE, 0xE4, 0xD5, 0xED, 0x5F, 0x9B, 0x9C, 0x6D, 0x6F, 0xF8, 0x0F, 0xF4, 0x78},
[]byte{0x62, 0xEC, 0x67, 0xF9, 0xC3, 0xA4, 0xA4, 0x07, 0xFC, 0xB2, 0xA8, 0xC4, 0x90, 0x31, 0xA8, 0xB3},
[]byte{0x6B, 0xFB, 0x91, 0x4F, 0xD0, 0x7E, 0xAE, 0x6B},
[]byte{0xE0, 0x37, 0x83, 0x0E, 0x83, 0x89, 0xF2, 0x7B, 0x02, 0x5A, 0x2D, 0x65, 0x27, 0xE7, 0x9D, 0x01},
},
- eaxAESTest{
+ {
[]byte{0xF7, 0xFB},
[]byte{0x91, 0x94, 0x5D, 0x3F, 0x4D, 0xCB, 0xEE, 0x0B, 0xF4, 0x5E, 0xF5, 0x22, 0x55, 0xF0, 0x95, 0xA4},
[]byte{0xBE, 0xCA, 0xF0, 0x43, 0xB0, 0xA2, 0x3D, 0x84, 0x31, 0x94, 0xBA, 0x97, 0x2C, 0x66, 0xDE, 0xBD},
[]byte{0xFA, 0x3B, 0xFD, 0x48, 0x06, 0xEB, 0x53, 0xFA},
[]byte{0x19, 0xDD, 0x5C, 0x4C, 0x93, 0x31, 0x04, 0x9D, 0x0B, 0xDA, 0xB0, 0x27, 0x74, 0x08, 0xF6, 0x79, 0x67, 0xE5},
},
- eaxAESTest{
+ {
[]byte{0x1A, 0x47, 0xCB, 0x49, 0x33},
[]byte{0x01, 0xF7, 0x4A, 0xD6, 0x40, 0x77, 0xF2, 0xE7, 0x04, 0xC0, 0xF6, 0x0A, 0xDA, 0x3D, 0xD5, 0x23},
[]byte{0x70, 0xC3, 0xDB, 0x4F, 0x0D, 0x26, 0x36, 0x84, 0x00, 0xA1, 0x0E, 0xD0, 0x5D, 0x2B, 0xFF, 0x5E},
[]byte{0x23, 0x4A, 0x34, 0x63, 0xC1, 0x26, 0x4A, 0xC6},
[]byte{0xD8, 0x51, 0xD5, 0xBA, 0xE0, 0x3A, 0x59, 0xF2, 0x38, 0xA2, 0x3E, 0x39, 0x19, 0x9D, 0xC9, 0x26, 0x66, 0x26, 0xC4, 0x0F, 0x80},
},
- eaxAESTest{
+ {
[]byte{0x48, 0x1C, 0x9E, 0x39, 0xB1},
[]byte{0xD0, 0x7C, 0xF6, 0xCB, 0xB7, 0xF3, 0x13, 0xBD, 0xDE, 0x66, 0xB7, 0x27, 0xAF, 0xD3, 0xC5, 0xE8},
[]byte{0x84, 0x08, 0xDF, 0xFF, 0x3C, 0x1A, 0x2B, 0x12, 0x92, 0xDC, 0x19, 0x9E, 0x46, 0xB7, 0xD6, 0x17},
[]byte{0x33, 0xCC, 0xE2, 0xEA, 0xBF, 0xF5, 0xA7, 0x9D},
[]byte{0x63, 0x2A, 0x9D, 0x13, 0x1A, 0xD4, 0xC1, 0x68, 0xA4, 0x22, 0x5D, 0x8E, 0x1F, 0xF7, 0x55, 0x93, 0x99, 0x74, 0xA7, 0xBE, 0xDE},
},
- eaxAESTest{
+ {
[]byte{0x40, 0xD0, 0xC0, 0x7D, 0xA5, 0xE4},
[]byte{0x35, 0xB6, 0xD0, 0x58, 0x00, 0x05, 0xBB, 0xC1, 0x2B, 0x05, 0x87, 0x12, 0x45, 0x57, 0xD2, 0xC2},
[]byte{0xFD, 0xB6, 0xB0, 0x66, 0x76, 0xEE, 0xDC, 0x5C, 0x61, 0xD7, 0x42, 0x76, 0xE1, 0xF8, 0xE8, 0x16},
[]byte{0xAE, 0xB9, 0x6E, 0xAE, 0xBE, 0x29, 0x70, 0xE9},
[]byte{0x07, 0x1D, 0xFE, 0x16, 0xC6, 0x75, 0xCB, 0x06, 0x77, 0xE5, 0x36, 0xF7, 0x3A, 0xFE, 0x6A, 0x14, 0xB7, 0x4E, 0xE4, 0x98, 0x44, 0xDD},
},
- eaxAESTest{
+ {
[]byte{0x4D, 0xE3, 0xB3, 0x5C, 0x3F, 0xC0, 0x39, 0x24, 0x5B, 0xD1, 0xFB, 0x7D},
[]byte{0xBD, 0x8E, 0x6E, 0x11, 0x47, 0x5E, 0x60, 0xB2, 0x68, 0x78, 0x4C, 0x38, 0xC6, 0x2F, 0xEB, 0x22},
[]byte{0x6E, 0xAC, 0x5C, 0x93, 0x07, 0x2D, 0x8E, 0x85, 0x13, 0xF7, 0x50, 0x93, 0x5E, 0x46, 0xDA, 0x1B},
[]byte{0xD4, 0x48, 0x2D, 0x1C, 0xA7, 0x8D, 0xCE, 0x0F},
[]byte{0x83, 0x5B, 0xB4, 0xF1, 0x5D, 0x74, 0x3E, 0x35, 0x0E, 0x72, 0x84, 0x14, 0xAB, 0xB8, 0x64, 0x4F, 0xD6, 0xCC, 0xB8, 0x69, 0x47, 0xC5, 0xE1, 0x05, 0x90, 0x21, 0x0A, 0x4F},
},
- eaxAESTest{
+ {
[]byte{0x8B, 0x0A, 0x79, 0x30, 0x6C, 0x9C, 0xE7, 0xED, 0x99, 0xDA, 0xE4, 0xF8, 0x7F, 0x8D, 0xD6, 0x16, 0x36},
[]byte{0x7C, 0x77, 0xD6, 0xE8, 0x13, 0xBE, 0xD5, 0xAC, 0x98, 0xBA, 0xA4, 0x17, 0x47, 0x7A, 0x2E, 0x7D},
[]byte{0x1A, 0x8C, 0x98, 0xDC, 0xD7, 0x3D, 0x38, 0x39, 0x3B, 0x2B, 0xF1, 0x56, 0x9D, 0xEE, 0xFC, 0x19},
[]byte{0x65, 0xD2, 0x01, 0x79, 0x90, 0xD6, 0x25, 0x28},
[]byte{0x02, 0x08, 0x3E, 0x39, 0x79, 0xDA, 0x01, 0x48, 0x12, 0xF5, 0x9F, 0x11, 0xD5, 0x26, 0x30, 0xDA, 0x30, 0x13, 0x73, 0x27, 0xD1, 0x06, 0x49, 0xB0, 0xAA, 0x6E, 0x1C, 0x18, 0x1D, 0xB6, 0x17, 0xD7, 0xF2},
},
- eaxAESTest{
+ {
[]byte{0x1B, 0xDA, 0x12, 0x2B, 0xCE, 0x8A, 0x8D, 0xBA, 0xF1, 0x87, 0x7D, 0x96, 0x2B, 0x85, 0x92, 0xDD, 0x2D, 0x56},
[]byte{0x5F, 0xFF, 0x20, 0xCA, 0xFA, 0xB1, 0x19, 0xCA, 0x2F, 0xC7, 0x35, 0x49, 0xE2, 0x0F, 0x5B, 0x0D},
[]byte{0xDD, 0xE5, 0x9B, 0x97, 0xD7, 0x22, 0x15, 0x6D, 0x4D, 0x9A, 0xFF, 0x2B, 0xC7, 0x55, 0x98, 0x26},
[]byte{0x54, 0xB9, 0xF0, 0x4E, 0x6A, 0x09, 0x18, 0x9A},
[]byte{0x2E, 0xC4, 0x7B, 0x2C, 0x49, 0x54, 0xA4, 0x89, 0xAF, 0xC7, 0xBA, 0x48, 0x97, 0xED, 0xCD, 0xAE, 0x8C, 0xC3, 0x3B, 0x60, 0x45, 0x05, 0x99, 0xBD, 0x02, 0xC9, 0x63, 0x82, 0x90, 0x2A, 0xEF, 0x7F, 0x83, 0x2A},
},
- eaxAESTest{
+ {
[]byte{0x6C, 0xF3, 0x67, 0x20, 0x87, 0x2B, 0x85, 0x13, 0xF6, 0xEA, 0xB1, 0xA8, 0xA4, 0x44, 0x38, 0xD5, 0xEF, 0x11},
[]byte{0xA4, 0xA4, 0x78, 0x2B, 0xCF, 0xFD, 0x3E, 0xC5, 0xE7, 0xEF, 0x6D, 0x8C, 0x34, 0xA5, 0x61, 0x23},
[]byte{0xB7, 0x81, 0xFC, 0xF2, 0xF7, 0x5F, 0xA5, 0xA8, 0xDE, 0x97, 0xA9, 0xCA, 0x48, 0xE5, 0x22, 0xEC},
[]byte{0x89, 0x9A, 0x17, 0x58, 0x97, 0x56, 0x1D, 0x7E},
[]byte{0x0D, 0xE1, 0x8F, 0xD0, 0xFD, 0xD9, 0x1E, 0x7A, 0xF1, 0x9F, 0x1D, 0x8E, 0xE8, 0x73, 0x39, 0x38, 0xB1, 0xE8, 0xE7, 0xF6, 0xD2, 0x23, 0x16, 0x18, 0x10, 0x2F, 0xDB, 0x7F, 0xE5, 0x5F, 0xF1, 0x99, 0x17, 0x00},
},
- eaxAESTest{
+ {
[]byte{0xCA, 0x40, 0xD7, 0x44, 0x6E, 0x54, 0x5F, 0xFA, 0xED, 0x3B, 0xD1, 0x2A, 0x74, 0x0A, 0x65, 0x9F, 0xFB, 0xBB, 0x3C, 0xEA, 0xB7},
[]byte{0x83, 0x95, 0xFC, 0xF1, 0xE9, 0x5B, 0xEB, 0xD6, 0x97, 0xBD, 0x01, 0x0B, 0xC7, 0x66, 0xAA, 0xC3},
[]byte{0x22, 0xE7, 0xAD, 0xD9, 0x3C, 0xFC, 0x63, 0x93, 0xC5, 0x7E, 0xC0, 0xB3, 0xC1, 0x7D, 0x6B, 0x44},
diff --git a/src/pkg/crypto/block/ecb_aes_test.go b/src/pkg/crypto/block/ecb_aes_test.go
index db0e085fa2..14481d0969 100644
--- a/src/pkg/crypto/block/ecb_aes_test.go
+++ b/src/pkg/crypto/block/ecb_aes_test.go
@@ -47,7 +47,7 @@ var commonIV = []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09
var ecbAESTests = []ecbTest{
// FIPS 197, Appendix B, C
- ecbTest{
+ {
"FIPS-197 Appendix B",
commonKey128,
[]byte{0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34},
@@ -55,7 +55,7 @@ var ecbAESTests = []ecbTest{
},
// NIST SP 800-38A pp 24-27
- ecbTest{
+ {
"ECB-AES128",
commonKey128,
commonInput,
@@ -66,7 +66,7 @@ var ecbAESTests = []ecbTest{
0x7b, 0x0c, 0x78, 0x5e, 0x27, 0xe8, 0xad, 0x3f, 0x82, 0x23, 0x20, 0x71, 0x04, 0x72, 0x5d, 0xd4,
},
},
- ecbTest{
+ {
"ECB-AES192",
commonKey192,
commonInput,
@@ -77,7 +77,7 @@ var ecbAESTests = []ecbTest{
0x9a, 0x4b, 0x41, 0xba, 0x73, 0x8d, 0x6c, 0x72, 0xfb, 0x16, 0x69, 0x16, 0x03, 0xc1, 0x8e, 0x0e,
},
},
- ecbTest{
+ {
"ECB-AES256",
commonKey256,
commonInput,
diff --git a/src/pkg/crypto/block/ofb_aes_test.go b/src/pkg/crypto/block/ofb_aes_test.go
index f2faa44325..9c527a6b37 100644
--- a/src/pkg/crypto/block/ofb_aes_test.go
+++ b/src/pkg/crypto/block/ofb_aes_test.go
@@ -27,7 +27,7 @@ type ofbTest struct {
var ofbAESTests = []ofbTest{
// NIST SP 800-38A pp 52-55
- ofbTest{
+ {
"OFB-AES128",
commonKey128,
commonIV,
@@ -39,7 +39,7 @@ var ofbAESTests = []ofbTest{
0x30, 0x4c, 0x65, 0x28, 0xf6, 0x59, 0xc7, 0x78, 0x66, 0xa5, 0x10, 0xd9, 0xc1, 0xd6, 0xae, 0x5e,
},
},
- ofbTest{
+ {
"OFB-AES192",
commonKey192,
commonIV,
@@ -51,7 +51,7 @@ var ofbAESTests = []ofbTest{
0x6d, 0x9f, 0x20, 0x08, 0x57, 0xca, 0x6c, 0x3e, 0x9c, 0xac, 0x52, 0x4b, 0xd9, 0xac, 0xc9, 0x2a,
},
},
- ofbTest{
+ {
"OFB-AES256",
commonKey256,
commonIV,
diff --git a/src/pkg/crypto/blowfish/blowfish_test.go b/src/pkg/crypto/blowfish/blowfish_test.go
index 44fed9668c..7f510f7fdb 100644
--- a/src/pkg/crypto/blowfish/blowfish_test.go
+++ b/src/pkg/crypto/blowfish/blowfish_test.go
@@ -16,140 +16,140 @@ type CryptTest struct {
// Test vector values are from http://www.schneier.com/code/vectors.txt.
var encryptTests = []CryptTest{
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78}},
- CryptTest{
+ {
[]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
[]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
[]byte{0x51, 0x86, 0x6F, 0xD5, 0xB8, 0x5E, 0xCB, 0x8A}},
- CryptTest{
+ {
[]byte{0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
[]byte{0x7D, 0x85, 0x6F, 0x9A, 0x61, 0x30, 0x63, 0xF2}},
- CryptTest{
+ {
[]byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
[]byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
[]byte{0x24, 0x66, 0xDD, 0x87, 0x8B, 0x96, 0x3C, 0x9D}},
- CryptTest{
+ {
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
[]byte{0x61, 0xF9, 0xC3, 0x80, 0x22, 0x81, 0xB0, 0x96}},
- CryptTest{
+ {
[]byte{0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0x7D, 0x0C, 0xC6, 0x30, 0xAF, 0xDA, 0x1E, 0xC7}},
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78}},
- CryptTest{
+ {
[]byte{0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0x0A, 0xCE, 0xAB, 0x0F, 0xC6, 0xA0, 0xA2, 0x8D}},
- CryptTest{
+ {
[]byte{0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57},
[]byte{0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42},
[]byte{0x59, 0xC6, 0x82, 0x45, 0xEB, 0x05, 0x28, 0x2B}},
- CryptTest{
+ {
[]byte{0x01, 0x31, 0xD9, 0x61, 0x9D, 0xC1, 0x37, 0x6E},
[]byte{0x5C, 0xD5, 0x4C, 0xA8, 0x3D, 0xEF, 0x57, 0xDA},
[]byte{0xB1, 0xB8, 0xCC, 0x0B, 0x25, 0x0F, 0x09, 0xA0}},
- CryptTest{
+ {
[]byte{0x07, 0xA1, 0x13, 0x3E, 0x4A, 0x0B, 0x26, 0x86},
[]byte{0x02, 0x48, 0xD4, 0x38, 0x06, 0xF6, 0x71, 0x72},
[]byte{0x17, 0x30, 0xE5, 0x77, 0x8B, 0xEA, 0x1D, 0xA4}},
- CryptTest{
+ {
[]byte{0x38, 0x49, 0x67, 0x4C, 0x26, 0x02, 0x31, 0x9E},
[]byte{0x51, 0x45, 0x4B, 0x58, 0x2D, 0xDF, 0x44, 0x0A},
[]byte{0xA2, 0x5E, 0x78, 0x56, 0xCF, 0x26, 0x51, 0xEB}},
- CryptTest{
+ {
[]byte{0x04, 0xB9, 0x15, 0xBA, 0x43, 0xFE, 0xB5, 0xB6},
[]byte{0x42, 0xFD, 0x44, 0x30, 0x59, 0x57, 0x7F, 0xA2},
[]byte{0x35, 0x38, 0x82, 0xB1, 0x09, 0xCE, 0x8F, 0x1A}},
- CryptTest{
+ {
[]byte{0x01, 0x13, 0xB9, 0x70, 0xFD, 0x34, 0xF2, 0xCE},
[]byte{0x05, 0x9B, 0x5E, 0x08, 0x51, 0xCF, 0x14, 0x3A},
[]byte{0x48, 0xF4, 0xD0, 0x88, 0x4C, 0x37, 0x99, 0x18}},
- CryptTest{
+ {
[]byte{0x01, 0x70, 0xF1, 0x75, 0x46, 0x8F, 0xB5, 0xE6},
[]byte{0x07, 0x56, 0xD8, 0xE0, 0x77, 0x47, 0x61, 0xD2},
[]byte{0x43, 0x21, 0x93, 0xB7, 0x89, 0x51, 0xFC, 0x98}},
- CryptTest{
+ {
[]byte{0x43, 0x29, 0x7F, 0xAD, 0x38, 0xE3, 0x73, 0xFE},
[]byte{0x76, 0x25, 0x14, 0xB8, 0x29, 0xBF, 0x48, 0x6A},
[]byte{0x13, 0xF0, 0x41, 0x54, 0xD6, 0x9D, 0x1A, 0xE5}},
- CryptTest{
+ {
[]byte{0x07, 0xA7, 0x13, 0x70, 0x45, 0xDA, 0x2A, 0x16},
[]byte{0x3B, 0xDD, 0x11, 0x90, 0x49, 0x37, 0x28, 0x02},
[]byte{0x2E, 0xED, 0xDA, 0x93, 0xFF, 0xD3, 0x9C, 0x79}},
- CryptTest{
+ {
[]byte{0x04, 0x68, 0x91, 0x04, 0xC2, 0xFD, 0x3B, 0x2F},
[]byte{0x26, 0x95, 0x5F, 0x68, 0x35, 0xAF, 0x60, 0x9A},
[]byte{0xD8, 0x87, 0xE0, 0x39, 0x3C, 0x2D, 0xA6, 0xE3}},
- CryptTest{
+ {
[]byte{0x37, 0xD0, 0x6B, 0xB5, 0x16, 0xCB, 0x75, 0x46},
[]byte{0x16, 0x4D, 0x5E, 0x40, 0x4F, 0x27, 0x52, 0x32},
[]byte{0x5F, 0x99, 0xD0, 0x4F, 0x5B, 0x16, 0x39, 0x69}},
- CryptTest{
+ {
[]byte{0x1F, 0x08, 0x26, 0x0D, 0x1A, 0xC2, 0x46, 0x5E},
[]byte{0x6B, 0x05, 0x6E, 0x18, 0x75, 0x9F, 0x5C, 0xCA},
[]byte{0x4A, 0x05, 0x7A, 0x3B, 0x24, 0xD3, 0x97, 0x7B}},
- CryptTest{
+ {
[]byte{0x58, 0x40, 0x23, 0x64, 0x1A, 0xBA, 0x61, 0x76},
[]byte{0x00, 0x4B, 0xD6, 0xEF, 0x09, 0x17, 0x60, 0x62},
[]byte{0x45, 0x20, 0x31, 0xC1, 0xE4, 0xFA, 0xDA, 0x8E}},
- CryptTest{
+ {
[]byte{0x02, 0x58, 0x16, 0x16, 0x46, 0x29, 0xB0, 0x07},
[]byte{0x48, 0x0D, 0x39, 0x00, 0x6E, 0xE7, 0x62, 0xF2},
[]byte{0x75, 0x55, 0xAE, 0x39, 0xF5, 0x9B, 0x87, 0xBD}},
- CryptTest{
+ {
[]byte{0x49, 0x79, 0x3E, 0xBC, 0x79, 0xB3, 0x25, 0x8F},
[]byte{0x43, 0x75, 0x40, 0xC8, 0x69, 0x8F, 0x3C, 0xFA},
[]byte{0x53, 0xC5, 0x5F, 0x9C, 0xB4, 0x9F, 0xC0, 0x19}},
- CryptTest{
+ {
[]byte{0x4F, 0xB0, 0x5E, 0x15, 0x15, 0xAB, 0x73, 0xA7},
[]byte{0x07, 0x2D, 0x43, 0xA0, 0x77, 0x07, 0x52, 0x92},
[]byte{0x7A, 0x8E, 0x7B, 0xFA, 0x93, 0x7E, 0x89, 0xA3}},
- CryptTest{
+ {
[]byte{0x49, 0xE9, 0x5D, 0x6D, 0x4C, 0xA2, 0x29, 0xBF},
[]byte{0x02, 0xFE, 0x55, 0x77, 0x81, 0x17, 0xF1, 0x2A},
[]byte{0xCF, 0x9C, 0x5D, 0x7A, 0x49, 0x86, 0xAD, 0xB5}},
- CryptTest{
+ {
[]byte{0x01, 0x83, 0x10, 0xDC, 0x40, 0x9B, 0x26, 0xD6},
[]byte{0x1D, 0x9D, 0x5C, 0x50, 0x18, 0xF7, 0x28, 0xC2},
[]byte{0xD1, 0xAB, 0xB2, 0x90, 0x65, 0x8B, 0xC7, 0x78}},
- CryptTest{
+ {
[]byte{0x1C, 0x58, 0x7F, 0x1C, 0x13, 0x92, 0x4F, 0xEF},
[]byte{0x30, 0x55, 0x32, 0x28, 0x6D, 0x6F, 0x29, 0x5A},
[]byte{0x55, 0xCB, 0x37, 0x74, 0xD1, 0x3E, 0xF2, 0x01}},
- CryptTest{
+ {
[]byte{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01},
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0xFA, 0x34, 0xEC, 0x48, 0x47, 0xB2, 0x68, 0xB2}},
- CryptTest{
+ {
[]byte{0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E},
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0xA7, 0x90, 0x79, 0x51, 0x08, 0xEA, 0x3C, 0xAE}},
- CryptTest{
+ {
[]byte{0xE0, 0xFE, 0xE0, 0xFE, 0xF1, 0xFE, 0xF1, 0xFE},
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0xC3, 0x9E, 0x07, 0x2D, 0x9F, 0xAC, 0x63, 0x1D}},
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
[]byte{0x01, 0x49, 0x33, 0xE0, 0xCD, 0xAF, 0xF6, 0xE4}},
- CryptTest{
+ {
[]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0xF2, 0x1E, 0x9A, 0x77, 0xB7, 0x1C, 0x49, 0xBC}},
- CryptTest{
+ {
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x24, 0x59, 0x46, 0x88, 0x57, 0x54, 0x36, 0x9A}},
- CryptTest{
+ {
[]byte{0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
[]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
[]byte{0x6B, 0x5C, 0x5A, 0x9C, 0x5D, 0x9E, 0x0A, 0x5A}},
diff --git a/src/pkg/crypto/hmac/hmac_test.go b/src/pkg/crypto/hmac/hmac_test.go
index 6934df2369..1a50fa37dd 100644
--- a/src/pkg/crypto/hmac/hmac_test.go
+++ b/src/pkg/crypto/hmac/hmac_test.go
@@ -20,7 +20,7 @@ type hmacTest struct {
// Tests from US FIPS 198
// http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf
var hmacTests = []hmacTest{
- hmacTest{
+ {
NewSHA1,
[]byte{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
@@ -35,7 +35,7 @@ var hmacTests = []hmacTest{
[]byte("Sample #1"),
"4f4ca3d5d68ba7cc0a1208c9c61e9c5da0403c0a",
},
- hmacTest{
+ {
NewSHA1,
[]byte{
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
@@ -45,7 +45,7 @@ var hmacTests = []hmacTest{
[]byte("Sample #2"),
"0922d3405faa3d194f82a45830737d5cc6c75d24",
},
- hmacTest{
+ {
NewSHA1,
[]byte{
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
@@ -67,7 +67,7 @@ var hmacTests = []hmacTest{
},
// Test from Plan 9.
- hmacTest{
+ {
NewMD5,
[]byte("Jefe"),
[]byte("what do ya want for nothing?"),
diff --git a/src/pkg/crypto/md4/md4_test.go b/src/pkg/crypto/md4/md4_test.go
index b883e64590..721bd4cbcc 100644
--- a/src/pkg/crypto/md4/md4_test.go
+++ b/src/pkg/crypto/md4/md4_test.go
@@ -16,37 +16,37 @@ type md4Test struct {
}
var golden = []md4Test{
- md4Test{"31d6cfe0d16ae931b73c59d7e0c089c0", ""},
- md4Test{"bde52cb31de33e46245e05fbdbd6fb24", "a"},
- md4Test{"ec388dd78999dfc7cf4632465693b6bf", "ab"},
- md4Test{"a448017aaf21d8525fc10ae87aa6729d", "abc"},
- md4Test{"41decd8f579255c5200f86a4bb3ba740", "abcd"},
- md4Test{"9803f4a34e8eb14f96adba49064a0c41", "abcde"},
- md4Test{"804e7f1c2586e50b49ac65db5b645131", "abcdef"},
- md4Test{"752f4adfe53d1da0241b5bc216d098fc", "abcdefg"},
- md4Test{"ad9daf8d49d81988590a6f0e745d15dd", "abcdefgh"},
- md4Test{"1e4e28b05464316b56402b3815ed2dfd", "abcdefghi"},
- md4Test{"dc959c6f5d6f9e04e4380777cc964b3d", "abcdefghij"},
- md4Test{"1b5701e265778898ef7de5623bbe7cc0", "Discard medicine more than two years old."},
- md4Test{"d7f087e090fe7ad4a01cb59dacc9a572", "He who has a shady past knows that nice guys finish last."},
- md4Test{"a6f8fd6df617c72837592fc3570595c9", "I wouldn't marry him with a ten foot pole."},
- md4Test{"c92a84a9526da8abc240c05d6b1a1ce0", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- md4Test{"f6013160c4dcb00847069fee3bb09803", "The days of the digital watch are numbered. -Tom Stoppard"},
- md4Test{"2c3bb64f50b9107ed57640fe94bec09f", "Nepal premier won't resign."},
- md4Test{"45b7d8a32c7806f2f7f897332774d6e4", "For every action there is an equal and opposite government program."},
- md4Test{"b5b4f9026b175c62d7654bdc3a1cd438", "His money is twice tainted: 'taint yours and 'taint mine."},
- md4Test{"caf44e80f2c20ce19b5ba1cab766e7bd", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- md4Test{"191fae6707f496aa54a6bce9f2ecf74d", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- md4Test{"9ddc753e7a4ccee6081cd1b45b23a834", "size: a.out: bad magic"},
- md4Test{"8d050f55b1cadb9323474564be08a521", "The major problem is with sendmail. -Mark Horton"},
- md4Test{"ad6e2587f74c3e3cc19146f6127fa2e3", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- md4Test{"1d616d60a5fabe85589c3f1566ca7fca", "If the enemy is within range, then so are you."},
- md4Test{"aec3326a4f496a2ced65a1963f84577f", "It's well we cannot hear the screams/That we create in others' dreams."},
- md4Test{"77b4fd762d6b9245e61c50bf6ebf118b", "You remind me of a TV show, but that's all right: I watch it anyway."},
- md4Test{"e8f48c726bae5e516f6ddb1a4fe62438", "C is as portable as Stonehedge!!"},
- md4Test{"a3a84366e7219e887423b01f9be7166e", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- md4Test{"a6b7aa35157e984ef5d9b7f32e5fbb52", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- md4Test{"75661f0545955f8f9abeeb17845f3fd6", "How can you write a big system without C++? -Paul Glick"},
+ {"31d6cfe0d16ae931b73c59d7e0c089c0", ""},
+ {"bde52cb31de33e46245e05fbdbd6fb24", "a"},
+ {"ec388dd78999dfc7cf4632465693b6bf", "ab"},
+ {"a448017aaf21d8525fc10ae87aa6729d", "abc"},
+ {"41decd8f579255c5200f86a4bb3ba740", "abcd"},
+ {"9803f4a34e8eb14f96adba49064a0c41", "abcde"},
+ {"804e7f1c2586e50b49ac65db5b645131", "abcdef"},
+ {"752f4adfe53d1da0241b5bc216d098fc", "abcdefg"},
+ {"ad9daf8d49d81988590a6f0e745d15dd", "abcdefgh"},
+ {"1e4e28b05464316b56402b3815ed2dfd", "abcdefghi"},
+ {"dc959c6f5d6f9e04e4380777cc964b3d", "abcdefghij"},
+ {"1b5701e265778898ef7de5623bbe7cc0", "Discard medicine more than two years old."},
+ {"d7f087e090fe7ad4a01cb59dacc9a572", "He who has a shady past knows that nice guys finish last."},
+ {"a6f8fd6df617c72837592fc3570595c9", "I wouldn't marry him with a ten foot pole."},
+ {"c92a84a9526da8abc240c05d6b1a1ce0", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"f6013160c4dcb00847069fee3bb09803", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"2c3bb64f50b9107ed57640fe94bec09f", "Nepal premier won't resign."},
+ {"45b7d8a32c7806f2f7f897332774d6e4", "For every action there is an equal and opposite government program."},
+ {"b5b4f9026b175c62d7654bdc3a1cd438", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"caf44e80f2c20ce19b5ba1cab766e7bd", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"191fae6707f496aa54a6bce9f2ecf74d", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"9ddc753e7a4ccee6081cd1b45b23a834", "size: a.out: bad magic"},
+ {"8d050f55b1cadb9323474564be08a521", "The major problem is with sendmail. -Mark Horton"},
+ {"ad6e2587f74c3e3cc19146f6127fa2e3", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"1d616d60a5fabe85589c3f1566ca7fca", "If the enemy is within range, then so are you."},
+ {"aec3326a4f496a2ced65a1963f84577f", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"77b4fd762d6b9245e61c50bf6ebf118b", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"e8f48c726bae5e516f6ddb1a4fe62438", "C is as portable as Stonehedge!!"},
+ {"a3a84366e7219e887423b01f9be7166e", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"a6b7aa35157e984ef5d9b7f32e5fbb52", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"75661f0545955f8f9abeeb17845f3fd6", "How can you write a big system without C++? -Paul Glick"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/crypto/md5/md5_test.go b/src/pkg/crypto/md5/md5_test.go
index f6c2938370..857002b701 100644
--- a/src/pkg/crypto/md5/md5_test.go
+++ b/src/pkg/crypto/md5/md5_test.go
@@ -16,37 +16,37 @@ type md5Test struct {
}
var golden = []md5Test{
- md5Test{"d41d8cd98f00b204e9800998ecf8427e", ""},
- md5Test{"0cc175b9c0f1b6a831c399e269772661", "a"},
- md5Test{"187ef4436122d1cc2f40dc2b92f0eba0", "ab"},
- md5Test{"900150983cd24fb0d6963f7d28e17f72", "abc"},
- md5Test{"e2fc714c4727ee9395f324cd2e7f331f", "abcd"},
- md5Test{"ab56b4d92b40713acc5af89985d4b786", "abcde"},
- md5Test{"e80b5017098950fc58aad83c8c14978e", "abcdef"},
- md5Test{"7ac66c0f148de9519b8bd264312c4d64", "abcdefg"},
- md5Test{"e8dc4081b13434b45189a720b77b6818", "abcdefgh"},
- md5Test{"8aa99b1f439ff71293e95357bac6fd94", "abcdefghi"},
- md5Test{"a925576942e94b2ef57a066101b48876", "abcdefghij"},
- md5Test{"d747fc1719c7eacb84058196cfe56d57", "Discard medicine more than two years old."},
- md5Test{"bff2dcb37ef3a44ba43ab144768ca837", "He who has a shady past knows that nice guys finish last."},
- md5Test{"0441015ecb54a7342d017ed1bcfdbea5", "I wouldn't marry him with a ten foot pole."},
- md5Test{"9e3cac8e9e9757a60c3ea391130d3689", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- md5Test{"a0f04459b031f916a59a35cc482dc039", "The days of the digital watch are numbered. -Tom Stoppard"},
- md5Test{"e7a48e0fe884faf31475d2a04b1362cc", "Nepal premier won't resign."},
- md5Test{"637d2fe925c07c113800509964fb0e06", "For every action there is an equal and opposite government program."},
- md5Test{"834a8d18d5c6562119cf4c7f5086cb71", "His money is twice tainted: 'taint yours and 'taint mine."},
- md5Test{"de3a4d2fd6c73ec2db2abad23b444281", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- md5Test{"acf203f997e2cf74ea3aff86985aefaf", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- md5Test{"e1c1384cb4d2221dfdd7c795a4222c9a", "size: a.out: bad magic"},
- md5Test{"c90f3ddecc54f34228c063d7525bf644", "The major problem is with sendmail. -Mark Horton"},
- md5Test{"cdf7ab6c1fd49bd9933c43f3ea5af185", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- md5Test{"83bc85234942fc883c063cbd7f0ad5d0", "If the enemy is within range, then so are you."},
- md5Test{"277cbe255686b48dd7e8f389394d9299", "It's well we cannot hear the screams/That we create in others' dreams."},
- md5Test{"fd3fb0a7ffb8af16603f3d3af98f8e1f", "You remind me of a TV show, but that's all right: I watch it anyway."},
- md5Test{"469b13a78ebf297ecda64d4723655154", "C is as portable as Stonehedge!!"},
- md5Test{"63eb3a2f466410104731c4b037600110", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- md5Test{"72c2ed7592debca1c90fc0100f931a2f", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- md5Test{"132f7619d33b523b1d9e5bd8e0928355", "How can you write a big system without C++? -Paul Glick"},
+ {"d41d8cd98f00b204e9800998ecf8427e", ""},
+ {"0cc175b9c0f1b6a831c399e269772661", "a"},
+ {"187ef4436122d1cc2f40dc2b92f0eba0", "ab"},
+ {"900150983cd24fb0d6963f7d28e17f72", "abc"},
+ {"e2fc714c4727ee9395f324cd2e7f331f", "abcd"},
+ {"ab56b4d92b40713acc5af89985d4b786", "abcde"},
+ {"e80b5017098950fc58aad83c8c14978e", "abcdef"},
+ {"7ac66c0f148de9519b8bd264312c4d64", "abcdefg"},
+ {"e8dc4081b13434b45189a720b77b6818", "abcdefgh"},
+ {"8aa99b1f439ff71293e95357bac6fd94", "abcdefghi"},
+ {"a925576942e94b2ef57a066101b48876", "abcdefghij"},
+ {"d747fc1719c7eacb84058196cfe56d57", "Discard medicine more than two years old."},
+ {"bff2dcb37ef3a44ba43ab144768ca837", "He who has a shady past knows that nice guys finish last."},
+ {"0441015ecb54a7342d017ed1bcfdbea5", "I wouldn't marry him with a ten foot pole."},
+ {"9e3cac8e9e9757a60c3ea391130d3689", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"a0f04459b031f916a59a35cc482dc039", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"e7a48e0fe884faf31475d2a04b1362cc", "Nepal premier won't resign."},
+ {"637d2fe925c07c113800509964fb0e06", "For every action there is an equal and opposite government program."},
+ {"834a8d18d5c6562119cf4c7f5086cb71", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"de3a4d2fd6c73ec2db2abad23b444281", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"acf203f997e2cf74ea3aff86985aefaf", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"e1c1384cb4d2221dfdd7c795a4222c9a", "size: a.out: bad magic"},
+ {"c90f3ddecc54f34228c063d7525bf644", "The major problem is with sendmail. -Mark Horton"},
+ {"cdf7ab6c1fd49bd9933c43f3ea5af185", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"83bc85234942fc883c063cbd7f0ad5d0", "If the enemy is within range, then so are you."},
+ {"277cbe255686b48dd7e8f389394d9299", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"fd3fb0a7ffb8af16603f3d3af98f8e1f", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"469b13a78ebf297ecda64d4723655154", "C is as portable as Stonehedge!!"},
+ {"63eb3a2f466410104731c4b037600110", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"72c2ed7592debca1c90fc0100f931a2f", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"132f7619d33b523b1d9e5bd8e0928355", "How can you write a big system without C++? -Paul Glick"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/crypto/rc4/rc4_test.go b/src/pkg/crypto/rc4/rc4_test.go
index 1d39b2f177..73a52e721b 100644
--- a/src/pkg/crypto/rc4/rc4_test.go
+++ b/src/pkg/crypto/rc4/rc4_test.go
@@ -15,25 +15,25 @@ type rc4Test struct {
var golden = []rc4Test{
// Test vectors from the original cypherpunk posting of ARC4:
// http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0?pli=1
- rc4Test{
+ {
[]byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
[]byte{0x74, 0x94, 0xc2, 0xe7, 0x10, 0x4b, 0x08, 0x79},
},
- rc4Test{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0xde, 0x18, 0x89, 0x41, 0xa3, 0x37, 0x5d, 0x3a},
},
- rc4Test{
+ {
[]byte{0xef, 0x01, 0x23, 0x45},
[]byte{0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, 0xbd, 0x61},
},
// Test vectors from the Wikipedia page: http://en.wikipedia.org/wiki/RC4
- rc4Test{
+ {
[]byte{0x4b, 0x65, 0x79},
[]byte{0xeb, 0x9f, 0x77, 0x81, 0xb7, 0x34, 0xca, 0x72, 0xa7, 0x19},
},
- rc4Test{
+ {
[]byte{0x57, 0x69, 0x6b, 0x69},
[]byte{0x60, 0x44, 0xdb, 0x6d, 0x41, 0xb7},
},
diff --git a/src/pkg/crypto/ripemd160/ripemd160_test.go b/src/pkg/crypto/ripemd160/ripemd160_test.go
index eaa3d78c26..f4135f5cf6 100644
--- a/src/pkg/crypto/ripemd160/ripemd160_test.go
+++ b/src/pkg/crypto/ripemd160/ripemd160_test.go
@@ -19,14 +19,14 @@ type mdTest struct {
}
var vectors = [...]mdTest{
- mdTest{"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""},
- mdTest{"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"},
- mdTest{"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"},
- mdTest{"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"},
- mdTest{"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"},
- mdTest{"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
- mdTest{"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
- mdTest{"9b752e45573d4b39f4dbd3323cab82bf63326bfb", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
+ {"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""},
+ {"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"},
+ {"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"},
+ {"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"},
+ {"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"},
+ {"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
+ {"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
+ {"9b752e45573d4b39f4dbd3323cab82bf63326bfb", "12345678901234567890123456789012345678901234567890123456789012345678901234567890"},
}
func TestVectors(t *testing.T) {
diff --git a/src/pkg/crypto/rsa/pkcs1v15.go b/src/pkg/crypto/rsa/pkcs1v15.go
index b4e322dc3c..f918d6352e 100644
--- a/src/pkg/crypto/rsa/pkcs1v15.go
+++ b/src/pkg/crypto/rsa/pkcs1v15.go
@@ -159,17 +159,17 @@ const (
// with the correct contents.
var hashPrefixes = [][]byte{
// HashMD5
- []byte{0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10},
+ {0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10},
// HashSHA1
- []byte{0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14},
+ {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14},
// HashSHA256
- []byte{0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20},
+ {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20},
// HashSHA384
- []byte{0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30},
+ {0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30},
// HashSHA512
- []byte{0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40},
+ {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40},
// HashMD5SHA1
- []byte{}, // A special TLS case which doesn't use an ASN1 prefix.
+ {}, // A special TLS case which doesn't use an ASN1 prefix.
}
// SignPKCS1v15 calcuates the signature of hashed using RSASSA-PSS-SIGN from RSA PKCS#1 v1.5.
diff --git a/src/pkg/crypto/rsa/pkcs1v15_test.go b/src/pkg/crypto/rsa/pkcs1v15_test.go
index 9a4da232f0..bf6306dc29 100644
--- a/src/pkg/crypto/rsa/pkcs1v15_test.go
+++ b/src/pkg/crypto/rsa/pkcs1v15_test.go
@@ -31,19 +31,19 @@ type DecryptPKCS1v15Test struct {
// These test vectors were generated with `openssl rsautl -pkcs -encrypt`
var decryptPKCS1v15Tests = []DecryptPKCS1v15Test{
- DecryptPKCS1v15Test{
+ {
"gIcUIoVkD6ATMBk/u/nlCZCCWRKdkfjCgFdo35VpRXLduiKXhNz1XupLLzTXAybEq15juc+EgY5o0DHv/nt3yg==",
"x",
},
- DecryptPKCS1v15Test{
+ {
"Y7TOCSqofGhkRb+jaVRLzK8xw2cSo1IVES19utzv6hwvx+M8kFsoWQm5DzBeJCZTCVDPkTpavUuEbgp8hnUGDw==",
"testing.",
},
- DecryptPKCS1v15Test{
+ {
"arReP9DJtEVyV2Dg3dDp4c/PSk1O6lxkoJ8HcFupoRorBZG+7+1fDAwT1olNddFnQMjmkb8vxwmNMoTAT/BFjQ==",
"testing.\n",
},
- DecryptPKCS1v15Test{
+ {
"WtaBXIoGC54+vH0NH0CHHE+dRDOsMc/6BrfFu2lEqcKL9+uDuWaf+Xj9mrbQCjjZcpQuX733zyok/jsnqe/Ftw==",
"01234567890123456789012345678901234567890123456789012",
},
@@ -101,19 +101,19 @@ func TestEncryptPKCS1v15(t *testing.T) {
// These test vectors were generated with `openssl rsautl -pkcs -encrypt`
var decryptPKCS1v15SessionKeyTests = []DecryptPKCS1v15Test{
- DecryptPKCS1v15Test{
+ {
"e6ukkae6Gykq0fKzYwULpZehX+UPXYzMoB5mHQUDEiclRbOTqas4Y0E6nwns1BBpdvEJcilhl5zsox/6DtGsYg==",
"1234",
},
- DecryptPKCS1v15Test{
+ {
"Dtis4uk/q/LQGGqGk97P59K03hkCIVFMEFZRgVWOAAhxgYpCRG0MX2adptt92l67IqMki6iVQyyt0TtX3IdtEw==",
"FAIL",
},
- DecryptPKCS1v15Test{
+ {
"LIyFyCYCptPxrvTxpol8F3M7ZivlMsf53zs0vHRAv+rDIh2YsHS69ePMoPMe3TkOMZ3NupiL3takPxIs1sK+dw==",
"abcd",
},
- DecryptPKCS1v15Test{
+ {
"bafnobel46bKy76JzqU/RIVOH0uAYvzUtauKmIidKgM0sMlvobYVAVQPeUQ/oTGjbIZ1v/6Gyi5AO4DtHruGdw==",
"FAIL",
},
@@ -156,7 +156,7 @@ type signPKCS1v15Test struct {
// These vectors have been tested with
// `openssl rsautl -verify -inkey pk -in signature | hexdump -C`
var signPKCS1v15Tests = []signPKCS1v15Test{
- signPKCS1v15Test{"Test.\n", "a4f3fa6ea93bcdd0c57be020c1193ecbfd6f200a3d95c409769b029578fa0e336ad9a347600e40d3ae823b8c7e6bad88cc07c1d54c3a1523cbbb6d58efc362ae"},
+ {"Test.\n", "a4f3fa6ea93bcdd0c57be020c1193ecbfd6f200a3d95c409769b029578fa0e336ad9a347600e40d3ae823b8c7e6bad88cc07c1d54c3a1523cbbb6d58efc362ae"},
}
func TestSignPKCS1v15(t *testing.T) {
diff --git a/src/pkg/crypto/rsa/rsa_test.go b/src/pkg/crypto/rsa/rsa_test.go
index 66c24459a5..df1f17f17c 100644
--- a/src/pkg/crypto/rsa/rsa_test.go
+++ b/src/pkg/crypto/rsa/rsa_test.go
@@ -105,12 +105,12 @@ func TestDecryptOAEP(t *testing.T) {
// testEncryptOAEPData contains a subset of the vectors from RSA's "Test vectors for RSA-OAEP".
var testEncryptOAEPData = []testEncryptOAEPStruct{
// Key 1
- testEncryptOAEPStruct{"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb",
+ {"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb",
65537,
"53339cfdb79fc8466a655c7316aca85c55fd8f6dd898fdaf119517ef4f52e8fd8e258df93fee180fa0e4ab29693cd83b152a553d4ac4d1812b8b9fa5af0e7f55fe7304df41570926f3311f15c4d65a732c483116ee3d3d2d0af3549ad9bf7cbfb78ad884f84d5beb04724dc7369b31def37d0cf539e9cfcdd3de653729ead5d1",
[]testEncryptOAEPMessage{
// Example 1.1
- testEncryptOAEPMessage{
+ {
[]byte{0x66, 0x28, 0x19, 0x4e, 0x12, 0x07, 0x3d, 0xb0,
0x3b, 0xa9, 0x4c, 0xda, 0x9e, 0xf9, 0x53, 0x23, 0x97,
0xd5, 0x0d, 0xba, 0x79, 0xb9, 0x87, 0x00, 0x4a, 0xfe,
@@ -138,7 +138,7 @@ var testEncryptOAEPData = []testEncryptOAEPStruct{
},
},
// Example 1.2
- testEncryptOAEPMessage{
+ {
[]byte{0x75, 0x0c, 0x40, 0x47, 0xf5, 0x47, 0xe8, 0xe4,
0x14, 0x11, 0x85, 0x65, 0x23, 0x29, 0x8a, 0xc9, 0xba,
0xe2, 0x45, 0xef, 0xaf, 0x13, 0x97, 0xfb, 0xe5, 0x6f,
@@ -166,7 +166,7 @@ var testEncryptOAEPData = []testEncryptOAEPStruct{
},
},
// Example 1.3
- testEncryptOAEPMessage{
+ {
[]byte{0xd9, 0x4a, 0xe0, 0x83, 0x2e, 0x64, 0x45, 0xce,
0x42, 0x33, 0x1c, 0xb0, 0x6d, 0x53, 0x1a, 0x82, 0xb1,
0xdb, 0x4b, 0xaa, 0xd3, 0x0f, 0x74, 0x6d, 0xc9, 0x16,
@@ -199,12 +199,12 @@ var testEncryptOAEPData = []testEncryptOAEPStruct{
},
},
// Key 10
- testEncryptOAEPStruct{"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb",
+ {"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb",
65537,
"056b04216fe5f354ac77250a4b6b0c8525a85c59b0bd80c56450a22d5f438e596a333aa875e291dd43f48cb88b9d5fc0d499f9fcd1c397f9afc070cd9e398c8d19e61db7c7410a6b2675dfbf5d345b804d201add502d5ce2dfcb091ce9997bbebe57306f383e4d588103f036f7e85d1934d152a323e4a8db451d6f4a5b1b0f102cc150e02feee2b88dea4ad4c1baccb24d84072d14e1d24a6771f7408ee30564fb86d4393a34bcf0b788501d193303f13a2284b001f0f649eaf79328d4ac5c430ab4414920a9460ed1b7bc40ec653e876d09abc509ae45b525190116a0c26101848298509c1c3bf3a483e7274054e15e97075036e989f60932807b5257751e79",
[]testEncryptOAEPMessage{
// Example 10.1
- testEncryptOAEPMessage{
+ {
[]byte{0x8b, 0xba, 0x6b, 0xf8, 0x2a, 0x6c, 0x0f, 0x86,
0xd5, 0xf1, 0x75, 0x6e, 0x97, 0x95, 0x68, 0x70, 0xb0,
0x89, 0x53, 0xb0, 0x6b, 0x4e, 0xb2, 0x05, 0xbc, 0x16,
diff --git a/src/pkg/crypto/sha1/sha1_test.go b/src/pkg/crypto/sha1/sha1_test.go
index f18c7b0967..2712fe35ea 100644
--- a/src/pkg/crypto/sha1/sha1_test.go
+++ b/src/pkg/crypto/sha1/sha1_test.go
@@ -18,37 +18,37 @@ type sha1Test struct {
}
var golden = []sha1Test{
- sha1Test{"da39a3ee5e6b4b0d3255bfef95601890afd80709", ""},
- sha1Test{"86f7e437faa5a7fce15d1ddcb9eaeaea377667b8", "a"},
- sha1Test{"da23614e02469a0d7c7bd1bdab5c9c474b1904dc", "ab"},
- sha1Test{"a9993e364706816aba3e25717850c26c9cd0d89d", "abc"},
- sha1Test{"81fe8bfe87576c3ecb22426f8e57847382917acf", "abcd"},
- sha1Test{"03de6c570bfe24bfc328ccd7ca46b76eadaf4334", "abcde"},
- sha1Test{"1f8ac10f23c5b5bc1167bda84b833e5c057a77d2", "abcdef"},
- sha1Test{"2fb5e13419fc89246865e7a324f476ec624e8740", "abcdefg"},
- sha1Test{"425af12a0743502b322e93a015bcf868e324d56a", "abcdefgh"},
- sha1Test{"c63b19f1e4c8b5f76b25c49b8b87f57d8e4872a1", "abcdefghi"},
- sha1Test{"d68c19a0a345b7eab78d5e11e991c026ec60db63", "abcdefghij"},
- sha1Test{"ebf81ddcbe5bf13aaabdc4d65354fdf2044f38a7", "Discard medicine more than two years old."},
- sha1Test{"e5dea09392dd886ca63531aaa00571dc07554bb6", "He who has a shady past knows that nice guys finish last."},
- sha1Test{"45988f7234467b94e3e9494434c96ee3609d8f8f", "I wouldn't marry him with a ten foot pole."},
- sha1Test{"55dee037eb7460d5a692d1ce11330b260e40c988", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- sha1Test{"b7bc5fb91080c7de6b582ea281f8a396d7c0aee8", "The days of the digital watch are numbered. -Tom Stoppard"},
- sha1Test{"c3aed9358f7c77f523afe86135f06b95b3999797", "Nepal premier won't resign."},
- sha1Test{"6e29d302bf6e3a5e4305ff318d983197d6906bb9", "For every action there is an equal and opposite government program."},
- sha1Test{"597f6a540010f94c15d71806a99a2c8710e747bd", "His money is twice tainted: 'taint yours and 'taint mine."},
- sha1Test{"6859733b2590a8a091cecf50086febc5ceef1e80", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- sha1Test{"514b2630ec089b8aee18795fc0cf1f4860cdacad", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- sha1Test{"c5ca0d4a7b6676fc7aa72caa41cc3d5df567ed69", "size: a.out: bad magic"},
- sha1Test{"74c51fa9a04eadc8c1bbeaa7fc442f834b90a00a", "The major problem is with sendmail. -Mark Horton"},
- sha1Test{"0b4c4ce5f52c3ad2821852a8dc00217fa18b8b66", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- sha1Test{"3ae7937dd790315beb0f48330e8642237c61550a", "If the enemy is within range, then so are you."},
- sha1Test{"410a2b296df92b9a47412b13281df8f830a9f44b", "It's well we cannot hear the screams/That we create in others' dreams."},
- sha1Test{"841e7c85ca1adcddbdd0187f1289acb5c642f7f5", "You remind me of a TV show, but that's all right: I watch it anyway."},
- sha1Test{"163173b825d03b952601376b25212df66763e1db", "C is as portable as Stonehedge!!"},
- sha1Test{"32b0377f2687eb88e22106f133c586ab314d5279", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- sha1Test{"0885aaf99b569542fd165fa44e322718f4a984e0", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- sha1Test{"6627d6904d71420b0bf3886ab629623538689f45", "How can you write a big system without C++? -Paul Glick"},
+ {"da39a3ee5e6b4b0d3255bfef95601890afd80709", ""},
+ {"86f7e437faa5a7fce15d1ddcb9eaeaea377667b8", "a"},
+ {"da23614e02469a0d7c7bd1bdab5c9c474b1904dc", "ab"},
+ {"a9993e364706816aba3e25717850c26c9cd0d89d", "abc"},
+ {"81fe8bfe87576c3ecb22426f8e57847382917acf", "abcd"},
+ {"03de6c570bfe24bfc328ccd7ca46b76eadaf4334", "abcde"},
+ {"1f8ac10f23c5b5bc1167bda84b833e5c057a77d2", "abcdef"},
+ {"2fb5e13419fc89246865e7a324f476ec624e8740", "abcdefg"},
+ {"425af12a0743502b322e93a015bcf868e324d56a", "abcdefgh"},
+ {"c63b19f1e4c8b5f76b25c49b8b87f57d8e4872a1", "abcdefghi"},
+ {"d68c19a0a345b7eab78d5e11e991c026ec60db63", "abcdefghij"},
+ {"ebf81ddcbe5bf13aaabdc4d65354fdf2044f38a7", "Discard medicine more than two years old."},
+ {"e5dea09392dd886ca63531aaa00571dc07554bb6", "He who has a shady past knows that nice guys finish last."},
+ {"45988f7234467b94e3e9494434c96ee3609d8f8f", "I wouldn't marry him with a ten foot pole."},
+ {"55dee037eb7460d5a692d1ce11330b260e40c988", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"b7bc5fb91080c7de6b582ea281f8a396d7c0aee8", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"c3aed9358f7c77f523afe86135f06b95b3999797", "Nepal premier won't resign."},
+ {"6e29d302bf6e3a5e4305ff318d983197d6906bb9", "For every action there is an equal and opposite government program."},
+ {"597f6a540010f94c15d71806a99a2c8710e747bd", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"6859733b2590a8a091cecf50086febc5ceef1e80", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"514b2630ec089b8aee18795fc0cf1f4860cdacad", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"c5ca0d4a7b6676fc7aa72caa41cc3d5df567ed69", "size: a.out: bad magic"},
+ {"74c51fa9a04eadc8c1bbeaa7fc442f834b90a00a", "The major problem is with sendmail. -Mark Horton"},
+ {"0b4c4ce5f52c3ad2821852a8dc00217fa18b8b66", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"3ae7937dd790315beb0f48330e8642237c61550a", "If the enemy is within range, then so are you."},
+ {"410a2b296df92b9a47412b13281df8f830a9f44b", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"841e7c85ca1adcddbdd0187f1289acb5c642f7f5", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"163173b825d03b952601376b25212df66763e1db", "C is as portable as Stonehedge!!"},
+ {"32b0377f2687eb88e22106f133c586ab314d5279", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"0885aaf99b569542fd165fa44e322718f4a984e0", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"6627d6904d71420b0bf3886ab629623538689f45", "How can you write a big system without C++? -Paul Glick"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/crypto/sha256/sha256_test.go b/src/pkg/crypto/sha256/sha256_test.go
index d9b294487f..42a3fa7a01 100644
--- a/src/pkg/crypto/sha256/sha256_test.go
+++ b/src/pkg/crypto/sha256/sha256_test.go
@@ -18,71 +18,71 @@ type sha256Test struct {
}
var golden = []sha256Test{
- sha256Test{"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""},
- sha256Test{"ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", "a"},
- sha256Test{"fb8e20fc2e4c3f248c60c39bd652f3c1347298bb977b8b4d5903b85055620603", "ab"},
- sha256Test{"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc"},
- sha256Test{"88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589", "abcd"},
- sha256Test{"36bbe50ed96841d10443bcb670d6554f0a34b761be67ec9c4a8ad2c0c44ca42c", "abcde"},
- sha256Test{"bef57ec7f53a6d40beb640a780a639c83bc29ac8a9816f1fc6c5c6dcd93c4721", "abcdef"},
- sha256Test{"7d1a54127b222502f5b79b5fb0803061152a44f92b37e23c6527baf665d4da9a", "abcdefg"},
- sha256Test{"9c56cc51b374c3ba189210d5b6d4bf57790d351c96c47c02190ecf1e430635ab", "abcdefgh"},
- sha256Test{"19cc02f26df43cc571bc9ed7b0c4d29224a3ec229529221725ef76d021c8326f", "abcdefghi"},
- sha256Test{"72399361da6a7754fec986dca5b7cbaf1c810a28ded4abaf56b2106d06cb78b0", "abcdefghij"},
- sha256Test{"a144061c271f152da4d151034508fed1c138b8c976339de229c3bb6d4bbb4fce", "Discard medicine more than two years old."},
- sha256Test{"6dae5caa713a10ad04b46028bf6dad68837c581616a1589a265a11288d4bb5c4", "He who has a shady past knows that nice guys finish last."},
- sha256Test{"ae7a702a9509039ddbf29f0765e70d0001177914b86459284dab8b348c2dce3f", "I wouldn't marry him with a ten foot pole."},
- sha256Test{"6748450b01c568586715291dfa3ee018da07d36bb7ea6f180c1af6270215c64f", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- sha256Test{"14b82014ad2b11f661b5ae6a99b75105c2ffac278cd071cd6c05832793635774", "The days of the digital watch are numbered. -Tom Stoppard"},
- sha256Test{"7102cfd76e2e324889eece5d6c41921b1e142a4ac5a2692be78803097f6a48d8", "Nepal premier won't resign."},
- sha256Test{"23b1018cd81db1d67983c5f7417c44da9deb582459e378d7a068552ea649dc9f", "For every action there is an equal and opposite government program."},
- sha256Test{"8001f190dfb527261c4cfcab70c98e8097a7a1922129bc4096950e57c7999a5a", "His money is twice tainted: 'taint yours and 'taint mine."},
- sha256Test{"8c87deb65505c3993eb24b7a150c4155e82eee6960cf0c3a8114ff736d69cad5", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- sha256Test{"bfb0a67a19cdec3646498b2e0f751bddc41bba4b7f30081b0b932aad214d16d7", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- sha256Test{"7f9a0b9bf56332e19f5a0ec1ad9c1425a153da1c624868fda44561d6b74daf36", "size: a.out: bad magic"},
- sha256Test{"b13f81b8aad9e3666879af19886140904f7f429ef083286195982a7588858cfc", "The major problem is with sendmail. -Mark Horton"},
- sha256Test{"b26c38d61519e894480c70c8374ea35aa0ad05b2ae3d6674eec5f52a69305ed4", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- sha256Test{"049d5e26d4f10222cd841a119e38bd8d2e0d1129728688449575d4ff42b842c1", "If the enemy is within range, then so are you."},
- sha256Test{"0e116838e3cc1c1a14cd045397e29b4d087aa11b0853fc69ec82e90330d60949", "It's well we cannot hear the screams/That we create in others' dreams."},
- sha256Test{"4f7d8eb5bcf11de2a56b971021a444aa4eafd6ecd0f307b5109e4e776cd0fe46", "You remind me of a TV show, but that's all right: I watch it anyway."},
- sha256Test{"61c0cc4c4bd8406d5120b3fb4ebc31ce87667c162f29468b3c779675a85aebce", "C is as portable as Stonehedge!!"},
- sha256Test{"1fb2eb3688093c4a3f80cd87a5547e2ce940a4f923243a79a2a1e242220693ac", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- sha256Test{"395585ce30617b62c80b93e8208ce866d4edc811a177fdb4b82d3911d8696423", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- sha256Test{"4f9b189a13d030838269dce846b16a1ce9ce81fe63e65de2f636863336a98fe6", "How can you write a big system without C++? -Paul Glick"},
+ {"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""},
+ {"ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", "a"},
+ {"fb8e20fc2e4c3f248c60c39bd652f3c1347298bb977b8b4d5903b85055620603", "ab"},
+ {"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc"},
+ {"88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589", "abcd"},
+ {"36bbe50ed96841d10443bcb670d6554f0a34b761be67ec9c4a8ad2c0c44ca42c", "abcde"},
+ {"bef57ec7f53a6d40beb640a780a639c83bc29ac8a9816f1fc6c5c6dcd93c4721", "abcdef"},
+ {"7d1a54127b222502f5b79b5fb0803061152a44f92b37e23c6527baf665d4da9a", "abcdefg"},
+ {"9c56cc51b374c3ba189210d5b6d4bf57790d351c96c47c02190ecf1e430635ab", "abcdefgh"},
+ {"19cc02f26df43cc571bc9ed7b0c4d29224a3ec229529221725ef76d021c8326f", "abcdefghi"},
+ {"72399361da6a7754fec986dca5b7cbaf1c810a28ded4abaf56b2106d06cb78b0", "abcdefghij"},
+ {"a144061c271f152da4d151034508fed1c138b8c976339de229c3bb6d4bbb4fce", "Discard medicine more than two years old."},
+ {"6dae5caa713a10ad04b46028bf6dad68837c581616a1589a265a11288d4bb5c4", "He who has a shady past knows that nice guys finish last."},
+ {"ae7a702a9509039ddbf29f0765e70d0001177914b86459284dab8b348c2dce3f", "I wouldn't marry him with a ten foot pole."},
+ {"6748450b01c568586715291dfa3ee018da07d36bb7ea6f180c1af6270215c64f", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"14b82014ad2b11f661b5ae6a99b75105c2ffac278cd071cd6c05832793635774", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"7102cfd76e2e324889eece5d6c41921b1e142a4ac5a2692be78803097f6a48d8", "Nepal premier won't resign."},
+ {"23b1018cd81db1d67983c5f7417c44da9deb582459e378d7a068552ea649dc9f", "For every action there is an equal and opposite government program."},
+ {"8001f190dfb527261c4cfcab70c98e8097a7a1922129bc4096950e57c7999a5a", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"8c87deb65505c3993eb24b7a150c4155e82eee6960cf0c3a8114ff736d69cad5", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"bfb0a67a19cdec3646498b2e0f751bddc41bba4b7f30081b0b932aad214d16d7", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"7f9a0b9bf56332e19f5a0ec1ad9c1425a153da1c624868fda44561d6b74daf36", "size: a.out: bad magic"},
+ {"b13f81b8aad9e3666879af19886140904f7f429ef083286195982a7588858cfc", "The major problem is with sendmail. -Mark Horton"},
+ {"b26c38d61519e894480c70c8374ea35aa0ad05b2ae3d6674eec5f52a69305ed4", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"049d5e26d4f10222cd841a119e38bd8d2e0d1129728688449575d4ff42b842c1", "If the enemy is within range, then so are you."},
+ {"0e116838e3cc1c1a14cd045397e29b4d087aa11b0853fc69ec82e90330d60949", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"4f7d8eb5bcf11de2a56b971021a444aa4eafd6ecd0f307b5109e4e776cd0fe46", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"61c0cc4c4bd8406d5120b3fb4ebc31ce87667c162f29468b3c779675a85aebce", "C is as portable as Stonehedge!!"},
+ {"1fb2eb3688093c4a3f80cd87a5547e2ce940a4f923243a79a2a1e242220693ac", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"395585ce30617b62c80b93e8208ce866d4edc811a177fdb4b82d3911d8696423", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"4f9b189a13d030838269dce846b16a1ce9ce81fe63e65de2f636863336a98fe6", "How can you write a big system without C++? -Paul Glick"},
}
var golden224 = []sha256Test{
- sha256Test{"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", ""},
- sha256Test{"abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5", "a"},
- sha256Test{"db3cda86d4429a1d39c148989566b38f7bda0156296bd364ba2f878b", "ab"},
- sha256Test{"23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc"},
- sha256Test{"a76654d8e3550e9a2d67a0eeb6c67b220e5885eddd3fde135806e601", "abcd"},
- sha256Test{"bdd03d560993e675516ba5a50638b6531ac2ac3d5847c61916cfced6", "abcde"},
- sha256Test{"7043631cb415556a275a4ebecb802c74ee9f6153908e1792a90b6a98", "abcdef"},
- sha256Test{"d1884e711701ad81abe0c77a3b0ea12e19ba9af64077286c72fc602d", "abcdefg"},
- sha256Test{"17eb7d40f0356f8598e89eafad5f6c759b1f822975d9c9b737c8a517", "abcdefgh"},
- sha256Test{"aeb35915346c584db820d2de7af3929ffafef9222a9bcb26516c7334", "abcdefghi"},
- sha256Test{"d35e1e5af29ddb0d7e154357df4ad9842afee527c689ee547f753188", "abcdefghij"},
- sha256Test{"19297f1cef7ddc8a7e947f5c5a341e10f7245045e425db67043988d7", "Discard medicine more than two years old."},
- sha256Test{"0f10c2eb436251f777fbbd125e260d36aecf180411726c7c885f599a", "He who has a shady past knows that nice guys finish last."},
- sha256Test{"4d1842104919f314cad8a3cd20b3cba7e8ed3e7abed62b57441358f6", "I wouldn't marry him with a ten foot pole."},
- sha256Test{"a8ba85c6fe0c48fbffc72bbb2f03fcdbc87ae2dc7a56804d1590fb3b", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- sha256Test{"5543fbab26e67e8885b1a852d567d1cb8b9bfe42e0899584c50449a9", "The days of the digital watch are numbered. -Tom Stoppard"},
- sha256Test{"65ca107390f5da9efa05d28e57b221657edc7e43a9a18fb15b053ddb", "Nepal premier won't resign."},
- sha256Test{"84953962be366305a9cc9b5cd16ed019edc37ac96c0deb3e12cca116", "For every action there is an equal and opposite government program."},
- sha256Test{"35a189ce987151dfd00b3577583cc6a74b9869eecf894459cb52038d", "His money is twice tainted: 'taint yours and 'taint mine."},
- sha256Test{"2fc333713983edfd4ef2c0da6fb6d6415afb94987c91e4069eb063e6", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- sha256Test{"cbe32d38d577a1b355960a4bc3c659c2dc4670859a19777a875842c4", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- sha256Test{"a2dc118ce959e027576413a7b440c875cdc8d40df9141d6ef78a57e1", "size: a.out: bad magic"},
- sha256Test{"d10787e24052bcff26dc484787a54ed819e4e4511c54890ee977bf81", "The major problem is with sendmail. -Mark Horton"},
- sha256Test{"62efcf16ab8a893acdf2f348aaf06b63039ff1bf55508c830532c9fb", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- sha256Test{"3e9b7e4613c59f58665104c5fa86c272db5d3a2ff30df5bb194a5c99", "If the enemy is within range, then so are you."},
- sha256Test{"5999c208b8bdf6d471bb7c359ac5b829e73a8211dff686143a4e7f18", "It's well we cannot hear the screams/That we create in others' dreams."},
- sha256Test{"3b2d67ff54eabc4ef737b14edf87c64280ef582bcdf2a6d56908b405", "You remind me of a TV show, but that's all right: I watch it anyway."},
- sha256Test{"d0733595d20e4d3d6b5c565a445814d1bbb2fd08b9a3b8ffb97930c6", "C is as portable as Stonehedge!!"},
- sha256Test{"43fb8aeed8a833175c9295c1165415f98c866ef08a4922959d673507", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- sha256Test{"ec18e66e93afc4fb1604bc2baedbfd20b44c43d76e65c0996d7851c6", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- sha256Test{"86ed2eaa9c75ba98396e5c9fb2f679ecf0ea2ed1e0ee9ceecb4a9332", "How can you write a big system without C++? -Paul Glick"},
+ {"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", ""},
+ {"abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5", "a"},
+ {"db3cda86d4429a1d39c148989566b38f7bda0156296bd364ba2f878b", "ab"},
+ {"23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc"},
+ {"a76654d8e3550e9a2d67a0eeb6c67b220e5885eddd3fde135806e601", "abcd"},
+ {"bdd03d560993e675516ba5a50638b6531ac2ac3d5847c61916cfced6", "abcde"},
+ {"7043631cb415556a275a4ebecb802c74ee9f6153908e1792a90b6a98", "abcdef"},
+ {"d1884e711701ad81abe0c77a3b0ea12e19ba9af64077286c72fc602d", "abcdefg"},
+ {"17eb7d40f0356f8598e89eafad5f6c759b1f822975d9c9b737c8a517", "abcdefgh"},
+ {"aeb35915346c584db820d2de7af3929ffafef9222a9bcb26516c7334", "abcdefghi"},
+ {"d35e1e5af29ddb0d7e154357df4ad9842afee527c689ee547f753188", "abcdefghij"},
+ {"19297f1cef7ddc8a7e947f5c5a341e10f7245045e425db67043988d7", "Discard medicine more than two years old."},
+ {"0f10c2eb436251f777fbbd125e260d36aecf180411726c7c885f599a", "He who has a shady past knows that nice guys finish last."},
+ {"4d1842104919f314cad8a3cd20b3cba7e8ed3e7abed62b57441358f6", "I wouldn't marry him with a ten foot pole."},
+ {"a8ba85c6fe0c48fbffc72bbb2f03fcdbc87ae2dc7a56804d1590fb3b", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"5543fbab26e67e8885b1a852d567d1cb8b9bfe42e0899584c50449a9", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"65ca107390f5da9efa05d28e57b221657edc7e43a9a18fb15b053ddb", "Nepal premier won't resign."},
+ {"84953962be366305a9cc9b5cd16ed019edc37ac96c0deb3e12cca116", "For every action there is an equal and opposite government program."},
+ {"35a189ce987151dfd00b3577583cc6a74b9869eecf894459cb52038d", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"2fc333713983edfd4ef2c0da6fb6d6415afb94987c91e4069eb063e6", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"cbe32d38d577a1b355960a4bc3c659c2dc4670859a19777a875842c4", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"a2dc118ce959e027576413a7b440c875cdc8d40df9141d6ef78a57e1", "size: a.out: bad magic"},
+ {"d10787e24052bcff26dc484787a54ed819e4e4511c54890ee977bf81", "The major problem is with sendmail. -Mark Horton"},
+ {"62efcf16ab8a893acdf2f348aaf06b63039ff1bf55508c830532c9fb", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"3e9b7e4613c59f58665104c5fa86c272db5d3a2ff30df5bb194a5c99", "If the enemy is within range, then so are you."},
+ {"5999c208b8bdf6d471bb7c359ac5b829e73a8211dff686143a4e7f18", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"3b2d67ff54eabc4ef737b14edf87c64280ef582bcdf2a6d56908b405", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"d0733595d20e4d3d6b5c565a445814d1bbb2fd08b9a3b8ffb97930c6", "C is as portable as Stonehedge!!"},
+ {"43fb8aeed8a833175c9295c1165415f98c866ef08a4922959d673507", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"ec18e66e93afc4fb1604bc2baedbfd20b44c43d76e65c0996d7851c6", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"86ed2eaa9c75ba98396e5c9fb2f679ecf0ea2ed1e0ee9ceecb4a9332", "How can you write a big system without C++? -Paul Glick"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/crypto/sha512/sha512_test.go b/src/pkg/crypto/sha512/sha512_test.go
index 590cf1aecf..dd116dc17b 100644
--- a/src/pkg/crypto/sha512/sha512_test.go
+++ b/src/pkg/crypto/sha512/sha512_test.go
@@ -18,71 +18,71 @@ type sha512Test struct {
}
var golden = []sha512Test{
- sha512Test{"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", ""},
- sha512Test{"1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75", "a"},
- sha512Test{"2d408a0717ec188158278a796c689044361dc6fdde28d6f04973b80896e1823975cdbf12eb63f9e0591328ee235d80e9b5bf1aa6a44f4617ff3caf6400eb172d", "ab"},
- sha512Test{"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f", "abc"},
- sha512Test{"d8022f2060ad6efd297ab73dcc5355c9b214054b0d1776a136a669d26a7d3b14f73aa0d0ebff19ee333368f0164b6419a96da49e3e481753e7e96b716bdccb6f", "abcd"},
- sha512Test{"878ae65a92e86cac011a570d4c30a7eaec442b85ce8eca0c2952b5e3cc0628c2e79d889ad4d5c7c626986d452dd86374b6ffaa7cd8b67665bef2289a5c70b0a1", "abcde"},
- sha512Test{"e32ef19623e8ed9d267f657a81944b3d07adbb768518068e88435745564e8d4150a0a703be2a7d88b61e3d390c2bb97e2d4c311fdc69d6b1267f05f59aa920e7", "abcdef"},
- sha512Test{"d716a4188569b68ab1b6dfac178e570114cdf0ea3a1cc0e31486c3e41241bc6a76424e8c37ab26f096fc85ef9886c8cb634187f4fddff645fb099f1ff54c6b8c", "abcdefg"},
- sha512Test{"a3a8c81bc97c2560010d7389bc88aac974a104e0e2381220c6e084c4dccd1d2d17d4f86db31c2a851dc80e6681d74733c55dcd03dd96f6062cdda12a291ae6ce", "abcdefgh"},
- sha512Test{"f22d51d25292ca1d0f68f69aedc7897019308cc9db46efb75a03dd494fc7f126c010e8ade6a00a0c1a5f1b75d81e0ed5a93ce98dc9b833db7839247b1d9c24fe", "abcdefghi"},
- sha512Test{"ef6b97321f34b1fea2169a7db9e1960b471aa13302a988087357c520be957ca119c3ba68e6b4982c019ec89de3865ccf6a3cda1fe11e59f98d99f1502c8b9745", "abcdefghij"},
- sha512Test{"2210d99af9c8bdecda1b4beff822136753d8342505ddce37f1314e2cdbb488c6016bdaa9bd2ffa513dd5de2e4b50f031393d8ab61f773b0e0130d7381e0f8a1d", "Discard medicine more than two years old."},
- sha512Test{"a687a8985b4d8d0a24f115fe272255c6afaf3909225838546159c1ed685c211a203796ae8ecc4c81a5b6315919b3a64f10713da07e341fcdbb08541bf03066ce", "He who has a shady past knows that nice guys finish last."},
- sha512Test{"8ddb0392e818b7d585ab22769a50df660d9f6d559cca3afc5691b8ca91b8451374e42bcdabd64589ed7c91d85f626596228a5c8572677eb98bc6b624befb7af8", "I wouldn't marry him with a ten foot pole."},
- sha512Test{"26ed8f6ca7f8d44b6a8a54ae39640fa8ad5c673f70ee9ce074ba4ef0d483eea00bab2f61d8695d6b34df9c6c48ae36246362200ed820448bdc03a720366a87c6", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- sha512Test{"e5a14bf044be69615aade89afcf1ab0389d5fc302a884d403579d1386a2400c089b0dbb387ed0f463f9ee342f8244d5a38cfbc0e819da9529fbff78368c9a982", "The days of the digital watch are numbered. -Tom Stoppard"},
- sha512Test{"420a1faa48919e14651bed45725abe0f7a58e0f099424c4e5a49194946e38b46c1f8034b18ef169b2e31050d1648e0b982386595f7df47da4b6fd18e55333015", "Nepal premier won't resign."},
- sha512Test{"d926a863beadb20134db07683535c72007b0e695045876254f341ddcccde132a908c5af57baa6a6a9c63e6649bba0c213dc05fadcf9abccea09f23dcfb637fbe", "For every action there is an equal and opposite government program."},
- sha512Test{"9a98dd9bb67d0da7bf83da5313dff4fd60a4bac0094f1b05633690ffa7f6d61de9a1d4f8617937d560833a9aaa9ccafe3fd24db418d0e728833545cadd3ad92d", "His money is twice tainted: 'taint yours and 'taint mine."},
- sha512Test{"d7fde2d2351efade52f4211d3746a0780a26eec3df9b2ed575368a8a1c09ec452402293a8ea4eceb5a4f60064ea29b13cdd86918cd7a4faf366160b009804107", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- sha512Test{"b0f35ffa2697359c33a56f5c0cf715c7aeed96da9905ca2698acadb08fbc9e669bf566b6bd5d61a3e86dc22999bcc9f2224e33d1d4f32a228cf9d0349e2db518", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- sha512Test{"3d2e5f91778c9e66f7e061293aaa8a8fc742dd3b2e4f483772464b1144189b49273e610e5cccd7a81a19ca1fa70f16b10f1a100a4d8c1372336be8484c64b311", "size: a.out: bad magic"},
- sha512Test{"b2f68ff58ac015efb1c94c908b0d8c2bf06f491e4de8e6302c49016f7f8a33eac3e959856c7fddbc464de618701338a4b46f76dbfaf9a1e5262b5f40639771c7", "The major problem is with sendmail. -Mark Horton"},
- sha512Test{"d8c92db5fdf52cf8215e4df3b4909d29203ff4d00e9ad0b64a6a4e04dec5e74f62e7c35c7fb881bd5de95442123df8f57a489b0ae616bd326f84d10021121c57", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- sha512Test{"19a9f8dc0a233e464e8566ad3ca9b91e459a7b8c4780985b015776e1bf239a19bc233d0556343e2b0a9bc220900b4ebf4f8bdf89ff8efeaf79602d6849e6f72e", "If the enemy is within range, then so are you."},
- sha512Test{"00b4c41f307bde87301cdc5b5ab1ae9a592e8ecbb2021dd7bc4b34e2ace60741cc362560bec566ba35178595a91932b8d5357e2c9cec92d393b0fa7831852476", "It's well we cannot hear the screams/That we create in others' dreams."},
- sha512Test{"91eccc3d5375fd026e4d6787874b1dce201cecd8a27dbded5065728cb2d09c58a3d467bb1faf353bf7ba567e005245d5321b55bc344f7c07b91cb6f26c959be7", "You remind me of a TV show, but that's all right: I watch it anyway."},
- sha512Test{"fabbbe22180f1f137cfdc9556d2570e775d1ae02a597ded43a72a40f9b485d500043b7be128fb9fcd982b83159a0d99aa855a9e7cc4240c00dc01a9bdf8218d7", "C is as portable as Stonehedge!!"},
- sha512Test{"2ecdec235c1fa4fc2a154d8fba1dddb8a72a1ad73838b51d792331d143f8b96a9f6fcb0f34d7caa351fe6d88771c4f105040e0392f06e0621689d33b2f3ba92e", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- sha512Test{"7ad681f6f96f82f7abfa7ecc0334e8fa16d3dc1cdc45b60b7af43fe4075d2357c0c1d60e98350f1afb1f2fe7a4d7cd2ad55b88e458e06b73c40b437331f5dab4", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- sha512Test{"833f9248ab4a3b9e5131f745fda1ffd2dd435b30e965957e78291c7ab73605fd1912b0794e5c233ab0a12d205a39778d19b83515d6a47003f19cdee51d98c7e0", "How can you write a big system without C++? -Paul Glick"},
+ {"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", ""},
+ {"1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75", "a"},
+ {"2d408a0717ec188158278a796c689044361dc6fdde28d6f04973b80896e1823975cdbf12eb63f9e0591328ee235d80e9b5bf1aa6a44f4617ff3caf6400eb172d", "ab"},
+ {"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f", "abc"},
+ {"d8022f2060ad6efd297ab73dcc5355c9b214054b0d1776a136a669d26a7d3b14f73aa0d0ebff19ee333368f0164b6419a96da49e3e481753e7e96b716bdccb6f", "abcd"},
+ {"878ae65a92e86cac011a570d4c30a7eaec442b85ce8eca0c2952b5e3cc0628c2e79d889ad4d5c7c626986d452dd86374b6ffaa7cd8b67665bef2289a5c70b0a1", "abcde"},
+ {"e32ef19623e8ed9d267f657a81944b3d07adbb768518068e88435745564e8d4150a0a703be2a7d88b61e3d390c2bb97e2d4c311fdc69d6b1267f05f59aa920e7", "abcdef"},
+ {"d716a4188569b68ab1b6dfac178e570114cdf0ea3a1cc0e31486c3e41241bc6a76424e8c37ab26f096fc85ef9886c8cb634187f4fddff645fb099f1ff54c6b8c", "abcdefg"},
+ {"a3a8c81bc97c2560010d7389bc88aac974a104e0e2381220c6e084c4dccd1d2d17d4f86db31c2a851dc80e6681d74733c55dcd03dd96f6062cdda12a291ae6ce", "abcdefgh"},
+ {"f22d51d25292ca1d0f68f69aedc7897019308cc9db46efb75a03dd494fc7f126c010e8ade6a00a0c1a5f1b75d81e0ed5a93ce98dc9b833db7839247b1d9c24fe", "abcdefghi"},
+ {"ef6b97321f34b1fea2169a7db9e1960b471aa13302a988087357c520be957ca119c3ba68e6b4982c019ec89de3865ccf6a3cda1fe11e59f98d99f1502c8b9745", "abcdefghij"},
+ {"2210d99af9c8bdecda1b4beff822136753d8342505ddce37f1314e2cdbb488c6016bdaa9bd2ffa513dd5de2e4b50f031393d8ab61f773b0e0130d7381e0f8a1d", "Discard medicine more than two years old."},
+ {"a687a8985b4d8d0a24f115fe272255c6afaf3909225838546159c1ed685c211a203796ae8ecc4c81a5b6315919b3a64f10713da07e341fcdbb08541bf03066ce", "He who has a shady past knows that nice guys finish last."},
+ {"8ddb0392e818b7d585ab22769a50df660d9f6d559cca3afc5691b8ca91b8451374e42bcdabd64589ed7c91d85f626596228a5c8572677eb98bc6b624befb7af8", "I wouldn't marry him with a ten foot pole."},
+ {"26ed8f6ca7f8d44b6a8a54ae39640fa8ad5c673f70ee9ce074ba4ef0d483eea00bab2f61d8695d6b34df9c6c48ae36246362200ed820448bdc03a720366a87c6", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"e5a14bf044be69615aade89afcf1ab0389d5fc302a884d403579d1386a2400c089b0dbb387ed0f463f9ee342f8244d5a38cfbc0e819da9529fbff78368c9a982", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"420a1faa48919e14651bed45725abe0f7a58e0f099424c4e5a49194946e38b46c1f8034b18ef169b2e31050d1648e0b982386595f7df47da4b6fd18e55333015", "Nepal premier won't resign."},
+ {"d926a863beadb20134db07683535c72007b0e695045876254f341ddcccde132a908c5af57baa6a6a9c63e6649bba0c213dc05fadcf9abccea09f23dcfb637fbe", "For every action there is an equal and opposite government program."},
+ {"9a98dd9bb67d0da7bf83da5313dff4fd60a4bac0094f1b05633690ffa7f6d61de9a1d4f8617937d560833a9aaa9ccafe3fd24db418d0e728833545cadd3ad92d", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"d7fde2d2351efade52f4211d3746a0780a26eec3df9b2ed575368a8a1c09ec452402293a8ea4eceb5a4f60064ea29b13cdd86918cd7a4faf366160b009804107", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"b0f35ffa2697359c33a56f5c0cf715c7aeed96da9905ca2698acadb08fbc9e669bf566b6bd5d61a3e86dc22999bcc9f2224e33d1d4f32a228cf9d0349e2db518", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"3d2e5f91778c9e66f7e061293aaa8a8fc742dd3b2e4f483772464b1144189b49273e610e5cccd7a81a19ca1fa70f16b10f1a100a4d8c1372336be8484c64b311", "size: a.out: bad magic"},
+ {"b2f68ff58ac015efb1c94c908b0d8c2bf06f491e4de8e6302c49016f7f8a33eac3e959856c7fddbc464de618701338a4b46f76dbfaf9a1e5262b5f40639771c7", "The major problem is with sendmail. -Mark Horton"},
+ {"d8c92db5fdf52cf8215e4df3b4909d29203ff4d00e9ad0b64a6a4e04dec5e74f62e7c35c7fb881bd5de95442123df8f57a489b0ae616bd326f84d10021121c57", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"19a9f8dc0a233e464e8566ad3ca9b91e459a7b8c4780985b015776e1bf239a19bc233d0556343e2b0a9bc220900b4ebf4f8bdf89ff8efeaf79602d6849e6f72e", "If the enemy is within range, then so are you."},
+ {"00b4c41f307bde87301cdc5b5ab1ae9a592e8ecbb2021dd7bc4b34e2ace60741cc362560bec566ba35178595a91932b8d5357e2c9cec92d393b0fa7831852476", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"91eccc3d5375fd026e4d6787874b1dce201cecd8a27dbded5065728cb2d09c58a3d467bb1faf353bf7ba567e005245d5321b55bc344f7c07b91cb6f26c959be7", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"fabbbe22180f1f137cfdc9556d2570e775d1ae02a597ded43a72a40f9b485d500043b7be128fb9fcd982b83159a0d99aa855a9e7cc4240c00dc01a9bdf8218d7", "C is as portable as Stonehedge!!"},
+ {"2ecdec235c1fa4fc2a154d8fba1dddb8a72a1ad73838b51d792331d143f8b96a9f6fcb0f34d7caa351fe6d88771c4f105040e0392f06e0621689d33b2f3ba92e", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"7ad681f6f96f82f7abfa7ecc0334e8fa16d3dc1cdc45b60b7af43fe4075d2357c0c1d60e98350f1afb1f2fe7a4d7cd2ad55b88e458e06b73c40b437331f5dab4", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"833f9248ab4a3b9e5131f745fda1ffd2dd435b30e965957e78291c7ab73605fd1912b0794e5c233ab0a12d205a39778d19b83515d6a47003f19cdee51d98c7e0", "How can you write a big system without C++? -Paul Glick"},
}
var golden384 = []sha512Test{
- sha512Test{"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b", ""},
- sha512Test{"54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31", "a"},
- sha512Test{"c7be03ba5bcaa384727076db0018e99248e1a6e8bd1b9ef58a9ec9dd4eeebb3f48b836201221175befa74ddc3d35afdd", "ab"},
- sha512Test{"cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7", "abc"},
- sha512Test{"1165b3406ff0b52a3d24721f785462ca2276c9f454a116c2b2ba20171a7905ea5a026682eb659c4d5f115c363aa3c79b", "abcd"},
- sha512Test{"4c525cbeac729eaf4b4665815bc5db0c84fe6300068a727cf74e2813521565abc0ec57a37ee4d8be89d097c0d2ad52f0", "abcde"},
- sha512Test{"c6a4c65b227e7387b9c3e839d44869c4cfca3ef583dea64117859b808c1e3d8ae689e1e314eeef52a6ffe22681aa11f5", "abcdef"},
- sha512Test{"9f11fc131123f844c1226f429b6a0a6af0525d9f40f056c7fc16cdf1b06bda08e302554417a59fa7dcf6247421959d22", "abcdefg"},
- sha512Test{"9000cd7cada59d1d2eb82912f7f24e5e69cc5517f68283b005fa27c285b61e05edf1ad1a8a9bded6fd29eb87d75ad806", "abcdefgh"},
- sha512Test{"ef54915b60cf062b8dd0c29ae3cad69abe6310de63ac081f46ef019c5c90897caefd79b796cfa81139788a260ded52df", "abcdefghi"},
- sha512Test{"a12070030a02d86b0ddacd0d3a5b598344513d0a051e7355053e556a0055489c1555399b03342845c4adde2dc44ff66c", "abcdefghij"},
- sha512Test{"86f58ec2d74d1b7f8eb0c2ff0967316699639e8d4eb129de54bdf34c96cdbabe200d052149f2dd787f43571ba74670d4", "Discard medicine more than two years old."},
- sha512Test{"ae4a2b639ca9bfa04b1855d5a05fe7f230994f790891c6979103e2605f660c4c1262a48142dcbeb57a1914ba5f7c3fa7", "He who has a shady past knows that nice guys finish last."},
- sha512Test{"40ae213df6436eca952aa6841886fcdb82908ef1576a99c8f49bb9dd5023169f7c53035abdda0b54c302f4974e2105e7", "I wouldn't marry him with a ten foot pole."},
- sha512Test{"e7cf8b873c9bc950f06259aa54309f349cefa72c00d597aebf903e6519a50011dfe355afff064a10701c705693848df9", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- sha512Test{"c3d4f0f4047181c7d39d34703365f7bf70207183caf2c2f6145f04da895ef69124d9cdeb635da636c3a474e61024e29b", "The days of the digital watch are numbered. -Tom Stoppard"},
- sha512Test{"a097aab567e167d5cf93676ed73252a69f9687cb3179bb2d27c9878119e94bf7b7c4b58dc90582edfaf66e11388ed714", "Nepal premier won't resign."},
- sha512Test{"5026ca45c41fc64712eb65065da92f6467541c78f8966d3fe2c8e3fb769a3ec14215f819654b47bd64f7f0eac17184f3", "For every action there is an equal and opposite government program."},
- sha512Test{"ac1cc0f5ac8d5f5514a7b738ac322b7fb52a161b449c3672e9b6a6ad1a5e4b26b001cf3bad24c56598676ca17d4b445a", "His money is twice tainted: 'taint yours and 'taint mine."},
- sha512Test{"722d10c5de371ec0c8c4b5247ac8a5f1d240d68c73f8da13d8b25f0166d6f309bf9561979a111a0049405771d201941a", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- sha512Test{"dc2d3ea18bfa10549c63bf2b75b39b5167a80c12aff0e05443168ea87ff149fb0eda5e0bd234eb5d48c7d02ffc5807f1", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- sha512Test{"1d67c969e2a945ae5346d2139760261504d4ba164c522443afe19ef3e29b152a4c52445489cfc9d7215e5a450e8e1e4e", "size: a.out: bad magic"},
- sha512Test{"5ff8e075e465646e7b73ef36d812c6e9f7d60fa6ea0e533e5569b4f73cde53cdd2cc787f33540af57cca3fe467d32fe0", "The major problem is with sendmail. -Mark Horton"},
- sha512Test{"5bd0a997a67c9ae1979a894eb0cde403dde003c9b6f2c03cf21925c42ff4e1176e6df1ca005381612ef18457b9b7ec3b", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- sha512Test{"1eee6da33e7e54fc5be52ae23b94b16ba4d2a947ae4505c6a3edfc7401151ea5205ac01b669b56f27d8ef7f175ed7762", "If the enemy is within range, then so are you."},
- sha512Test{"76b06e9dea66bfbb1a96029426dc0dfd7830bd297eb447ff5358d94a87cd00c88b59df2493fef56ecbb5231073892ea9", "It's well we cannot hear the screams/That we create in others' dreams."},
- sha512Test{"12acaf21452cff586143e3f5db0bfdf7802c057e1adf2a619031c4e1b0ccc4208cf6cef8fe722bbaa2fb46a30d9135d8", "You remind me of a TV show, but that's all right: I watch it anyway."},
- sha512Test{"0fc23d7f4183efd186f0bc4fc5db867e026e2146b06cb3d52f4bdbd57d1740122caa853b41868b197b2ac759db39df88", "C is as portable as Stonehedge!!"},
- sha512Test{"bc805578a7f85d34a86a32976e1c34fe65cf815186fbef76f46ef99cda10723f971f3f1464d488243f5e29db7488598d", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- sha512Test{"b23918399a12ebf4431559eec3813eaf7412e875fd7464f16d581e473330842d2e96c6be49a7ce3f9bb0b8bc0fcbe0fe", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- sha512Test{"1764b700eb1ead52a2fc33cc28975c2180f1b8faa5038d94cffa8d78154aab16e91dd787e7b0303948ebed62561542c8", "How can you write a big system without C++? -Paul Glick"},
+ {"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b", ""},
+ {"54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31", "a"},
+ {"c7be03ba5bcaa384727076db0018e99248e1a6e8bd1b9ef58a9ec9dd4eeebb3f48b836201221175befa74ddc3d35afdd", "ab"},
+ {"cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7", "abc"},
+ {"1165b3406ff0b52a3d24721f785462ca2276c9f454a116c2b2ba20171a7905ea5a026682eb659c4d5f115c363aa3c79b", "abcd"},
+ {"4c525cbeac729eaf4b4665815bc5db0c84fe6300068a727cf74e2813521565abc0ec57a37ee4d8be89d097c0d2ad52f0", "abcde"},
+ {"c6a4c65b227e7387b9c3e839d44869c4cfca3ef583dea64117859b808c1e3d8ae689e1e314eeef52a6ffe22681aa11f5", "abcdef"},
+ {"9f11fc131123f844c1226f429b6a0a6af0525d9f40f056c7fc16cdf1b06bda08e302554417a59fa7dcf6247421959d22", "abcdefg"},
+ {"9000cd7cada59d1d2eb82912f7f24e5e69cc5517f68283b005fa27c285b61e05edf1ad1a8a9bded6fd29eb87d75ad806", "abcdefgh"},
+ {"ef54915b60cf062b8dd0c29ae3cad69abe6310de63ac081f46ef019c5c90897caefd79b796cfa81139788a260ded52df", "abcdefghi"},
+ {"a12070030a02d86b0ddacd0d3a5b598344513d0a051e7355053e556a0055489c1555399b03342845c4adde2dc44ff66c", "abcdefghij"},
+ {"86f58ec2d74d1b7f8eb0c2ff0967316699639e8d4eb129de54bdf34c96cdbabe200d052149f2dd787f43571ba74670d4", "Discard medicine more than two years old."},
+ {"ae4a2b639ca9bfa04b1855d5a05fe7f230994f790891c6979103e2605f660c4c1262a48142dcbeb57a1914ba5f7c3fa7", "He who has a shady past knows that nice guys finish last."},
+ {"40ae213df6436eca952aa6841886fcdb82908ef1576a99c8f49bb9dd5023169f7c53035abdda0b54c302f4974e2105e7", "I wouldn't marry him with a ten foot pole."},
+ {"e7cf8b873c9bc950f06259aa54309f349cefa72c00d597aebf903e6519a50011dfe355afff064a10701c705693848df9", "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {"c3d4f0f4047181c7d39d34703365f7bf70207183caf2c2f6145f04da895ef69124d9cdeb635da636c3a474e61024e29b", "The days of the digital watch are numbered. -Tom Stoppard"},
+ {"a097aab567e167d5cf93676ed73252a69f9687cb3179bb2d27c9878119e94bf7b7c4b58dc90582edfaf66e11388ed714", "Nepal premier won't resign."},
+ {"5026ca45c41fc64712eb65065da92f6467541c78f8966d3fe2c8e3fb769a3ec14215f819654b47bd64f7f0eac17184f3", "For every action there is an equal and opposite government program."},
+ {"ac1cc0f5ac8d5f5514a7b738ac322b7fb52a161b449c3672e9b6a6ad1a5e4b26b001cf3bad24c56598676ca17d4b445a", "His money is twice tainted: 'taint yours and 'taint mine."},
+ {"722d10c5de371ec0c8c4b5247ac8a5f1d240d68c73f8da13d8b25f0166d6f309bf9561979a111a0049405771d201941a", "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {"dc2d3ea18bfa10549c63bf2b75b39b5167a80c12aff0e05443168ea87ff149fb0eda5e0bd234eb5d48c7d02ffc5807f1", "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {"1d67c969e2a945ae5346d2139760261504d4ba164c522443afe19ef3e29b152a4c52445489cfc9d7215e5a450e8e1e4e", "size: a.out: bad magic"},
+ {"5ff8e075e465646e7b73ef36d812c6e9f7d60fa6ea0e533e5569b4f73cde53cdd2cc787f33540af57cca3fe467d32fe0", "The major problem is with sendmail. -Mark Horton"},
+ {"5bd0a997a67c9ae1979a894eb0cde403dde003c9b6f2c03cf21925c42ff4e1176e6df1ca005381612ef18457b9b7ec3b", "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {"1eee6da33e7e54fc5be52ae23b94b16ba4d2a947ae4505c6a3edfc7401151ea5205ac01b669b56f27d8ef7f175ed7762", "If the enemy is within range, then so are you."},
+ {"76b06e9dea66bfbb1a96029426dc0dfd7830bd297eb447ff5358d94a87cd00c88b59df2493fef56ecbb5231073892ea9", "It's well we cannot hear the screams/That we create in others' dreams."},
+ {"12acaf21452cff586143e3f5db0bfdf7802c057e1adf2a619031c4e1b0ccc4208cf6cef8fe722bbaa2fb46a30d9135d8", "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {"0fc23d7f4183efd186f0bc4fc5db867e026e2146b06cb3d52f4bdbd57d1740122caa853b41868b197b2ac759db39df88", "C is as portable as Stonehedge!!"},
+ {"bc805578a7f85d34a86a32976e1c34fe65cf815186fbef76f46ef99cda10723f971f3f1464d488243f5e29db7488598d", "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {"b23918399a12ebf4431559eec3813eaf7412e875fd7464f16d581e473330842d2e96c6be49a7ce3f9bb0b8bc0fcbe0fe", "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {"1764b700eb1ead52a2fc33cc28975c2180f1b8faa5038d94cffa8d78154aab16e91dd787e7b0303948ebed62561542c8", "How can you write a big system without C++? -Paul Glick"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/crypto/subtle/constant_time_test.go b/src/pkg/crypto/subtle/constant_time_test.go
index 25962b9ae5..b28b735810 100644
--- a/src/pkg/crypto/subtle/constant_time_test.go
+++ b/src/pkg/crypto/subtle/constant_time_test.go
@@ -15,9 +15,9 @@ type TestConstantTimeCompareStruct struct {
}
var testConstandTimeCompareData = []TestConstantTimeCompareStruct{
- TestConstantTimeCompareStruct{[]byte{}, []byte{}, 1},
- TestConstantTimeCompareStruct{[]byte{0x11}, []byte{0x11}, 1},
- TestConstantTimeCompareStruct{[]byte{0x12}, []byte{0x11}, 0},
+ {[]byte{}, []byte{}, 1},
+ {[]byte{0x11}, []byte{0x11}, 1},
+ {[]byte{0x12}, []byte{0x11}, 0},
}
func TestConstantTimeCompare(t *testing.T) {
@@ -34,11 +34,11 @@ type TestConstantTimeByteEqStruct struct {
}
var testConstandTimeByteEqData = []TestConstantTimeByteEqStruct{
- TestConstantTimeByteEqStruct{0, 0, 1},
- TestConstantTimeByteEqStruct{0, 1, 0},
- TestConstantTimeByteEqStruct{1, 0, 0},
- TestConstantTimeByteEqStruct{0xff, 0xff, 1},
- TestConstantTimeByteEqStruct{0xff, 0xfe, 0},
+ {0, 0, 1},
+ {0, 1, 0},
+ {1, 0, 0},
+ {0xff, 0xff, 1},
+ {0xff, 0xfe, 0},
}
func byteEq(a, b uint8) int {
diff --git a/src/pkg/crypto/tls/handshake_server.go b/src/pkg/crypto/tls/handshake_server.go
index 71cbe6a4dd..2255038461 100644
--- a/src/pkg/crypto/tls/handshake_server.go
+++ b/src/pkg/crypto/tls/handshake_server.go
@@ -29,7 +29,7 @@ type cipherSuite struct {
}
var cipherSuites = []cipherSuite{
- cipherSuite{TLS_RSA_WITH_RC4_128_SHA, 20, 16},
+ {TLS_RSA_WITH_RC4_128_SHA, 20, 16},
}
func (c *Conn) serverHandshake() os.Error {
diff --git a/src/pkg/crypto/tls/handshake_server_test.go b/src/pkg/crypto/tls/handshake_server_test.go
index c1a72fce27..efdbb66051 100644
--- a/src/pkg/crypto/tls/handshake_server_test.go
+++ b/src/pkg/crypto/tls/handshake_server_test.go
@@ -187,7 +187,7 @@ var testPrivateKey = &rsa.PrivateKey{
// to dump a session.
var serverScript = [][]byte{
// Alternate write and read.
- []byte{
+ {
0x16, 0x03, 0x02, 0x00, 0x71, 0x01, 0x00, 0x00, 0x6d, 0x03, 0x02, 0x4b, 0xd4, 0xee, 0x6e, 0xab,
0x0b, 0xc3, 0x01, 0xd6, 0x8d, 0xe0, 0x72, 0x7e, 0x6c, 0x04, 0xbe, 0x9a, 0x3c, 0xa3, 0xd8, 0x95,
0x28, 0x00, 0xb2, 0xe8, 0x1f, 0xdd, 0xb0, 0xec, 0xca, 0x46, 0x1f, 0x00, 0x00, 0x28, 0x00, 0x33,
@@ -198,7 +198,7 @@ var serverScript = [][]byte{
0x38, 0x2e, 0x30, 0x2e, 0x31, 0x30,
},
- []byte{
+ {
0x16, 0x03, 0x02, 0x00, 0x2a,
0x02, 0x00, 0x00, 0x26, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -253,7 +253,7 @@ var serverScript = [][]byte{
0x0e, 0x00, 0x00, 0x00,
},
- []byte{
+ {
0x16, 0x03, 0x02, 0x00, 0x86, 0x10, 0x00, 0x00, 0x82, 0x00, 0x80, 0x3b, 0x7a, 0x9b, 0x05, 0xfd,
0x1b, 0x0d, 0x81, 0xf0, 0xac, 0x59, 0x57, 0x4e, 0xb6, 0xf5, 0x81, 0xed, 0x52, 0x78, 0xc5, 0xff,
0x36, 0x33, 0x9c, 0x94, 0x31, 0xc3, 0x14, 0x98, 0x5d, 0xa0, 0x49, 0x23, 0x11, 0x67, 0xdf, 0x73,
@@ -271,7 +271,7 @@ var serverScript = [][]byte{
0xa0, 0xb7, 0x8c, 0x9d, 0x24, 0xbd, 0x99, 0x33, 0x1e,
},
- []byte{
+ {
0x14, 0x03, 0x02, 0x00, 0x01,
0x01,
diff --git a/src/pkg/crypto/tls/prf_test.go b/src/pkg/crypto/tls/prf_test.go
index 5c23f368db..d99bab5b5e 100644
--- a/src/pkg/crypto/tls/prf_test.go
+++ b/src/pkg/crypto/tls/prf_test.go
@@ -14,11 +14,11 @@ type testSplitPreMasterSecretTest struct {
}
var testSplitPreMasterSecretTests = []testSplitPreMasterSecretTest{
- testSplitPreMasterSecretTest{"", "", ""},
- testSplitPreMasterSecretTest{"00", "00", "00"},
- testSplitPreMasterSecretTest{"0011", "00", "11"},
- testSplitPreMasterSecretTest{"001122", "0011", "1122"},
- testSplitPreMasterSecretTest{"00112233", "0011", "2233"},
+ {"", "", ""},
+ {"00", "00", "00"},
+ {"0011", "00", "11"},
+ {"001122", "0011", "1122"},
+ {"00112233", "0011", "2233"},
}
func TestSplitPreMasterSecret(t *testing.T) {
@@ -65,7 +65,7 @@ func TestKeysFromPreMasterSecret(t *testing.T) {
// These test vectors were generated from GnuTLS using `gnutls-cli --insecure -d 9 `
var testKeysFromTests = []testKeysFromTest{
- testKeysFromTest{
+ {
"0302cac83ad4b1db3b9ab49ad05957de2a504a634a386fc600889321e1a971f57479466830ac3e6f468e87f5385fa0c5",
"4ae66303755184a3917fcb44880605fcc53baa01912b22ed94473fc69cebd558",
"4ae663020ec16e6bb5130be918cfcafd4d765979a3136a5d50c593446e4e44db",
@@ -77,7 +77,7 @@ var testKeysFromTests = []testKeysFromTest{
20,
16,
},
- testKeysFromTest{
+ {
"03023f7527316bc12cbcd69e4b9e8275d62c028f27e65c745cfcddc7ce01bd3570a111378b63848127f1c36e5f9e4890",
"4ae66364b5ea56b20ce4e25555aed2d7e67f42788dd03f3fee4adae0459ab106",
"4ae66363ab815cbf6a248b87d6b556184e945e9b97fbdf247858b0bdafacfa1c",
@@ -89,7 +89,7 @@ var testKeysFromTests = []testKeysFromTest{
20,
16,
},
- testKeysFromTest{
+ {
"832d515f1d61eebb2be56ba0ef79879efb9b527504abb386fb4310ed5d0e3b1f220d3bb6b455033a2773e6d8bdf951d278a187482b400d45deb88a5d5a6bb7d6a7a1decc04eb9ef0642876cd4a82d374d3b6ff35f0351dc5d411104de431375355addc39bfb1f6329fb163b0bc298d658338930d07d313cd980a7e3d9196cac1",
"4ae663b2ee389c0de147c509d8f18f5052afc4aaf9699efe8cb05ece883d3a5e",
"4ae664d503fd4cff50cfc1fb8fc606580f87b0fcdac9554ba0e01d785bdf278e",
diff --git a/src/pkg/crypto/x509/x509.go b/src/pkg/crypto/x509/x509.go
index c64536767c..4005bf0b62 100644
--- a/src/pkg/crypto/x509/x509.go
+++ b/src/pkg/crypto/x509/x509.go
@@ -221,39 +221,39 @@ func (n Name) toRDNSequence() (ret rdnSequence) {
ret = make([]relativeDistinguishedNameSET, 9 /* maximum number of elements */ )
i := 0
if len(n.Country) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidCountry, n.Country}}
+ ret[i] = []attributeTypeAndValue{{oidCountry, n.Country}}
i++
}
if len(n.Organization) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidOrganization, n.Organization}}
+ ret[i] = []attributeTypeAndValue{{oidOrganization, n.Organization}}
i++
}
if len(n.OrganizationalUnit) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidOrganizationalUnit, n.OrganizationalUnit}}
+ ret[i] = []attributeTypeAndValue{{oidOrganizationalUnit, n.OrganizationalUnit}}
i++
}
if len(n.CommonName) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidCommonName, n.CommonName}}
+ ret[i] = []attributeTypeAndValue{{oidCommonName, n.CommonName}}
i++
}
if len(n.SerialNumber) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidSerialNumber, n.SerialNumber}}
+ ret[i] = []attributeTypeAndValue{{oidSerialNumber, n.SerialNumber}}
i++
}
if len(n.Locality) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidLocatity, n.Locality}}
+ ret[i] = []attributeTypeAndValue{{oidLocatity, n.Locality}}
i++
}
if len(n.Province) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidProvince, n.Province}}
+ ret[i] = []attributeTypeAndValue{{oidProvince, n.Province}}
i++
}
if len(n.StreetAddress) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidStreetAddress, n.StreetAddress}}
+ ret[i] = []attributeTypeAndValue{{oidStreetAddress, n.StreetAddress}}
i++
}
if len(n.PostalCode) > 0 {
- ret[i] = []attributeTypeAndValue{attributeTypeAndValue{oidPostalCode, n.PostalCode}}
+ ret[i] = []attributeTypeAndValue{{oidPostalCode, n.PostalCode}}
i++
}
diff --git a/src/pkg/crypto/x509/x509_test.go b/src/pkg/crypto/x509/x509_test.go
index 8a024528bd..f667741ddf 100644
--- a/src/pkg/crypto/x509/x509_test.go
+++ b/src/pkg/crypto/x509/x509_test.go
@@ -59,16 +59,16 @@ type matchHostnamesTest struct {
}
var matchHostnamesTests = []matchHostnamesTest{
- matchHostnamesTest{"a.b.c", "a.b.c", true},
- matchHostnamesTest{"a.b.c", "b.b.c", false},
- matchHostnamesTest{"", "b.b.c", false},
- matchHostnamesTest{"a.b.c", "", false},
- matchHostnamesTest{"example.com", "example.com", true},
- matchHostnamesTest{"example.com", "www.example.com", false},
- matchHostnamesTest{"*.example.com", "www.example.com", true},
- matchHostnamesTest{"*.example.com", "xyz.www.example.com", false},
- matchHostnamesTest{"*.*.example.com", "xyz.www.example.com", true},
- matchHostnamesTest{"*.www.*.com", "xyz.www.example.com", true},
+ {"a.b.c", "a.b.c", true},
+ {"a.b.c", "b.b.c", false},
+ {"", "b.b.c", false},
+ {"a.b.c", "", false},
+ {"example.com", "example.com", true},
+ {"example.com", "www.example.com", false},
+ {"*.example.com", "www.example.com", true},
+ {"*.example.com", "xyz.www.example.com", false},
+ {"*.*.example.com", "xyz.www.example.com", true},
+ {"*.www.*.com", "xyz.www.example.com", true},
}
func TestMatchHostnames(t *testing.T) {
diff --git a/src/pkg/crypto/xtea/xtea_test.go b/src/pkg/crypto/xtea/xtea_test.go
index 94756f79f5..7fe3468f15 100644
--- a/src/pkg/crypto/xtea/xtea_test.go
+++ b/src/pkg/crypto/xtea/xtea_test.go
@@ -132,54 +132,54 @@ type CryptTest struct {
var CryptTests = []CryptTest{
// These were sourced from http://www.freemedialibrary.com/index.php/XTEA_test_vectors
- CryptTest{
+ {
[]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
[]byte{0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48},
[]byte{0x49, 0x7d, 0xf3, 0xd0, 0x72, 0x61, 0x2c, 0xb5},
},
- CryptTest{
+ {
[]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
[]byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
[]byte{0xe7, 0x8f, 0x2d, 0x13, 0x74, 0x43, 0x41, 0xd8},
},
- CryptTest{
+ {
[]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
[]byte{0x5a, 0x5b, 0x6e, 0x27, 0x89, 0x48, 0xd7, 0x7f},
[]byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
},
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48},
[]byte{0xa0, 0x39, 0x05, 0x89, 0xf8, 0xb8, 0xef, 0xa5},
},
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
[]byte{0xed, 0x23, 0x37, 0x5a, 0x82, 0x1a, 0x8c, 0x2d},
},
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x70, 0xe1, 0x22, 0x5d, 0x6e, 0x4e, 0x76, 0x55},
[]byte{0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41},
},
// These vectors are from http://wiki.secondlife.com/wiki/XTEA_Strong_Encryption_Implementation#Bouncy_Castle_C.23_API
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0xDE, 0xE9, 0xD4, 0xD8, 0xF7, 0x13, 0x1E, 0xD9},
},
- CryptTest{
+ {
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
[]byte{0x06, 0x5C, 0x1B, 0x89, 0x75, 0xC6, 0xA8, 0x16},
},
- CryptTest{
+ {
[]byte{0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
[]byte{0x1F, 0xF9, 0xA0, 0x26, 0x1A, 0xC6, 0x42, 0x64},
},
- CryptTest{
+ {
[]byte{0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A},
[]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
[]byte{0x8C, 0x67, 0x15, 0x5B, 0x2E, 0xF9, 0x1E, 0xAD},
diff --git a/src/pkg/debug/elf/elf.go b/src/pkg/debug/elf/elf.go
index 394a7cc87b..46d618ce69 100644
--- a/src/pkg/debug/elf/elf.go
+++ b/src/pkg/debug/elf/elf.go
@@ -69,8 +69,8 @@ const (
)
var versionStrings = []intName{
- intName{0, "EV_NONE"},
- intName{1, "EV_CURRENT"},
+ {0, "EV_NONE"},
+ {1, "EV_CURRENT"},
}
func (i Version) String() string { return stringName(uint32(i), versionStrings, false) }
@@ -86,9 +86,9 @@ const (
)
var classStrings = []intName{
- intName{0, "ELFCLASSNONE"},
- intName{1, "ELFCLASS32"},
- intName{2, "ELFCLASS64"},
+ {0, "ELFCLASSNONE"},
+ {1, "ELFCLASS32"},
+ {2, "ELFCLASS64"},
}
func (i Class) String() string { return stringName(uint32(i), classStrings, false) }
@@ -104,9 +104,9 @@ const (
)
var dataStrings = []intName{
- intName{0, "ELFDATANONE"},
- intName{1, "ELFDATA2LSB"},
- intName{2, "ELFDATA2MSB"},
+ {0, "ELFDATANONE"},
+ {1, "ELFDATA2LSB"},
+ {2, "ELFDATA2MSB"},
}
func (i Data) String() string { return stringName(uint32(i), dataStrings, false) }
@@ -136,23 +136,23 @@ const (
)
var osabiStrings = []intName{
- intName{0, "ELFOSABI_NONE"},
- intName{1, "ELFOSABI_HPUX"},
- intName{2, "ELFOSABI_NETBSD"},
- intName{3, "ELFOSABI_LINUX"},
- intName{4, "ELFOSABI_HURD"},
- intName{5, "ELFOSABI_86OPEN"},
- intName{6, "ELFOSABI_SOLARIS"},
- intName{7, "ELFOSABI_AIX"},
- intName{8, "ELFOSABI_IRIX"},
- intName{9, "ELFOSABI_FREEBSD"},
- intName{10, "ELFOSABI_TRU64"},
- intName{11, "ELFOSABI_MODESTO"},
- intName{12, "ELFOSABI_OPENBSD"},
- intName{13, "ELFOSABI_OPENVMS"},
- intName{14, "ELFOSABI_NSK"},
- intName{97, "ELFOSABI_ARM"},
- intName{255, "ELFOSABI_STANDALONE"},
+ {0, "ELFOSABI_NONE"},
+ {1, "ELFOSABI_HPUX"},
+ {2, "ELFOSABI_NETBSD"},
+ {3, "ELFOSABI_LINUX"},
+ {4, "ELFOSABI_HURD"},
+ {5, "ELFOSABI_86OPEN"},
+ {6, "ELFOSABI_SOLARIS"},
+ {7, "ELFOSABI_AIX"},
+ {8, "ELFOSABI_IRIX"},
+ {9, "ELFOSABI_FREEBSD"},
+ {10, "ELFOSABI_TRU64"},
+ {11, "ELFOSABI_MODESTO"},
+ {12, "ELFOSABI_OPENBSD"},
+ {13, "ELFOSABI_OPENVMS"},
+ {14, "ELFOSABI_NSK"},
+ {97, "ELFOSABI_ARM"},
+ {255, "ELFOSABI_STANDALONE"},
}
func (i OSABI) String() string { return stringName(uint32(i), osabiStrings, false) }
@@ -174,15 +174,15 @@ const (
)
var typeStrings = []intName{
- intName{0, "ET_NONE"},
- intName{1, "ET_REL"},
- intName{2, "ET_EXEC"},
- intName{3, "ET_DYN"},
- intName{4, "ET_CORE"},
- intName{0xfe00, "ET_LOOS"},
- intName{0xfeff, "ET_HIOS"},
- intName{0xff00, "ET_LOPROC"},
- intName{0xffff, "ET_HIPROC"},
+ {0, "ET_NONE"},
+ {1, "ET_REL"},
+ {2, "ET_EXEC"},
+ {3, "ET_DYN"},
+ {4, "ET_CORE"},
+ {0xfe00, "ET_LOOS"},
+ {0xfeff, "ET_HIOS"},
+ {0xff00, "ET_LOPROC"},
+ {0xffff, "ET_HIPROC"},
}
func (i Type) String() string { return stringName(uint32(i), typeStrings, false) }
@@ -244,55 +244,55 @@ const (
)
var machineStrings = []intName{
- intName{0, "EM_NONE"},
- intName{1, "EM_M32"},
- intName{2, "EM_SPARC"},
- intName{3, "EM_386"},
- intName{4, "EM_68K"},
- intName{5, "EM_88K"},
- intName{7, "EM_860"},
- intName{8, "EM_MIPS"},
- intName{9, "EM_S370"},
- intName{10, "EM_MIPS_RS3_LE"},
- intName{15, "EM_PARISC"},
- intName{17, "EM_VPP500"},
- intName{18, "EM_SPARC32PLUS"},
- intName{19, "EM_960"},
- intName{20, "EM_PPC"},
- intName{21, "EM_PPC64"},
- intName{22, "EM_S390"},
- intName{36, "EM_V800"},
- intName{37, "EM_FR20"},
- intName{38, "EM_RH32"},
- intName{39, "EM_RCE"},
- intName{40, "EM_ARM"},
- intName{42, "EM_SH"},
- intName{43, "EM_SPARCV9"},
- intName{44, "EM_TRICORE"},
- intName{45, "EM_ARC"},
- intName{46, "EM_H8_300"},
- intName{47, "EM_H8_300H"},
- intName{48, "EM_H8S"},
- intName{49, "EM_H8_500"},
- intName{50, "EM_IA_64"},
- intName{51, "EM_MIPS_X"},
- intName{52, "EM_COLDFIRE"},
- intName{53, "EM_68HC12"},
- intName{54, "EM_MMA"},
- intName{55, "EM_PCP"},
- intName{56, "EM_NCPU"},
- intName{57, "EM_NDR1"},
- intName{58, "EM_STARCORE"},
- intName{59, "EM_ME16"},
- intName{60, "EM_ST100"},
- intName{61, "EM_TINYJ"},
- intName{62, "EM_X86_64"},
+ {0, "EM_NONE"},
+ {1, "EM_M32"},
+ {2, "EM_SPARC"},
+ {3, "EM_386"},
+ {4, "EM_68K"},
+ {5, "EM_88K"},
+ {7, "EM_860"},
+ {8, "EM_MIPS"},
+ {9, "EM_S370"},
+ {10, "EM_MIPS_RS3_LE"},
+ {15, "EM_PARISC"},
+ {17, "EM_VPP500"},
+ {18, "EM_SPARC32PLUS"},
+ {19, "EM_960"},
+ {20, "EM_PPC"},
+ {21, "EM_PPC64"},
+ {22, "EM_S390"},
+ {36, "EM_V800"},
+ {37, "EM_FR20"},
+ {38, "EM_RH32"},
+ {39, "EM_RCE"},
+ {40, "EM_ARM"},
+ {42, "EM_SH"},
+ {43, "EM_SPARCV9"},
+ {44, "EM_TRICORE"},
+ {45, "EM_ARC"},
+ {46, "EM_H8_300"},
+ {47, "EM_H8_300H"},
+ {48, "EM_H8S"},
+ {49, "EM_H8_500"},
+ {50, "EM_IA_64"},
+ {51, "EM_MIPS_X"},
+ {52, "EM_COLDFIRE"},
+ {53, "EM_68HC12"},
+ {54, "EM_MMA"},
+ {55, "EM_PCP"},
+ {56, "EM_NCPU"},
+ {57, "EM_NDR1"},
+ {58, "EM_STARCORE"},
+ {59, "EM_ME16"},
+ {60, "EM_ST100"},
+ {61, "EM_TINYJ"},
+ {62, "EM_X86_64"},
/* Non-standard or deprecated. */
- intName{6, "EM_486"},
- intName{10, "EM_MIPS_RS4_BE"},
- intName{41, "EM_ALPHA_STD"},
- intName{0x9026, "EM_ALPHA"},
+ {6, "EM_486"},
+ {10, "EM_MIPS_RS4_BE"},
+ {41, "EM_ALPHA_STD"},
+ {0x9026, "EM_ALPHA"},
}
func (i Machine) String() string { return stringName(uint32(i), machineStrings, false) }
@@ -315,12 +315,12 @@ const (
)
var shnStrings = []intName{
- intName{0, "SHN_UNDEF"},
- intName{0xff00, "SHN_LOPROC"},
- intName{0xff20, "SHN_LOOS"},
- intName{0xfff1, "SHN_ABS"},
- intName{0xfff2, "SHN_COMMON"},
- intName{0xffff, "SHN_XINDEX"},
+ {0, "SHN_UNDEF"},
+ {0xff00, "SHN_LOPROC"},
+ {0xff20, "SHN_LOOS"},
+ {0xfff1, "SHN_ABS"},
+ {0xfff2, "SHN_COMMON"},
+ {0xffff, "SHN_XINDEX"},
}
func (i SectionIndex) String() string { return stringName(uint32(i), shnStrings, false) }
@@ -356,29 +356,29 @@ const (
)
var shtStrings = []intName{
- intName{0, "SHT_NULL"},
- intName{1, "SHT_PROGBITS"},
- intName{2, "SHT_SYMTAB"},
- intName{3, "SHT_STRTAB"},
- intName{4, "SHT_RELA"},
- intName{5, "SHT_HASH"},
- intName{6, "SHT_DYNAMIC"},
- intName{7, "SHT_NOTE"},
- intName{8, "SHT_NOBITS"},
- intName{9, "SHT_REL"},
- intName{10, "SHT_SHLIB"},
- intName{11, "SHT_DYNSYM"},
- intName{14, "SHT_INIT_ARRAY"},
- intName{15, "SHT_FINI_ARRAY"},
- intName{16, "SHT_PREINIT_ARRAY"},
- intName{17, "SHT_GROUP"},
- intName{18, "SHT_SYMTAB_SHNDX"},
- intName{0x60000000, "SHT_LOOS"},
- intName{0x6fffffff, "SHT_HIOS"},
- intName{0x70000000, "SHT_LOPROC"},
- intName{0x7fffffff, "SHT_HIPROC"},
- intName{0x80000000, "SHT_LOUSER"},
- intName{0xffffffff, "SHT_HIUSER"},
+ {0, "SHT_NULL"},
+ {1, "SHT_PROGBITS"},
+ {2, "SHT_SYMTAB"},
+ {3, "SHT_STRTAB"},
+ {4, "SHT_RELA"},
+ {5, "SHT_HASH"},
+ {6, "SHT_DYNAMIC"},
+ {7, "SHT_NOTE"},
+ {8, "SHT_NOBITS"},
+ {9, "SHT_REL"},
+ {10, "SHT_SHLIB"},
+ {11, "SHT_DYNSYM"},
+ {14, "SHT_INIT_ARRAY"},
+ {15, "SHT_FINI_ARRAY"},
+ {16, "SHT_PREINIT_ARRAY"},
+ {17, "SHT_GROUP"},
+ {18, "SHT_SYMTAB_SHNDX"},
+ {0x60000000, "SHT_LOOS"},
+ {0x6fffffff, "SHT_HIOS"},
+ {0x70000000, "SHT_LOPROC"},
+ {0x7fffffff, "SHT_HIPROC"},
+ {0x80000000, "SHT_LOUSER"},
+ {0xffffffff, "SHT_HIUSER"},
}
func (i SectionType) String() string { return stringName(uint32(i), shtStrings, false) }
@@ -403,16 +403,16 @@ const (
)
var shfStrings = []intName{
- intName{0x1, "SHF_WRITE"},
- intName{0x2, "SHF_ALLOC"},
- intName{0x4, "SHF_EXECINSTR"},
- intName{0x10, "SHF_MERGE"},
- intName{0x20, "SHF_STRINGS"},
- intName{0x40, "SHF_INFO_LINK"},
- intName{0x80, "SHF_LINK_ORDER"},
- intName{0x100, "SHF_OS_NONCONFORMING"},
- intName{0x200, "SHF_GROUP"},
- intName{0x400, "SHF_TLS"},
+ {0x1, "SHF_WRITE"},
+ {0x2, "SHF_ALLOC"},
+ {0x4, "SHF_EXECINSTR"},
+ {0x10, "SHF_MERGE"},
+ {0x20, "SHF_STRINGS"},
+ {0x40, "SHF_INFO_LINK"},
+ {0x80, "SHF_LINK_ORDER"},
+ {0x100, "SHF_OS_NONCONFORMING"},
+ {0x200, "SHF_GROUP"},
+ {0x400, "SHF_TLS"},
}
func (i SectionFlag) String() string { return flagName(uint32(i), shfStrings, false) }
@@ -437,18 +437,18 @@ const (
)
var ptStrings = []intName{
- intName{0, "PT_NULL"},
- intName{1, "PT_LOAD"},
- intName{2, "PT_DYNAMIC"},
- intName{3, "PT_INTERP"},
- intName{4, "PT_NOTE"},
- intName{5, "PT_SHLIB"},
- intName{6, "PT_PHDR"},
- intName{7, "PT_TLS"},
- intName{0x60000000, "PT_LOOS"},
- intName{0x6fffffff, "PT_HIOS"},
- intName{0x70000000, "PT_LOPROC"},
- intName{0x7fffffff, "PT_HIPROC"},
+ {0, "PT_NULL"},
+ {1, "PT_LOAD"},
+ {2, "PT_DYNAMIC"},
+ {3, "PT_INTERP"},
+ {4, "PT_NOTE"},
+ {5, "PT_SHLIB"},
+ {6, "PT_PHDR"},
+ {7, "PT_TLS"},
+ {0x60000000, "PT_LOOS"},
+ {0x6fffffff, "PT_HIOS"},
+ {0x70000000, "PT_LOPROC"},
+ {0x7fffffff, "PT_HIPROC"},
}
func (i ProgType) String() string { return stringName(uint32(i), ptStrings, false) }
@@ -466,9 +466,9 @@ const (
)
var pfStrings = []intName{
- intName{0x1, "PF_X"},
- intName{0x2, "PF_W"},
- intName{0x4, "PF_R"},
+ {0x1, "PF_X"},
+ {0x2, "PF_W"},
+ {0x4, "PF_R"},
}
func (i ProgFlag) String() string { return flagName(uint32(i), pfStrings, false) }
@@ -523,44 +523,44 @@ const (
)
var dtStrings = []intName{
- intName{0, "DT_NULL"},
- intName{1, "DT_NEEDED"},
- intName{2, "DT_PLTRELSZ"},
- intName{3, "DT_PLTGOT"},
- intName{4, "DT_HASH"},
- intName{5, "DT_STRTAB"},
- intName{6, "DT_SYMTAB"},
- intName{7, "DT_RELA"},
- intName{8, "DT_RELASZ"},
- intName{9, "DT_RELAENT"},
- intName{10, "DT_STRSZ"},
- intName{11, "DT_SYMENT"},
- intName{12, "DT_INIT"},
- intName{13, "DT_FINI"},
- intName{14, "DT_SONAME"},
- intName{15, "DT_RPATH"},
- intName{16, "DT_SYMBOLIC"},
- intName{17, "DT_REL"},
- intName{18, "DT_RELSZ"},
- intName{19, "DT_RELENT"},
- intName{20, "DT_PLTREL"},
- intName{21, "DT_DEBUG"},
- intName{22, "DT_TEXTREL"},
- intName{23, "DT_JMPREL"},
- intName{24, "DT_BIND_NOW"},
- intName{25, "DT_INIT_ARRAY"},
- intName{26, "DT_FINI_ARRAY"},
- intName{27, "DT_INIT_ARRAYSZ"},
- intName{28, "DT_FINI_ARRAYSZ"},
- intName{29, "DT_RUNPATH"},
- intName{30, "DT_FLAGS"},
- intName{32, "DT_ENCODING"},
- intName{32, "DT_PREINIT_ARRAY"},
- intName{33, "DT_PREINIT_ARRAYSZ"},
- intName{0x6000000d, "DT_LOOS"},
- intName{0x6ffff000, "DT_HIOS"},
- intName{0x70000000, "DT_LOPROC"},
- intName{0x7fffffff, "DT_HIPROC"},
+ {0, "DT_NULL"},
+ {1, "DT_NEEDED"},
+ {2, "DT_PLTRELSZ"},
+ {3, "DT_PLTGOT"},
+ {4, "DT_HASH"},
+ {5, "DT_STRTAB"},
+ {6, "DT_SYMTAB"},
+ {7, "DT_RELA"},
+ {8, "DT_RELASZ"},
+ {9, "DT_RELAENT"},
+ {10, "DT_STRSZ"},
+ {11, "DT_SYMENT"},
+ {12, "DT_INIT"},
+ {13, "DT_FINI"},
+ {14, "DT_SONAME"},
+ {15, "DT_RPATH"},
+ {16, "DT_SYMBOLIC"},
+ {17, "DT_REL"},
+ {18, "DT_RELSZ"},
+ {19, "DT_RELENT"},
+ {20, "DT_PLTREL"},
+ {21, "DT_DEBUG"},
+ {22, "DT_TEXTREL"},
+ {23, "DT_JMPREL"},
+ {24, "DT_BIND_NOW"},
+ {25, "DT_INIT_ARRAY"},
+ {26, "DT_FINI_ARRAY"},
+ {27, "DT_INIT_ARRAYSZ"},
+ {28, "DT_FINI_ARRAYSZ"},
+ {29, "DT_RUNPATH"},
+ {30, "DT_FLAGS"},
+ {32, "DT_ENCODING"},
+ {32, "DT_PREINIT_ARRAY"},
+ {33, "DT_PREINIT_ARRAYSZ"},
+ {0x6000000d, "DT_LOOS"},
+ {0x6ffff000, "DT_HIOS"},
+ {0x70000000, "DT_LOPROC"},
+ {0x7fffffff, "DT_HIPROC"},
}
func (i DynTag) String() string { return stringName(uint32(i), dtStrings, false) }
@@ -585,11 +585,11 @@ const (
)
var dflagStrings = []intName{
- intName{0x0001, "DF_ORIGIN"},
- intName{0x0002, "DF_SYMBOLIC"},
- intName{0x0004, "DF_TEXTREL"},
- intName{0x0008, "DF_BIND_NOW"},
- intName{0x0010, "DF_STATIC_TLS"},
+ {0x0001, "DF_ORIGIN"},
+ {0x0002, "DF_SYMBOLIC"},
+ {0x0004, "DF_TEXTREL"},
+ {0x0008, "DF_BIND_NOW"},
+ {0x0010, "DF_STATIC_TLS"},
}
func (i DynFlag) String() string { return flagName(uint32(i), dflagStrings, false) }
@@ -605,9 +605,9 @@ const (
)
var ntypeStrings = []intName{
- intName{1, "NT_PRSTATUS"},
- intName{2, "NT_FPREGSET"},
- intName{3, "NT_PRPSINFO"},
+ {1, "NT_PRSTATUS"},
+ {2, "NT_FPREGSET"},
+ {3, "NT_PRPSINFO"},
}
func (i NType) String() string { return stringName(uint32(i), ntypeStrings, false) }
@@ -627,13 +627,13 @@ const (
)
var stbStrings = []intName{
- intName{0, "STB_LOCAL"},
- intName{1, "STB_GLOBAL"},
- intName{2, "STB_WEAK"},
- intName{10, "STB_LOOS"},
- intName{12, "STB_HIOS"},
- intName{13, "STB_LOPROC"},
- intName{15, "STB_HIPROC"},
+ {0, "STB_LOCAL"},
+ {1, "STB_GLOBAL"},
+ {2, "STB_WEAK"},
+ {10, "STB_LOOS"},
+ {12, "STB_HIOS"},
+ {13, "STB_LOPROC"},
+ {15, "STB_HIPROC"},
}
func (i SymBind) String() string { return stringName(uint32(i), stbStrings, false) }
@@ -657,17 +657,17 @@ const (
)
var sttStrings = []intName{
- intName{0, "STT_NOTYPE"},
- intName{1, "STT_OBJECT"},
- intName{2, "STT_FUNC"},
- intName{3, "STT_SECTION"},
- intName{4, "STT_FILE"},
- intName{5, "STT_COMMON"},
- intName{6, "STT_TLS"},
- intName{10, "STT_LOOS"},
- intName{12, "STT_HIOS"},
- intName{13, "STT_LOPROC"},
- intName{15, "STT_HIPROC"},
+ {0, "STT_NOTYPE"},
+ {1, "STT_OBJECT"},
+ {2, "STT_FUNC"},
+ {3, "STT_SECTION"},
+ {4, "STT_FILE"},
+ {5, "STT_COMMON"},
+ {6, "STT_TLS"},
+ {10, "STT_LOOS"},
+ {12, "STT_HIOS"},
+ {13, "STT_LOPROC"},
+ {15, "STT_HIPROC"},
}
func (i SymType) String() string { return stringName(uint32(i), sttStrings, false) }
@@ -684,10 +684,10 @@ const (
)
var stvStrings = []intName{
- intName{0x0, "STV_DEFAULT"},
- intName{0x1, "STV_INTERNAL"},
- intName{0x2, "STV_HIDDEN"},
- intName{0x3, "STV_PROTECTED"},
+ {0x0, "STV_DEFAULT"},
+ {0x1, "STV_INTERNAL"},
+ {0x2, "STV_HIDDEN"},
+ {0x3, "STV_PROTECTED"},
}
func (i SymVis) String() string { return stringName(uint32(i), stvStrings, false) }
@@ -728,30 +728,30 @@ const (
)
var rx86_64Strings = []intName{
- intName{0, "R_X86_64_NONE"},
- intName{1, "R_X86_64_64"},
- intName{2, "R_X86_64_PC32"},
- intName{3, "R_X86_64_GOT32"},
- intName{4, "R_X86_64_PLT32"},
- intName{5, "R_X86_64_COPY"},
- intName{6, "R_X86_64_GLOB_DAT"},
- intName{7, "R_X86_64_JMP_SLOT"},
- intName{8, "R_X86_64_RELATIVE"},
- intName{9, "R_X86_64_GOTPCREL"},
- intName{10, "R_X86_64_32"},
- intName{11, "R_X86_64_32S"},
- intName{12, "R_X86_64_16"},
- intName{13, "R_X86_64_PC16"},
- intName{14, "R_X86_64_8"},
- intName{15, "R_X86_64_PC8"},
- intName{16, "R_X86_64_DTPMOD64"},
- intName{17, "R_X86_64_DTPOFF64"},
- intName{18, "R_X86_64_TPOFF64"},
- intName{19, "R_X86_64_TLSGD"},
- intName{20, "R_X86_64_TLSLD"},
- intName{21, "R_X86_64_DTPOFF32"},
- intName{22, "R_X86_64_GOTTPOFF"},
- intName{23, "R_X86_64_TPOFF32"},
+ {0, "R_X86_64_NONE"},
+ {1, "R_X86_64_64"},
+ {2, "R_X86_64_PC32"},
+ {3, "R_X86_64_GOT32"},
+ {4, "R_X86_64_PLT32"},
+ {5, "R_X86_64_COPY"},
+ {6, "R_X86_64_GLOB_DAT"},
+ {7, "R_X86_64_JMP_SLOT"},
+ {8, "R_X86_64_RELATIVE"},
+ {9, "R_X86_64_GOTPCREL"},
+ {10, "R_X86_64_32"},
+ {11, "R_X86_64_32S"},
+ {12, "R_X86_64_16"},
+ {13, "R_X86_64_PC16"},
+ {14, "R_X86_64_8"},
+ {15, "R_X86_64_PC8"},
+ {16, "R_X86_64_DTPMOD64"},
+ {17, "R_X86_64_DTPOFF64"},
+ {18, "R_X86_64_TPOFF64"},
+ {19, "R_X86_64_TLSGD"},
+ {20, "R_X86_64_TLSLD"},
+ {21, "R_X86_64_DTPOFF32"},
+ {22, "R_X86_64_GOTTPOFF"},
+ {23, "R_X86_64_TPOFF32"},
}
func (i R_X86_64) String() string { return stringName(uint32(i), rx86_64Strings, false) }
@@ -792,34 +792,34 @@ const (
)
var ralphaStrings = []intName{
- intName{0, "R_ALPHA_NONE"},
- intName{1, "R_ALPHA_REFLONG"},
- intName{2, "R_ALPHA_REFQUAD"},
- intName{3, "R_ALPHA_GPREL32"},
- intName{4, "R_ALPHA_LITERAL"},
- intName{5, "R_ALPHA_LITUSE"},
- intName{6, "R_ALPHA_GPDISP"},
- intName{7, "R_ALPHA_BRADDR"},
- intName{8, "R_ALPHA_HINT"},
- intName{9, "R_ALPHA_SREL16"},
- intName{10, "R_ALPHA_SREL32"},
- intName{11, "R_ALPHA_SREL64"},
- intName{12, "R_ALPHA_OP_PUSH"},
- intName{13, "R_ALPHA_OP_STORE"},
- intName{14, "R_ALPHA_OP_PSUB"},
- intName{15, "R_ALPHA_OP_PRSHIFT"},
- intName{16, "R_ALPHA_GPVALUE"},
- intName{17, "R_ALPHA_GPRELHIGH"},
- intName{18, "R_ALPHA_GPRELLOW"},
- intName{19, "R_ALPHA_IMMED_GP_16"},
- intName{20, "R_ALPHA_IMMED_GP_HI32"},
- intName{21, "R_ALPHA_IMMED_SCN_HI32"},
- intName{22, "R_ALPHA_IMMED_BR_HI32"},
- intName{23, "R_ALPHA_IMMED_LO32"},
- intName{24, "R_ALPHA_COPY"},
- intName{25, "R_ALPHA_GLOB_DAT"},
- intName{26, "R_ALPHA_JMP_SLOT"},
- intName{27, "R_ALPHA_RELATIVE"},
+ {0, "R_ALPHA_NONE"},
+ {1, "R_ALPHA_REFLONG"},
+ {2, "R_ALPHA_REFQUAD"},
+ {3, "R_ALPHA_GPREL32"},
+ {4, "R_ALPHA_LITERAL"},
+ {5, "R_ALPHA_LITUSE"},
+ {6, "R_ALPHA_GPDISP"},
+ {7, "R_ALPHA_BRADDR"},
+ {8, "R_ALPHA_HINT"},
+ {9, "R_ALPHA_SREL16"},
+ {10, "R_ALPHA_SREL32"},
+ {11, "R_ALPHA_SREL64"},
+ {12, "R_ALPHA_OP_PUSH"},
+ {13, "R_ALPHA_OP_STORE"},
+ {14, "R_ALPHA_OP_PSUB"},
+ {15, "R_ALPHA_OP_PRSHIFT"},
+ {16, "R_ALPHA_GPVALUE"},
+ {17, "R_ALPHA_GPRELHIGH"},
+ {18, "R_ALPHA_GPRELLOW"},
+ {19, "R_ALPHA_IMMED_GP_16"},
+ {20, "R_ALPHA_IMMED_GP_HI32"},
+ {21, "R_ALPHA_IMMED_SCN_HI32"},
+ {22, "R_ALPHA_IMMED_BR_HI32"},
+ {23, "R_ALPHA_IMMED_LO32"},
+ {24, "R_ALPHA_COPY"},
+ {25, "R_ALPHA_GLOB_DAT"},
+ {26, "R_ALPHA_JMP_SLOT"},
+ {27, "R_ALPHA_RELATIVE"},
}
func (i R_ALPHA) String() string { return stringName(uint32(i), ralphaStrings, false) }
@@ -865,39 +865,39 @@ const (
)
var rarmStrings = []intName{
- intName{0, "R_ARM_NONE"},
- intName{1, "R_ARM_PC24"},
- intName{2, "R_ARM_ABS32"},
- intName{3, "R_ARM_REL32"},
- intName{4, "R_ARM_PC13"},
- intName{5, "R_ARM_ABS16"},
- intName{6, "R_ARM_ABS12"},
- intName{7, "R_ARM_THM_ABS5"},
- intName{8, "R_ARM_ABS8"},
- intName{9, "R_ARM_SBREL32"},
- intName{10, "R_ARM_THM_PC22"},
- intName{11, "R_ARM_THM_PC8"},
- intName{12, "R_ARM_AMP_VCALL9"},
- intName{13, "R_ARM_SWI24"},
- intName{14, "R_ARM_THM_SWI8"},
- intName{15, "R_ARM_XPC25"},
- intName{16, "R_ARM_THM_XPC22"},
- intName{20, "R_ARM_COPY"},
- intName{21, "R_ARM_GLOB_DAT"},
- intName{22, "R_ARM_JUMP_SLOT"},
- intName{23, "R_ARM_RELATIVE"},
- intName{24, "R_ARM_GOTOFF"},
- intName{25, "R_ARM_GOTPC"},
- intName{26, "R_ARM_GOT32"},
- intName{27, "R_ARM_PLT32"},
- intName{100, "R_ARM_GNU_VTENTRY"},
- intName{101, "R_ARM_GNU_VTINHERIT"},
- intName{250, "R_ARM_RSBREL32"},
- intName{251, "R_ARM_THM_RPC22"},
- intName{252, "R_ARM_RREL32"},
- intName{253, "R_ARM_RABS32"},
- intName{254, "R_ARM_RPC24"},
- intName{255, "R_ARM_RBASE"},
+ {0, "R_ARM_NONE"},
+ {1, "R_ARM_PC24"},
+ {2, "R_ARM_ABS32"},
+ {3, "R_ARM_REL32"},
+ {4, "R_ARM_PC13"},
+ {5, "R_ARM_ABS16"},
+ {6, "R_ARM_ABS12"},
+ {7, "R_ARM_THM_ABS5"},
+ {8, "R_ARM_ABS8"},
+ {9, "R_ARM_SBREL32"},
+ {10, "R_ARM_THM_PC22"},
+ {11, "R_ARM_THM_PC8"},
+ {12, "R_ARM_AMP_VCALL9"},
+ {13, "R_ARM_SWI24"},
+ {14, "R_ARM_THM_SWI8"},
+ {15, "R_ARM_XPC25"},
+ {16, "R_ARM_THM_XPC22"},
+ {20, "R_ARM_COPY"},
+ {21, "R_ARM_GLOB_DAT"},
+ {22, "R_ARM_JUMP_SLOT"},
+ {23, "R_ARM_RELATIVE"},
+ {24, "R_ARM_GOTOFF"},
+ {25, "R_ARM_GOTPC"},
+ {26, "R_ARM_GOT32"},
+ {27, "R_ARM_PLT32"},
+ {100, "R_ARM_GNU_VTENTRY"},
+ {101, "R_ARM_GNU_VTINHERIT"},
+ {250, "R_ARM_RSBREL32"},
+ {251, "R_ARM_THM_RPC22"},
+ {252, "R_ARM_RREL32"},
+ {253, "R_ARM_RABS32"},
+ {254, "R_ARM_RPC24"},
+ {255, "R_ARM_RBASE"},
}
func (i R_ARM) String() string { return stringName(uint32(i), rarmStrings, false) }
@@ -941,37 +941,37 @@ const (
)
var r386Strings = []intName{
- intName{0, "R_386_NONE"},
- intName{1, "R_386_32"},
- intName{2, "R_386_PC32"},
- intName{3, "R_386_GOT32"},
- intName{4, "R_386_PLT32"},
- intName{5, "R_386_COPY"},
- intName{6, "R_386_GLOB_DAT"},
- intName{7, "R_386_JMP_SLOT"},
- intName{8, "R_386_RELATIVE"},
- intName{9, "R_386_GOTOFF"},
- intName{10, "R_386_GOTPC"},
- intName{14, "R_386_TLS_TPOFF"},
- intName{15, "R_386_TLS_IE"},
- intName{16, "R_386_TLS_GOTIE"},
- intName{17, "R_386_TLS_LE"},
- intName{18, "R_386_TLS_GD"},
- intName{19, "R_386_TLS_LDM"},
- intName{24, "R_386_TLS_GD_32"},
- intName{25, "R_386_TLS_GD_PUSH"},
- intName{26, "R_386_TLS_GD_CALL"},
- intName{27, "R_386_TLS_GD_POP"},
- intName{28, "R_386_TLS_LDM_32"},
- intName{29, "R_386_TLS_LDM_PUSH"},
- intName{30, "R_386_TLS_LDM_CALL"},
- intName{31, "R_386_TLS_LDM_POP"},
- intName{32, "R_386_TLS_LDO_32"},
- intName{33, "R_386_TLS_IE_32"},
- intName{34, "R_386_TLS_LE_32"},
- intName{35, "R_386_TLS_DTPMOD32"},
- intName{36, "R_386_TLS_DTPOFF32"},
- intName{37, "R_386_TLS_TPOFF32"},
+ {0, "R_386_NONE"},
+ {1, "R_386_32"},
+ {2, "R_386_PC32"},
+ {3, "R_386_GOT32"},
+ {4, "R_386_PLT32"},
+ {5, "R_386_COPY"},
+ {6, "R_386_GLOB_DAT"},
+ {7, "R_386_JMP_SLOT"},
+ {8, "R_386_RELATIVE"},
+ {9, "R_386_GOTOFF"},
+ {10, "R_386_GOTPC"},
+ {14, "R_386_TLS_TPOFF"},
+ {15, "R_386_TLS_IE"},
+ {16, "R_386_TLS_GOTIE"},
+ {17, "R_386_TLS_LE"},
+ {18, "R_386_TLS_GD"},
+ {19, "R_386_TLS_LDM"},
+ {24, "R_386_TLS_GD_32"},
+ {25, "R_386_TLS_GD_PUSH"},
+ {26, "R_386_TLS_GD_CALL"},
+ {27, "R_386_TLS_GD_POP"},
+ {28, "R_386_TLS_LDM_32"},
+ {29, "R_386_TLS_LDM_PUSH"},
+ {30, "R_386_TLS_LDM_CALL"},
+ {31, "R_386_TLS_LDM_POP"},
+ {32, "R_386_TLS_LDO_32"},
+ {33, "R_386_TLS_IE_32"},
+ {34, "R_386_TLS_LE_32"},
+ {35, "R_386_TLS_DTPMOD32"},
+ {36, "R_386_TLS_DTPOFF32"},
+ {37, "R_386_TLS_TPOFF32"},
}
func (i R_386) String() string { return stringName(uint32(i), r386Strings, false) }
@@ -1061,85 +1061,85 @@ const (
)
var rppcStrings = []intName{
- intName{0, "R_PPC_NONE"},
- intName{1, "R_PPC_ADDR32"},
- intName{2, "R_PPC_ADDR24"},
- intName{3, "R_PPC_ADDR16"},
- intName{4, "R_PPC_ADDR16_LO"},
- intName{5, "R_PPC_ADDR16_HI"},
- intName{6, "R_PPC_ADDR16_HA"},
- intName{7, "R_PPC_ADDR14"},
- intName{8, "R_PPC_ADDR14_BRTAKEN"},
- intName{9, "R_PPC_ADDR14_BRNTAKEN"},
- intName{10, "R_PPC_REL24"},
- intName{11, "R_PPC_REL14"},
- intName{12, "R_PPC_REL14_BRTAKEN"},
- intName{13, "R_PPC_REL14_BRNTAKEN"},
- intName{14, "R_PPC_GOT16"},
- intName{15, "R_PPC_GOT16_LO"},
- intName{16, "R_PPC_GOT16_HI"},
- intName{17, "R_PPC_GOT16_HA"},
- intName{18, "R_PPC_PLTREL24"},
- intName{19, "R_PPC_COPY"},
- intName{20, "R_PPC_GLOB_DAT"},
- intName{21, "R_PPC_JMP_SLOT"},
- intName{22, "R_PPC_RELATIVE"},
- intName{23, "R_PPC_LOCAL24PC"},
- intName{24, "R_PPC_UADDR32"},
- intName{25, "R_PPC_UADDR16"},
- intName{26, "R_PPC_REL32"},
- intName{27, "R_PPC_PLT32"},
- intName{28, "R_PPC_PLTREL32"},
- intName{29, "R_PPC_PLT16_LO"},
- intName{30, "R_PPC_PLT16_HI"},
- intName{31, "R_PPC_PLT16_HA"},
- intName{32, "R_PPC_SDAREL16"},
- intName{33, "R_PPC_SECTOFF"},
- intName{34, "R_PPC_SECTOFF_LO"},
- intName{35, "R_PPC_SECTOFF_HI"},
- intName{36, "R_PPC_SECTOFF_HA"},
-
- intName{67, "R_PPC_TLS"},
- intName{68, "R_PPC_DTPMOD32"},
- intName{69, "R_PPC_TPREL16"},
- intName{70, "R_PPC_TPREL16_LO"},
- intName{71, "R_PPC_TPREL16_HI"},
- intName{72, "R_PPC_TPREL16_HA"},
- intName{73, "R_PPC_TPREL32"},
- intName{74, "R_PPC_DTPREL16"},
- intName{75, "R_PPC_DTPREL16_LO"},
- intName{76, "R_PPC_DTPREL16_HI"},
- intName{77, "R_PPC_DTPREL16_HA"},
- intName{78, "R_PPC_DTPREL32"},
- intName{79, "R_PPC_GOT_TLSGD16"},
- intName{80, "R_PPC_GOT_TLSGD16_LO"},
- intName{81, "R_PPC_GOT_TLSGD16_HI"},
- intName{82, "R_PPC_GOT_TLSGD16_HA"},
- intName{83, "R_PPC_GOT_TLSLD16"},
- intName{84, "R_PPC_GOT_TLSLD16_LO"},
- intName{85, "R_PPC_GOT_TLSLD16_HI"},
- intName{86, "R_PPC_GOT_TLSLD16_HA"},
- intName{87, "R_PPC_GOT_TPREL16"},
- intName{88, "R_PPC_GOT_TPREL16_LO"},
- intName{89, "R_PPC_GOT_TPREL16_HI"},
- intName{90, "R_PPC_GOT_TPREL16_HA"},
-
- intName{101, "R_PPC_EMB_NADDR32"},
- intName{102, "R_PPC_EMB_NADDR16"},
- intName{103, "R_PPC_EMB_NADDR16_LO"},
- intName{104, "R_PPC_EMB_NADDR16_HI"},
- intName{105, "R_PPC_EMB_NADDR16_HA"},
- intName{106, "R_PPC_EMB_SDAI16"},
- intName{107, "R_PPC_EMB_SDA2I16"},
- intName{108, "R_PPC_EMB_SDA2REL"},
- intName{109, "R_PPC_EMB_SDA21"},
- intName{110, "R_PPC_EMB_MRKREF"},
- intName{111, "R_PPC_EMB_RELSEC16"},
- intName{112, "R_PPC_EMB_RELST_LO"},
- intName{113, "R_PPC_EMB_RELST_HI"},
- intName{114, "R_PPC_EMB_RELST_HA"},
- intName{115, "R_PPC_EMB_BIT_FLD"},
- intName{116, "R_PPC_EMB_RELSDA"},
+ {0, "R_PPC_NONE"},
+ {1, "R_PPC_ADDR32"},
+ {2, "R_PPC_ADDR24"},
+ {3, "R_PPC_ADDR16"},
+ {4, "R_PPC_ADDR16_LO"},
+ {5, "R_PPC_ADDR16_HI"},
+ {6, "R_PPC_ADDR16_HA"},
+ {7, "R_PPC_ADDR14"},
+ {8, "R_PPC_ADDR14_BRTAKEN"},
+ {9, "R_PPC_ADDR14_BRNTAKEN"},
+ {10, "R_PPC_REL24"},
+ {11, "R_PPC_REL14"},
+ {12, "R_PPC_REL14_BRTAKEN"},
+ {13, "R_PPC_REL14_BRNTAKEN"},
+ {14, "R_PPC_GOT16"},
+ {15, "R_PPC_GOT16_LO"},
+ {16, "R_PPC_GOT16_HI"},
+ {17, "R_PPC_GOT16_HA"},
+ {18, "R_PPC_PLTREL24"},
+ {19, "R_PPC_COPY"},
+ {20, "R_PPC_GLOB_DAT"},
+ {21, "R_PPC_JMP_SLOT"},
+ {22, "R_PPC_RELATIVE"},
+ {23, "R_PPC_LOCAL24PC"},
+ {24, "R_PPC_UADDR32"},
+ {25, "R_PPC_UADDR16"},
+ {26, "R_PPC_REL32"},
+ {27, "R_PPC_PLT32"},
+ {28, "R_PPC_PLTREL32"},
+ {29, "R_PPC_PLT16_LO"},
+ {30, "R_PPC_PLT16_HI"},
+ {31, "R_PPC_PLT16_HA"},
+ {32, "R_PPC_SDAREL16"},
+ {33, "R_PPC_SECTOFF"},
+ {34, "R_PPC_SECTOFF_LO"},
+ {35, "R_PPC_SECTOFF_HI"},
+ {36, "R_PPC_SECTOFF_HA"},
+
+ {67, "R_PPC_TLS"},
+ {68, "R_PPC_DTPMOD32"},
+ {69, "R_PPC_TPREL16"},
+ {70, "R_PPC_TPREL16_LO"},
+ {71, "R_PPC_TPREL16_HI"},
+ {72, "R_PPC_TPREL16_HA"},
+ {73, "R_PPC_TPREL32"},
+ {74, "R_PPC_DTPREL16"},
+ {75, "R_PPC_DTPREL16_LO"},
+ {76, "R_PPC_DTPREL16_HI"},
+ {77, "R_PPC_DTPREL16_HA"},
+ {78, "R_PPC_DTPREL32"},
+ {79, "R_PPC_GOT_TLSGD16"},
+ {80, "R_PPC_GOT_TLSGD16_LO"},
+ {81, "R_PPC_GOT_TLSGD16_HI"},
+ {82, "R_PPC_GOT_TLSGD16_HA"},
+ {83, "R_PPC_GOT_TLSLD16"},
+ {84, "R_PPC_GOT_TLSLD16_LO"},
+ {85, "R_PPC_GOT_TLSLD16_HI"},
+ {86, "R_PPC_GOT_TLSLD16_HA"},
+ {87, "R_PPC_GOT_TPREL16"},
+ {88, "R_PPC_GOT_TPREL16_LO"},
+ {89, "R_PPC_GOT_TPREL16_HI"},
+ {90, "R_PPC_GOT_TPREL16_HA"},
+
+ {101, "R_PPC_EMB_NADDR32"},
+ {102, "R_PPC_EMB_NADDR16"},
+ {103, "R_PPC_EMB_NADDR16_LO"},
+ {104, "R_PPC_EMB_NADDR16_HI"},
+ {105, "R_PPC_EMB_NADDR16_HA"},
+ {106, "R_PPC_EMB_SDAI16"},
+ {107, "R_PPC_EMB_SDA2I16"},
+ {108, "R_PPC_EMB_SDA2REL"},
+ {109, "R_PPC_EMB_SDA21"},
+ {110, "R_PPC_EMB_MRKREF"},
+ {111, "R_PPC_EMB_RELSEC16"},
+ {112, "R_PPC_EMB_RELST_LO"},
+ {113, "R_PPC_EMB_RELST_HI"},
+ {114, "R_PPC_EMB_RELST_HA"},
+ {115, "R_PPC_EMB_BIT_FLD"},
+ {116, "R_PPC_EMB_RELSDA"},
}
func (i R_PPC) String() string { return stringName(uint32(i), rppcStrings, false) }
@@ -1208,62 +1208,62 @@ const (
)
var rsparcStrings = []intName{
- intName{0, "R_SPARC_NONE"},
- intName{1, "R_SPARC_8"},
- intName{2, "R_SPARC_16"},
- intName{3, "R_SPARC_32"},
- intName{4, "R_SPARC_DISP8"},
- intName{5, "R_SPARC_DISP16"},
- intName{6, "R_SPARC_DISP32"},
- intName{7, "R_SPARC_WDISP30"},
- intName{8, "R_SPARC_WDISP22"},
- intName{9, "R_SPARC_HI22"},
- intName{10, "R_SPARC_22"},
- intName{11, "R_SPARC_13"},
- intName{12, "R_SPARC_LO10"},
- intName{13, "R_SPARC_GOT10"},
- intName{14, "R_SPARC_GOT13"},
- intName{15, "R_SPARC_GOT22"},
- intName{16, "R_SPARC_PC10"},
- intName{17, "R_SPARC_PC22"},
- intName{18, "R_SPARC_WPLT30"},
- intName{19, "R_SPARC_COPY"},
- intName{20, "R_SPARC_GLOB_DAT"},
- intName{21, "R_SPARC_JMP_SLOT"},
- intName{22, "R_SPARC_RELATIVE"},
- intName{23, "R_SPARC_UA32"},
- intName{24, "R_SPARC_PLT32"},
- intName{25, "R_SPARC_HIPLT22"},
- intName{26, "R_SPARC_LOPLT10"},
- intName{27, "R_SPARC_PCPLT32"},
- intName{28, "R_SPARC_PCPLT22"},
- intName{29, "R_SPARC_PCPLT10"},
- intName{30, "R_SPARC_10"},
- intName{31, "R_SPARC_11"},
- intName{32, "R_SPARC_64"},
- intName{33, "R_SPARC_OLO10"},
- intName{34, "R_SPARC_HH22"},
- intName{35, "R_SPARC_HM10"},
- intName{36, "R_SPARC_LM22"},
- intName{37, "R_SPARC_PC_HH22"},
- intName{38, "R_SPARC_PC_HM10"},
- intName{39, "R_SPARC_PC_LM22"},
- intName{40, "R_SPARC_WDISP16"},
- intName{41, "R_SPARC_WDISP19"},
- intName{42, "R_SPARC_GLOB_JMP"},
- intName{43, "R_SPARC_7"},
- intName{44, "R_SPARC_5"},
- intName{45, "R_SPARC_6"},
- intName{46, "R_SPARC_DISP64"},
- intName{47, "R_SPARC_PLT64"},
- intName{48, "R_SPARC_HIX22"},
- intName{49, "R_SPARC_LOX10"},
- intName{50, "R_SPARC_H44"},
- intName{51, "R_SPARC_M44"},
- intName{52, "R_SPARC_L44"},
- intName{53, "R_SPARC_REGISTER"},
- intName{54, "R_SPARC_UA64"},
- intName{55, "R_SPARC_UA16"},
+ {0, "R_SPARC_NONE"},
+ {1, "R_SPARC_8"},
+ {2, "R_SPARC_16"},
+ {3, "R_SPARC_32"},
+ {4, "R_SPARC_DISP8"},
+ {5, "R_SPARC_DISP16"},
+ {6, "R_SPARC_DISP32"},
+ {7, "R_SPARC_WDISP30"},
+ {8, "R_SPARC_WDISP22"},
+ {9, "R_SPARC_HI22"},
+ {10, "R_SPARC_22"},
+ {11, "R_SPARC_13"},
+ {12, "R_SPARC_LO10"},
+ {13, "R_SPARC_GOT10"},
+ {14, "R_SPARC_GOT13"},
+ {15, "R_SPARC_GOT22"},
+ {16, "R_SPARC_PC10"},
+ {17, "R_SPARC_PC22"},
+ {18, "R_SPARC_WPLT30"},
+ {19, "R_SPARC_COPY"},
+ {20, "R_SPARC_GLOB_DAT"},
+ {21, "R_SPARC_JMP_SLOT"},
+ {22, "R_SPARC_RELATIVE"},
+ {23, "R_SPARC_UA32"},
+ {24, "R_SPARC_PLT32"},
+ {25, "R_SPARC_HIPLT22"},
+ {26, "R_SPARC_LOPLT10"},
+ {27, "R_SPARC_PCPLT32"},
+ {28, "R_SPARC_PCPLT22"},
+ {29, "R_SPARC_PCPLT10"},
+ {30, "R_SPARC_10"},
+ {31, "R_SPARC_11"},
+ {32, "R_SPARC_64"},
+ {33, "R_SPARC_OLO10"},
+ {34, "R_SPARC_HH22"},
+ {35, "R_SPARC_HM10"},
+ {36, "R_SPARC_LM22"},
+ {37, "R_SPARC_PC_HH22"},
+ {38, "R_SPARC_PC_HM10"},
+ {39, "R_SPARC_PC_LM22"},
+ {40, "R_SPARC_WDISP16"},
+ {41, "R_SPARC_WDISP19"},
+ {42, "R_SPARC_GLOB_JMP"},
+ {43, "R_SPARC_7"},
+ {44, "R_SPARC_5"},
+ {45, "R_SPARC_6"},
+ {46, "R_SPARC_DISP64"},
+ {47, "R_SPARC_PLT64"},
+ {48, "R_SPARC_HIX22"},
+ {49, "R_SPARC_LOX10"},
+ {50, "R_SPARC_H44"},
+ {51, "R_SPARC_M44"},
+ {52, "R_SPARC_L44"},
+ {53, "R_SPARC_REGISTER"},
+ {54, "R_SPARC_UA64"},
+ {55, "R_SPARC_UA16"},
}
func (i R_SPARC) String() string { return stringName(uint32(i), rsparcStrings, false) }
diff --git a/src/pkg/debug/elf/elf_test.go b/src/pkg/debug/elf/elf_test.go
index 6f827faf00..67b961b5c6 100644
--- a/src/pkg/debug/elf/elf_test.go
+++ b/src/pkg/debug/elf/elf_test.go
@@ -15,28 +15,28 @@ type nameTest struct {
}
var nameTests = []nameTest{
- nameTest{ELFOSABI_LINUX, "ELFOSABI_LINUX"},
- nameTest{ET_EXEC, "ET_EXEC"},
- nameTest{EM_860, "EM_860"},
- nameTest{SHN_LOPROC, "SHN_LOPROC"},
- nameTest{SHT_PROGBITS, "SHT_PROGBITS"},
- nameTest{SHF_MERGE + SHF_TLS, "SHF_MERGE+SHF_TLS"},
- nameTest{PT_LOAD, "PT_LOAD"},
- nameTest{PF_W + PF_R + 0x50, "PF_W+PF_R+0x50"},
- nameTest{DT_SYMBOLIC, "DT_SYMBOLIC"},
- nameTest{DF_BIND_NOW, "DF_BIND_NOW"},
- nameTest{NT_FPREGSET, "NT_FPREGSET"},
- nameTest{STB_GLOBAL, "STB_GLOBAL"},
- nameTest{STT_COMMON, "STT_COMMON"},
- nameTest{STV_HIDDEN, "STV_HIDDEN"},
- nameTest{R_X86_64_PC32, "R_X86_64_PC32"},
- nameTest{R_ALPHA_OP_PUSH, "R_ALPHA_OP_PUSH"},
- nameTest{R_ARM_THM_ABS5, "R_ARM_THM_ABS5"},
- nameTest{R_386_GOT32, "R_386_GOT32"},
- nameTest{R_PPC_GOT16_HI, "R_PPC_GOT16_HI"},
- nameTest{R_SPARC_GOT22, "R_SPARC_GOT22"},
- nameTest{ET_LOOS + 5, "ET_LOOS+5"},
- nameTest{ProgFlag(0x50), "0x50"},
+ {ELFOSABI_LINUX, "ELFOSABI_LINUX"},
+ {ET_EXEC, "ET_EXEC"},
+ {EM_860, "EM_860"},
+ {SHN_LOPROC, "SHN_LOPROC"},
+ {SHT_PROGBITS, "SHT_PROGBITS"},
+ {SHF_MERGE + SHF_TLS, "SHF_MERGE+SHF_TLS"},
+ {PT_LOAD, "PT_LOAD"},
+ {PF_W + PF_R + 0x50, "PF_W+PF_R+0x50"},
+ {DT_SYMBOLIC, "DT_SYMBOLIC"},
+ {DF_BIND_NOW, "DF_BIND_NOW"},
+ {NT_FPREGSET, "NT_FPREGSET"},
+ {STB_GLOBAL, "STB_GLOBAL"},
+ {STT_COMMON, "STT_COMMON"},
+ {STV_HIDDEN, "STV_HIDDEN"},
+ {R_X86_64_PC32, "R_X86_64_PC32"},
+ {R_ALPHA_OP_PUSH, "R_ALPHA_OP_PUSH"},
+ {R_ARM_THM_ABS5, "R_ARM_THM_ABS5"},
+ {R_386_GOT32, "R_386_GOT32"},
+ {R_PPC_GOT16_HI, "R_PPC_GOT16_HI"},
+ {R_SPARC_GOT22, "R_SPARC_GOT22"},
+ {ET_LOOS + 5, "ET_LOOS+5"},
+ {ProgFlag(0x50), "0x50"},
}
func TestNames(t *testing.T) {
diff --git a/src/pkg/debug/elf/file_test.go b/src/pkg/debug/elf/file_test.go
index 49adc4dc76..84068ea12a 100644
--- a/src/pkg/debug/elf/file_test.go
+++ b/src/pkg/debug/elf/file_test.go
@@ -18,83 +18,83 @@ type fileTest struct {
}
var fileTests = []fileTest{
- fileTest{
+ {
"testdata/gcc-386-freebsd-exec",
FileHeader{ELFCLASS32, ELFDATA2LSB, EV_CURRENT, ELFOSABI_FREEBSD, 0, binary.LittleEndian, ET_EXEC, EM_386},
[]SectionHeader{
- SectionHeader{"", SHT_NULL, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
- SectionHeader{".interp", SHT_PROGBITS, SHF_ALLOC, 0x80480d4, 0xd4, 0x15, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".hash", SHT_HASH, SHF_ALLOC, 0x80480ec, 0xec, 0x90, 0x3, 0x0, 0x4, 0x4},
- SectionHeader{".dynsym", SHT_DYNSYM, SHF_ALLOC, 0x804817c, 0x17c, 0x110, 0x4, 0x1, 0x4, 0x10},
- SectionHeader{".dynstr", SHT_STRTAB, SHF_ALLOC, 0x804828c, 0x28c, 0xbb, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".rel.plt", SHT_REL, SHF_ALLOC, 0x8048348, 0x348, 0x20, 0x3, 0x7, 0x4, 0x8},
- SectionHeader{".init", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x8048368, 0x368, 0x11, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".plt", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x804837c, 0x37c, 0x50, 0x0, 0x0, 0x4, 0x4},
- SectionHeader{".text", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x80483cc, 0x3cc, 0x180, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".fini", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x804854c, 0x54c, 0xc, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".rodata", SHT_PROGBITS, SHF_ALLOC, 0x8048558, 0x558, 0xa3, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".data", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80495fc, 0x5fc, 0xc, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".eh_frame", SHT_PROGBITS, SHF_ALLOC, 0x8049608, 0x608, 0x4, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".dynamic", SHT_DYNAMIC, SHF_WRITE + SHF_ALLOC, 0x804960c, 0x60c, 0x98, 0x4, 0x0, 0x4, 0x8},
- SectionHeader{".ctors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496a4, 0x6a4, 0x8, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".dtors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496ac, 0x6ac, 0x8, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".jcr", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496b4, 0x6b4, 0x4, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".got", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496b8, 0x6b8, 0x1c, 0x0, 0x0, 0x4, 0x4},
- SectionHeader{".bss", SHT_NOBITS, SHF_WRITE + SHF_ALLOC, 0x80496d4, 0x6d4, 0x20, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".comment", SHT_PROGBITS, 0x0, 0x0, 0x6d4, 0x12d, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_aranges", SHT_PROGBITS, 0x0, 0x0, 0x801, 0x20, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_pubnames", SHT_PROGBITS, 0x0, 0x0, 0x821, 0x1b, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_info", SHT_PROGBITS, 0x0, 0x0, 0x83c, 0x11d, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_abbrev", SHT_PROGBITS, 0x0, 0x0, 0x959, 0x41, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_line", SHT_PROGBITS, 0x0, 0x0, 0x99a, 0x35, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_frame", SHT_PROGBITS, 0x0, 0x0, 0x9d0, 0x30, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".debug_str", SHT_PROGBITS, 0x0, 0x0, 0xa00, 0xd, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".shstrtab", SHT_STRTAB, 0x0, 0x0, 0xa0d, 0xf8, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".symtab", SHT_SYMTAB, 0x0, 0x0, 0xfb8, 0x4b0, 0x1d, 0x38, 0x4, 0x10},
- SectionHeader{".strtab", SHT_STRTAB, 0x0, 0x0, 0x1468, 0x206, 0x0, 0x0, 0x1, 0x0},
+ {"", SHT_NULL, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
+ {".interp", SHT_PROGBITS, SHF_ALLOC, 0x80480d4, 0xd4, 0x15, 0x0, 0x0, 0x1, 0x0},
+ {".hash", SHT_HASH, SHF_ALLOC, 0x80480ec, 0xec, 0x90, 0x3, 0x0, 0x4, 0x4},
+ {".dynsym", SHT_DYNSYM, SHF_ALLOC, 0x804817c, 0x17c, 0x110, 0x4, 0x1, 0x4, 0x10},
+ {".dynstr", SHT_STRTAB, SHF_ALLOC, 0x804828c, 0x28c, 0xbb, 0x0, 0x0, 0x1, 0x0},
+ {".rel.plt", SHT_REL, SHF_ALLOC, 0x8048348, 0x348, 0x20, 0x3, 0x7, 0x4, 0x8},
+ {".init", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x8048368, 0x368, 0x11, 0x0, 0x0, 0x4, 0x0},
+ {".plt", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x804837c, 0x37c, 0x50, 0x0, 0x0, 0x4, 0x4},
+ {".text", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x80483cc, 0x3cc, 0x180, 0x0, 0x0, 0x4, 0x0},
+ {".fini", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x804854c, 0x54c, 0xc, 0x0, 0x0, 0x4, 0x0},
+ {".rodata", SHT_PROGBITS, SHF_ALLOC, 0x8048558, 0x558, 0xa3, 0x0, 0x0, 0x1, 0x0},
+ {".data", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80495fc, 0x5fc, 0xc, 0x0, 0x0, 0x4, 0x0},
+ {".eh_frame", SHT_PROGBITS, SHF_ALLOC, 0x8049608, 0x608, 0x4, 0x0, 0x0, 0x4, 0x0},
+ {".dynamic", SHT_DYNAMIC, SHF_WRITE + SHF_ALLOC, 0x804960c, 0x60c, 0x98, 0x4, 0x0, 0x4, 0x8},
+ {".ctors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496a4, 0x6a4, 0x8, 0x0, 0x0, 0x4, 0x0},
+ {".dtors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496ac, 0x6ac, 0x8, 0x0, 0x0, 0x4, 0x0},
+ {".jcr", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496b4, 0x6b4, 0x4, 0x0, 0x0, 0x4, 0x0},
+ {".got", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x80496b8, 0x6b8, 0x1c, 0x0, 0x0, 0x4, 0x4},
+ {".bss", SHT_NOBITS, SHF_WRITE + SHF_ALLOC, 0x80496d4, 0x6d4, 0x20, 0x0, 0x0, 0x4, 0x0},
+ {".comment", SHT_PROGBITS, 0x0, 0x0, 0x6d4, 0x12d, 0x0, 0x0, 0x1, 0x0},
+ {".debug_aranges", SHT_PROGBITS, 0x0, 0x0, 0x801, 0x20, 0x0, 0x0, 0x1, 0x0},
+ {".debug_pubnames", SHT_PROGBITS, 0x0, 0x0, 0x821, 0x1b, 0x0, 0x0, 0x1, 0x0},
+ {".debug_info", SHT_PROGBITS, 0x0, 0x0, 0x83c, 0x11d, 0x0, 0x0, 0x1, 0x0},
+ {".debug_abbrev", SHT_PROGBITS, 0x0, 0x0, 0x959, 0x41, 0x0, 0x0, 0x1, 0x0},
+ {".debug_line", SHT_PROGBITS, 0x0, 0x0, 0x99a, 0x35, 0x0, 0x0, 0x1, 0x0},
+ {".debug_frame", SHT_PROGBITS, 0x0, 0x0, 0x9d0, 0x30, 0x0, 0x0, 0x4, 0x0},
+ {".debug_str", SHT_PROGBITS, 0x0, 0x0, 0xa00, 0xd, 0x0, 0x0, 0x1, 0x0},
+ {".shstrtab", SHT_STRTAB, 0x0, 0x0, 0xa0d, 0xf8, 0x0, 0x0, 0x1, 0x0},
+ {".symtab", SHT_SYMTAB, 0x0, 0x0, 0xfb8, 0x4b0, 0x1d, 0x38, 0x4, 0x10},
+ {".strtab", SHT_STRTAB, 0x0, 0x0, 0x1468, 0x206, 0x0, 0x0, 0x1, 0x0},
},
},
- fileTest{
+ {
"testdata/gcc-amd64-linux-exec",
FileHeader{ELFCLASS64, ELFDATA2LSB, EV_CURRENT, ELFOSABI_NONE, 0, binary.LittleEndian, ET_EXEC, EM_X86_64},
[]SectionHeader{
- SectionHeader{"", SHT_NULL, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
- SectionHeader{".interp", SHT_PROGBITS, SHF_ALLOC, 0x400200, 0x200, 0x1c, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".note.ABI-tag", SHT_NOTE, SHF_ALLOC, 0x40021c, 0x21c, 0x20, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".hash", SHT_HASH, SHF_ALLOC, 0x400240, 0x240, 0x24, 0x5, 0x0, 0x8, 0x4},
- SectionHeader{".gnu.hash", SHT_LOOS + 268435446, SHF_ALLOC, 0x400268, 0x268, 0x1c, 0x5, 0x0, 0x8, 0x0},
- SectionHeader{".dynsym", SHT_DYNSYM, SHF_ALLOC, 0x400288, 0x288, 0x60, 0x6, 0x1, 0x8, 0x18},
- SectionHeader{".dynstr", SHT_STRTAB, SHF_ALLOC, 0x4002e8, 0x2e8, 0x3d, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".gnu.version", SHT_HIOS, SHF_ALLOC, 0x400326, 0x326, 0x8, 0x5, 0x0, 0x2, 0x2},
- SectionHeader{".gnu.version_r", SHT_LOOS + 268435454, SHF_ALLOC, 0x400330, 0x330, 0x20, 0x6, 0x1, 0x8, 0x0},
- SectionHeader{".rela.dyn", SHT_RELA, SHF_ALLOC, 0x400350, 0x350, 0x18, 0x5, 0x0, 0x8, 0x18},
- SectionHeader{".rela.plt", SHT_RELA, SHF_ALLOC, 0x400368, 0x368, 0x30, 0x5, 0xc, 0x8, 0x18},
- SectionHeader{".init", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x400398, 0x398, 0x18, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".plt", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x4003b0, 0x3b0, 0x30, 0x0, 0x0, 0x4, 0x10},
- SectionHeader{".text", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x4003e0, 0x3e0, 0x1b4, 0x0, 0x0, 0x10, 0x0},
- SectionHeader{".fini", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x400594, 0x594, 0xe, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".rodata", SHT_PROGBITS, SHF_ALLOC, 0x4005a4, 0x5a4, 0x11, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".eh_frame_hdr", SHT_PROGBITS, SHF_ALLOC, 0x4005b8, 0x5b8, 0x24, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".eh_frame", SHT_PROGBITS, SHF_ALLOC, 0x4005e0, 0x5e0, 0xa4, 0x0, 0x0, 0x8, 0x0},
- SectionHeader{".ctors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600688, 0x688, 0x10, 0x0, 0x0, 0x8, 0x0},
- SectionHeader{".dtors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600698, 0x698, 0x10, 0x0, 0x0, 0x8, 0x0},
- SectionHeader{".jcr", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x6006a8, 0x6a8, 0x8, 0x0, 0x0, 0x8, 0x0},
- SectionHeader{".dynamic", SHT_DYNAMIC, SHF_WRITE + SHF_ALLOC, 0x6006b0, 0x6b0, 0x1a0, 0x6, 0x0, 0x8, 0x10},
- SectionHeader{".got", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600850, 0x850, 0x8, 0x0, 0x0, 0x8, 0x8},
- SectionHeader{".got.plt", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600858, 0x858, 0x28, 0x0, 0x0, 0x8, 0x8},
- SectionHeader{".data", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600880, 0x880, 0x18, 0x0, 0x0, 0x8, 0x0},
- SectionHeader{".bss", SHT_NOBITS, SHF_WRITE + SHF_ALLOC, 0x600898, 0x898, 0x8, 0x0, 0x0, 0x4, 0x0},
- SectionHeader{".comment", SHT_PROGBITS, 0x0, 0x0, 0x898, 0x126, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_aranges", SHT_PROGBITS, 0x0, 0x0, 0x9c0, 0x90, 0x0, 0x0, 0x10, 0x0},
- SectionHeader{".debug_pubnames", SHT_PROGBITS, 0x0, 0x0, 0xa50, 0x25, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_info", SHT_PROGBITS, 0x0, 0x0, 0xa75, 0x1a7, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_abbrev", SHT_PROGBITS, 0x0, 0x0, 0xc1c, 0x6f, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_line", SHT_PROGBITS, 0x0, 0x0, 0xc8b, 0x13f, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".debug_str", SHT_PROGBITS, SHF_MERGE + SHF_STRINGS, 0x0, 0xdca, 0xb1, 0x0, 0x0, 0x1, 0x1},
- SectionHeader{".debug_ranges", SHT_PROGBITS, 0x0, 0x0, 0xe80, 0x90, 0x0, 0x0, 0x10, 0x0},
- SectionHeader{".shstrtab", SHT_STRTAB, 0x0, 0x0, 0xf10, 0x149, 0x0, 0x0, 0x1, 0x0},
- SectionHeader{".symtab", SHT_SYMTAB, 0x0, 0x0, 0x19a0, 0x6f0, 0x24, 0x39, 0x8, 0x18},
- SectionHeader{".strtab", SHT_STRTAB, 0x0, 0x0, 0x2090, 0x1fc, 0x0, 0x0, 0x1, 0x0},
+ {"", SHT_NULL, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
+ {".interp", SHT_PROGBITS, SHF_ALLOC, 0x400200, 0x200, 0x1c, 0x0, 0x0, 0x1, 0x0},
+ {".note.ABI-tag", SHT_NOTE, SHF_ALLOC, 0x40021c, 0x21c, 0x20, 0x0, 0x0, 0x4, 0x0},
+ {".hash", SHT_HASH, SHF_ALLOC, 0x400240, 0x240, 0x24, 0x5, 0x0, 0x8, 0x4},
+ {".gnu.hash", SHT_LOOS + 268435446, SHF_ALLOC, 0x400268, 0x268, 0x1c, 0x5, 0x0, 0x8, 0x0},
+ {".dynsym", SHT_DYNSYM, SHF_ALLOC, 0x400288, 0x288, 0x60, 0x6, 0x1, 0x8, 0x18},
+ {".dynstr", SHT_STRTAB, SHF_ALLOC, 0x4002e8, 0x2e8, 0x3d, 0x0, 0x0, 0x1, 0x0},
+ {".gnu.version", SHT_HIOS, SHF_ALLOC, 0x400326, 0x326, 0x8, 0x5, 0x0, 0x2, 0x2},
+ {".gnu.version_r", SHT_LOOS + 268435454, SHF_ALLOC, 0x400330, 0x330, 0x20, 0x6, 0x1, 0x8, 0x0},
+ {".rela.dyn", SHT_RELA, SHF_ALLOC, 0x400350, 0x350, 0x18, 0x5, 0x0, 0x8, 0x18},
+ {".rela.plt", SHT_RELA, SHF_ALLOC, 0x400368, 0x368, 0x30, 0x5, 0xc, 0x8, 0x18},
+ {".init", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x400398, 0x398, 0x18, 0x0, 0x0, 0x4, 0x0},
+ {".plt", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x4003b0, 0x3b0, 0x30, 0x0, 0x0, 0x4, 0x10},
+ {".text", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x4003e0, 0x3e0, 0x1b4, 0x0, 0x0, 0x10, 0x0},
+ {".fini", SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR, 0x400594, 0x594, 0xe, 0x0, 0x0, 0x4, 0x0},
+ {".rodata", SHT_PROGBITS, SHF_ALLOC, 0x4005a4, 0x5a4, 0x11, 0x0, 0x0, 0x4, 0x0},
+ {".eh_frame_hdr", SHT_PROGBITS, SHF_ALLOC, 0x4005b8, 0x5b8, 0x24, 0x0, 0x0, 0x4, 0x0},
+ {".eh_frame", SHT_PROGBITS, SHF_ALLOC, 0x4005e0, 0x5e0, 0xa4, 0x0, 0x0, 0x8, 0x0},
+ {".ctors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600688, 0x688, 0x10, 0x0, 0x0, 0x8, 0x0},
+ {".dtors", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600698, 0x698, 0x10, 0x0, 0x0, 0x8, 0x0},
+ {".jcr", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x6006a8, 0x6a8, 0x8, 0x0, 0x0, 0x8, 0x0},
+ {".dynamic", SHT_DYNAMIC, SHF_WRITE + SHF_ALLOC, 0x6006b0, 0x6b0, 0x1a0, 0x6, 0x0, 0x8, 0x10},
+ {".got", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600850, 0x850, 0x8, 0x0, 0x0, 0x8, 0x8},
+ {".got.plt", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600858, 0x858, 0x28, 0x0, 0x0, 0x8, 0x8},
+ {".data", SHT_PROGBITS, SHF_WRITE + SHF_ALLOC, 0x600880, 0x880, 0x18, 0x0, 0x0, 0x8, 0x0},
+ {".bss", SHT_NOBITS, SHF_WRITE + SHF_ALLOC, 0x600898, 0x898, 0x8, 0x0, 0x0, 0x4, 0x0},
+ {".comment", SHT_PROGBITS, 0x0, 0x0, 0x898, 0x126, 0x0, 0x0, 0x1, 0x0},
+ {".debug_aranges", SHT_PROGBITS, 0x0, 0x0, 0x9c0, 0x90, 0x0, 0x0, 0x10, 0x0},
+ {".debug_pubnames", SHT_PROGBITS, 0x0, 0x0, 0xa50, 0x25, 0x0, 0x0, 0x1, 0x0},
+ {".debug_info", SHT_PROGBITS, 0x0, 0x0, 0xa75, 0x1a7, 0x0, 0x0, 0x1, 0x0},
+ {".debug_abbrev", SHT_PROGBITS, 0x0, 0x0, 0xc1c, 0x6f, 0x0, 0x0, 0x1, 0x0},
+ {".debug_line", SHT_PROGBITS, 0x0, 0x0, 0xc8b, 0x13f, 0x0, 0x0, 0x1, 0x0},
+ {".debug_str", SHT_PROGBITS, SHF_MERGE + SHF_STRINGS, 0x0, 0xdca, 0xb1, 0x0, 0x0, 0x1, 0x1},
+ {".debug_ranges", SHT_PROGBITS, 0x0, 0x0, 0xe80, 0x90, 0x0, 0x0, 0x10, 0x0},
+ {".shstrtab", SHT_STRTAB, 0x0, 0x0, 0xf10, 0x149, 0x0, 0x0, 0x1, 0x0},
+ {".symtab", SHT_SYMTAB, 0x0, 0x0, 0x19a0, 0x6f0, 0x24, 0x39, 0x8, 0x18},
+ {".strtab", SHT_STRTAB, 0x0, 0x0, 0x2090, 0x1fc, 0x0, 0x0, 0x1, 0x0},
},
},
}
@@ -135,17 +135,17 @@ type relocationTest struct {
}
var relocationTests = []relocationTest{
- relocationTest{
+ {
"testdata/go-relocation-test-gcc441-x86-64.o",
- &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{dwarf.Field{Attr: dwarf.AttrProducer, Val: "GNU C 4.4.1"}, dwarf.Field{Attr: dwarf.AttrLanguage, Val: int64(1)}, dwarf.Field{Attr: dwarf.AttrName, Val: "go-relocation-test.c"}, dwarf.Field{Attr: dwarf.AttrCompDir, Val: "/tmp"}, dwarf.Field{Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, dwarf.Field{Attr: dwarf.AttrHighpc, Val: uint64(0x6)}, dwarf.Field{Attr: dwarf.AttrStmtList, Val: int64(0)}}},
+ &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{{Attr: dwarf.AttrProducer, Val: "GNU C 4.4.1"}, {Attr: dwarf.AttrLanguage, Val: int64(1)}, {Attr: dwarf.AttrName, Val: "go-relocation-test.c"}, {Attr: dwarf.AttrCompDir, Val: "/tmp"}, {Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, {Attr: dwarf.AttrHighpc, Val: uint64(0x6)}, {Attr: dwarf.AttrStmtList, Val: int64(0)}}},
},
- relocationTest{
+ {
"testdata/go-relocation-test-gcc441-x86.o",
- &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{dwarf.Field{Attr: dwarf.AttrProducer, Val: "GNU C 4.4.1"}, dwarf.Field{Attr: dwarf.AttrLanguage, Val: int64(1)}, dwarf.Field{Attr: dwarf.AttrName, Val: "t.c"}, dwarf.Field{Attr: dwarf.AttrCompDir, Val: "/tmp"}, dwarf.Field{Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, dwarf.Field{Attr: dwarf.AttrHighpc, Val: uint64(0x5)}, dwarf.Field{Attr: dwarf.AttrStmtList, Val: int64(0)}}},
+ &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{{Attr: dwarf.AttrProducer, Val: "GNU C 4.4.1"}, {Attr: dwarf.AttrLanguage, Val: int64(1)}, {Attr: dwarf.AttrName, Val: "t.c"}, {Attr: dwarf.AttrCompDir, Val: "/tmp"}, {Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, {Attr: dwarf.AttrHighpc, Val: uint64(0x5)}, {Attr: dwarf.AttrStmtList, Val: int64(0)}}},
},
- relocationTest{
+ {
"testdata/go-relocation-test-gcc424-x86-64.o",
- &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{dwarf.Field{Attr: dwarf.AttrProducer, Val: "GNU C 4.2.4 (Ubuntu 4.2.4-1ubuntu4)"}, dwarf.Field{Attr: dwarf.AttrLanguage, Val: int64(1)}, dwarf.Field{Attr: dwarf.AttrName, Val: "go-relocation-test-gcc424.c"}, dwarf.Field{Attr: dwarf.AttrCompDir, Val: "/tmp"}, dwarf.Field{Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, dwarf.Field{Attr: dwarf.AttrHighpc, Val: uint64(0x6)}, dwarf.Field{Attr: dwarf.AttrStmtList, Val: int64(0)}}},
+ &dwarf.Entry{Offset: 0xb, Tag: dwarf.TagCompileUnit, Children: true, Field: []dwarf.Field{{Attr: dwarf.AttrProducer, Val: "GNU C 4.2.4 (Ubuntu 4.2.4-1ubuntu4)"}, {Attr: dwarf.AttrLanguage, Val: int64(1)}, {Attr: dwarf.AttrName, Val: "go-relocation-test-gcc424.c"}, {Attr: dwarf.AttrCompDir, Val: "/tmp"}, {Attr: dwarf.AttrLowpc, Val: uint64(0x0)}, {Attr: dwarf.AttrHighpc, Val: uint64(0x6)}, {Attr: dwarf.AttrStmtList, Val: int64(0)}}},
},
}
diff --git a/src/pkg/debug/macho/file_test.go b/src/pkg/debug/macho/file_test.go
index d4f3fc19c9..56d8a20be2 100644
--- a/src/pkg/debug/macho/file_test.go
+++ b/src/pkg/debug/macho/file_test.go
@@ -17,7 +17,7 @@ type fileTest struct {
}
var fileTests = []fileTest{
- fileTest{
+ {
"testdata/gcc-386-darwin-exec",
FileHeader{0xfeedface, Cpu386, 0x3, 0x2, 0xc, 0x3c0, 0x85},
[]*SegmentHeader{
@@ -42,7 +42,7 @@ var fileTests = []fileTest{
&SectionHeader{"__jump_table", "__IMPORT", 0x3000, 0xa, 0x2000, 0x6, 0x0, 0x0, 0x4000008},
},
},
- fileTest{
+ {
"testdata/gcc-amd64-darwin-exec",
FileHeader{0xfeedfacf, CpuAmd64, 0x80000003, 0x2, 0xb, 0x568, 0x85},
[]*SegmentHeader{
@@ -69,7 +69,7 @@ var fileTests = []fileTest{
&SectionHeader{"__la_symbol_ptr", "__DATA", 0x100001058, 0x10, 0x1058, 0x2, 0x0, 0x0, 0x7},
},
},
- fileTest{
+ {
"testdata/gcc-amd64-darwin-exec-debug",
FileHeader{0xfeedfacf, CpuAmd64, 0x80000003, 0xa, 0x4, 0x5a0, 0},
[]*SegmentHeader{
diff --git a/src/pkg/debug/macho/macho.go b/src/pkg/debug/macho/macho.go
index 41962d5624..a45d7820c5 100644
--- a/src/pkg/debug/macho/macho.go
+++ b/src/pkg/debug/macho/macho.go
@@ -47,8 +47,8 @@ const (
)
var cpuStrings = []intName{
- intName{uint32(Cpu386), "Cpu386"},
- intName{uint32(CpuAmd64), "CpuAmd64"},
+ {uint32(Cpu386), "Cpu386"},
+ {uint32(CpuAmd64), "CpuAmd64"},
}
func (i Cpu) String() string { return stringName(uint32(i), cpuStrings, false) }
@@ -65,10 +65,10 @@ const (
)
var cmdStrings = []intName{
- intName{uint32(LoadCmdSegment), "LoadCmdSegment"},
- intName{uint32(LoadCmdSegment64), "LoadCmdSegment64"},
- intName{uint32(LoadCmdThread), "LoadCmdThread"},
- intName{uint32(LoadCmdUnixThread), "LoadCmdUnixThread"},
+ {uint32(LoadCmdSegment), "LoadCmdSegment"},
+ {uint32(LoadCmdSegment64), "LoadCmdSegment64"},
+ {uint32(LoadCmdThread), "LoadCmdThread"},
+ {uint32(LoadCmdUnixThread), "LoadCmdUnixThread"},
}
func (i LoadCmd) String() string { return stringName(uint32(i), cmdStrings, false) }
diff --git a/src/pkg/encoding/ascii85/ascii85_test.go b/src/pkg/encoding/ascii85/ascii85_test.go
index d3e9d501a7..fdfeb889f7 100644
--- a/src/pkg/encoding/ascii85/ascii85_test.go
+++ b/src/pkg/encoding/ascii85/ascii85_test.go
@@ -17,7 +17,7 @@ type testpair struct {
var pairs = []testpair{
// Wikipedia example
- testpair{
+ {
"Man is distinguished, not only by his reason, but by this singular passion from " +
"other animals, which is a lust of the mind, that by a perseverance of delight in " +
"the continued and indefatigable generation of knowledge, exceeds the short " +
@@ -138,8 +138,8 @@ func TestDecodeCorrupt(t *testing.T) {
p int
}
examples := []corrupt{
- corrupt{"v", 0},
- corrupt{"!z!!!!!!!!!", 1},
+ {"v", 0},
+ {"!z!!!!!!!!!", 1},
}
for _, e := range examples {
diff --git a/src/pkg/encoding/base64/base64_test.go b/src/pkg/encoding/base64/base64_test.go
index de96b5cc53..de41e704b9 100644
--- a/src/pkg/encoding/base64/base64_test.go
+++ b/src/pkg/encoding/base64/base64_test.go
@@ -17,28 +17,28 @@ type testpair struct {
var pairs = []testpair{
// RFC 3548 examples
- testpair{"\x14\xfb\x9c\x03\xd9\x7e", "FPucA9l+"},
- testpair{"\x14\xfb\x9c\x03\xd9", "FPucA9k="},
- testpair{"\x14\xfb\x9c\x03", "FPucAw=="},
+ {"\x14\xfb\x9c\x03\xd9\x7e", "FPucA9l+"},
+ {"\x14\xfb\x9c\x03\xd9", "FPucA9k="},
+ {"\x14\xfb\x9c\x03", "FPucAw=="},
// RFC 4648 examples
- testpair{"", ""},
- testpair{"f", "Zg=="},
- testpair{"fo", "Zm8="},
- testpair{"foo", "Zm9v"},
- testpair{"foob", "Zm9vYg=="},
- testpair{"fooba", "Zm9vYmE="},
- testpair{"foobar", "Zm9vYmFy"},
+ {"", ""},
+ {"f", "Zg=="},
+ {"fo", "Zm8="},
+ {"foo", "Zm9v"},
+ {"foob", "Zm9vYg=="},
+ {"fooba", "Zm9vYmE="},
+ {"foobar", "Zm9vYmFy"},
// Wikipedia examples
- testpair{"sure.", "c3VyZS4="},
- testpair{"sure", "c3VyZQ=="},
- testpair{"sur", "c3Vy"},
- testpair{"su", "c3U="},
- testpair{"leasure.", "bGVhc3VyZS4="},
- testpair{"easure.", "ZWFzdXJlLg=="},
- testpair{"asure.", "YXN1cmUu"},
- testpair{"sure.", "c3VyZS4="},
+ {"sure.", "c3VyZS4="},
+ {"sure", "c3VyZQ=="},
+ {"sur", "c3Vy"},
+ {"su", "c3U="},
+ {"leasure.", "bGVhc3VyZS4="},
+ {"easure.", "ZWFzdXJlLg=="},
+ {"asure.", "YXN1cmUu"},
+ {"sure.", "c3VyZS4="},
}
var bigtest = testpair{
@@ -142,12 +142,12 @@ func TestDecodeCorrupt(t *testing.T) {
p int
}
examples := []corrupt{
- corrupt{"!!!!", 0},
- corrupt{"x===", 1},
- corrupt{"AA=A", 2},
- corrupt{"AAA=AAAA", 3},
- corrupt{"AAAAA", 4},
- corrupt{"AAAAAA", 4},
+ {"!!!!", 0},
+ {"x===", 1},
+ {"AA=A", 2},
+ {"AAA=AAAA", 3},
+ {"AAAAA", 4},
+ {"AAAAAA", 4},
}
for _, e := range examples {
diff --git a/src/pkg/encoding/git85/git_test.go b/src/pkg/encoding/git85/git_test.go
index 2c6c157433..c76385c354 100644
--- a/src/pkg/encoding/git85/git_test.go
+++ b/src/pkg/encoding/git85/git_test.go
@@ -40,7 +40,7 @@ func TestGitTable(t *testing.T) {
var gitPairs = []testpair{
// Wikipedia example, adapted.
- testpair{
+ {
"Man is distinguished, not only by his reason, but by this singular passion from " +
"other animals, which is a lust of the mind, that by a perseverance of delight in " +
"the continued and indefatigable generation of knowledge, exceeds the short " +
@@ -144,8 +144,8 @@ func TestDecodeCorrupt(t *testing.T) {
p int
}
examples := []corrupt{
- corrupt{"v", 0},
- corrupt{"!z!!!!!!!!!", 0},
+ {"v", 0},
+ {"!z!!!!!!!!!", 0},
}
for _, e := range examples {
diff --git a/src/pkg/encoding/hex/hex_test.go b/src/pkg/encoding/hex/hex_test.go
index b66d1bfbe7..a14c9d4f4f 100644
--- a/src/pkg/encoding/hex/hex_test.go
+++ b/src/pkg/encoding/hex/hex_test.go
@@ -14,26 +14,26 @@ type encodeTest struct {
}
var encodeTests = []encodeTest{
- encodeTest{[]byte{}, []byte{}},
- encodeTest{[]byte{0x01}, []byte{'0', '1'}},
- encodeTest{[]byte{0xff}, []byte{'f', 'f'}},
- encodeTest{[]byte{0xff, 00}, []byte{'f', 'f', '0', '0'}},
- encodeTest{[]byte{0}, []byte{'0', '0'}},
- encodeTest{[]byte{1}, []byte{'0', '1'}},
- encodeTest{[]byte{2}, []byte{'0', '2'}},
- encodeTest{[]byte{3}, []byte{'0', '3'}},
- encodeTest{[]byte{4}, []byte{'0', '4'}},
- encodeTest{[]byte{5}, []byte{'0', '5'}},
- encodeTest{[]byte{6}, []byte{'0', '6'}},
- encodeTest{[]byte{7}, []byte{'0', '7'}},
- encodeTest{[]byte{8}, []byte{'0', '8'}},
- encodeTest{[]byte{9}, []byte{'0', '9'}},
- encodeTest{[]byte{10}, []byte{'0', 'a'}},
- encodeTest{[]byte{11}, []byte{'0', 'b'}},
- encodeTest{[]byte{12}, []byte{'0', 'c'}},
- encodeTest{[]byte{13}, []byte{'0', 'd'}},
- encodeTest{[]byte{14}, []byte{'0', 'e'}},
- encodeTest{[]byte{15}, []byte{'0', 'f'}},
+ {[]byte{}, []byte{}},
+ {[]byte{0x01}, []byte{'0', '1'}},
+ {[]byte{0xff}, []byte{'f', 'f'}},
+ {[]byte{0xff, 00}, []byte{'f', 'f', '0', '0'}},
+ {[]byte{0}, []byte{'0', '0'}},
+ {[]byte{1}, []byte{'0', '1'}},
+ {[]byte{2}, []byte{'0', '2'}},
+ {[]byte{3}, []byte{'0', '3'}},
+ {[]byte{4}, []byte{'0', '4'}},
+ {[]byte{5}, []byte{'0', '5'}},
+ {[]byte{6}, []byte{'0', '6'}},
+ {[]byte{7}, []byte{'0', '7'}},
+ {[]byte{8}, []byte{'0', '8'}},
+ {[]byte{9}, []byte{'0', '9'}},
+ {[]byte{10}, []byte{'0', 'a'}},
+ {[]byte{11}, []byte{'0', 'b'}},
+ {[]byte{12}, []byte{'0', 'c'}},
+ {[]byte{13}, []byte{'0', 'd'}},
+ {[]byte{14}, []byte{'0', 'e'}},
+ {[]byte{15}, []byte{'0', 'f'}},
}
func TestEncode(t *testing.T) {
@@ -55,32 +55,32 @@ type decodeTest struct {
}
var decodeTests = []decodeTest{
- decodeTest{[]byte{}, []byte{}, true},
- decodeTest{[]byte{'0'}, []byte{}, false},
- decodeTest{[]byte{'0', 'g'}, []byte{}, false},
- decodeTest{[]byte{'0', '\x01'}, []byte{}, false},
- decodeTest{[]byte{'0', '0'}, []byte{0}, true},
- decodeTest{[]byte{'0', '1'}, []byte{1}, true},
- decodeTest{[]byte{'0', '2'}, []byte{2}, true},
- decodeTest{[]byte{'0', '3'}, []byte{3}, true},
- decodeTest{[]byte{'0', '4'}, []byte{4}, true},
- decodeTest{[]byte{'0', '5'}, []byte{5}, true},
- decodeTest{[]byte{'0', '6'}, []byte{6}, true},
- decodeTest{[]byte{'0', '7'}, []byte{7}, true},
- decodeTest{[]byte{'0', '8'}, []byte{8}, true},
- decodeTest{[]byte{'0', '9'}, []byte{9}, true},
- decodeTest{[]byte{'0', 'a'}, []byte{10}, true},
- decodeTest{[]byte{'0', 'b'}, []byte{11}, true},
- decodeTest{[]byte{'0', 'c'}, []byte{12}, true},
- decodeTest{[]byte{'0', 'd'}, []byte{13}, true},
- decodeTest{[]byte{'0', 'e'}, []byte{14}, true},
- decodeTest{[]byte{'0', 'f'}, []byte{15}, true},
- decodeTest{[]byte{'0', 'A'}, []byte{10}, true},
- decodeTest{[]byte{'0', 'B'}, []byte{11}, true},
- decodeTest{[]byte{'0', 'C'}, []byte{12}, true},
- decodeTest{[]byte{'0', 'D'}, []byte{13}, true},
- decodeTest{[]byte{'0', 'E'}, []byte{14}, true},
- decodeTest{[]byte{'0', 'F'}, []byte{15}, true},
+ {[]byte{}, []byte{}, true},
+ {[]byte{'0'}, []byte{}, false},
+ {[]byte{'0', 'g'}, []byte{}, false},
+ {[]byte{'0', '\x01'}, []byte{}, false},
+ {[]byte{'0', '0'}, []byte{0}, true},
+ {[]byte{'0', '1'}, []byte{1}, true},
+ {[]byte{'0', '2'}, []byte{2}, true},
+ {[]byte{'0', '3'}, []byte{3}, true},
+ {[]byte{'0', '4'}, []byte{4}, true},
+ {[]byte{'0', '5'}, []byte{5}, true},
+ {[]byte{'0', '6'}, []byte{6}, true},
+ {[]byte{'0', '7'}, []byte{7}, true},
+ {[]byte{'0', '8'}, []byte{8}, true},
+ {[]byte{'0', '9'}, []byte{9}, true},
+ {[]byte{'0', 'a'}, []byte{10}, true},
+ {[]byte{'0', 'b'}, []byte{11}, true},
+ {[]byte{'0', 'c'}, []byte{12}, true},
+ {[]byte{'0', 'd'}, []byte{13}, true},
+ {[]byte{'0', 'e'}, []byte{14}, true},
+ {[]byte{'0', 'f'}, []byte{15}, true},
+ {[]byte{'0', 'A'}, []byte{10}, true},
+ {[]byte{'0', 'B'}, []byte{11}, true},
+ {[]byte{'0', 'C'}, []byte{12}, true},
+ {[]byte{'0', 'D'}, []byte{13}, true},
+ {[]byte{'0', 'E'}, []byte{14}, true},
+ {[]byte{'0', 'F'}, []byte{15}, true},
}
func TestDecode(t *testing.T) {
@@ -105,10 +105,10 @@ type encodeStringTest struct {
}
var encodeStringTests = []encodeStringTest{
- encodeStringTest{[]byte{}, ""},
- encodeStringTest{[]byte{0}, "00"},
- encodeStringTest{[]byte{0, 1}, "0001"},
- encodeStringTest{[]byte{0, 1, 255}, "0001ff"},
+ {[]byte{}, ""},
+ {[]byte{0}, "00"},
+ {[]byte{0, 1}, "0001"},
+ {[]byte{0, 1, 255}, "0001ff"},
}
func TestEncodeToString(t *testing.T) {
@@ -127,13 +127,13 @@ type decodeStringTest struct {
}
var decodeStringTests = []decodeStringTest{
- decodeStringTest{"", []byte{}, true},
- decodeStringTest{"0", []byte{}, false},
- decodeStringTest{"00", []byte{0}, true},
- decodeStringTest{"0\x01", []byte{}, false},
- decodeStringTest{"0g", []byte{}, false},
- decodeStringTest{"00ff00", []byte{0, 255, 0}, true},
- decodeStringTest{"0000ff", []byte{0, 0, 255}, true},
+ {"", []byte{}, true},
+ {"0", []byte{}, false},
+ {"00", []byte{0}, true},
+ {"0\x01", []byte{}, false},
+ {"0g", []byte{}, false},
+ {"00ff00", []byte{0, 255, 0}, true},
+ {"0000ff", []byte{0, 0, 255}, true},
}
func TestDecodeString(t *testing.T) {
diff --git a/src/pkg/encoding/pem/pem_test.go b/src/pkg/encoding/pem/pem_test.go
index 42bd573d70..11efe55448 100644
--- a/src/pkg/encoding/pem/pem_test.go
+++ b/src/pkg/encoding/pem/pem_test.go
@@ -15,14 +15,14 @@ type GetLineTest struct {
}
var getLineTests = []GetLineTest{
- GetLineTest{"abc", "abc", ""},
- GetLineTest{"abc\r", "abc\r", ""},
- GetLineTest{"abc\n", "abc", ""},
- GetLineTest{"abc\r\n", "abc", ""},
- GetLineTest{"abc\nd", "abc", "d"},
- GetLineTest{"abc\r\nd", "abc", "d"},
- GetLineTest{"\nabc", "", "abc"},
- GetLineTest{"\r\nabc", "", "abc"},
+ {"abc", "abc", ""},
+ {"abc\r", "abc\r", ""},
+ {"abc\n", "abc", ""},
+ {"abc\r\n", "abc", ""},
+ {"abc\nd", "abc", "d"},
+ {"abc\r\nd", "abc", "d"},
+ {"\nabc", "", "abc"},
+ {"\r\nabc", "", "abc"},
}
func TestGetLine(t *testing.T) {
@@ -63,12 +63,12 @@ type lineBreakerTest struct {
const sixtyFourCharString = "0123456789012345678901234567890123456789012345678901234567890123"
var lineBreakerTests = []lineBreakerTest{
- lineBreakerTest{"", ""},
- lineBreakerTest{"a", "a\n"},
- lineBreakerTest{"ab", "ab\n"},
- lineBreakerTest{sixtyFourCharString, sixtyFourCharString + "\n"},
- lineBreakerTest{sixtyFourCharString + "X", sixtyFourCharString + "\nX\n"},
- lineBreakerTest{sixtyFourCharString + sixtyFourCharString, sixtyFourCharString + "\n" + sixtyFourCharString + "\n"},
+ {"", ""},
+ {"a", "a\n"},
+ {"ab", "ab\n"},
+ {sixtyFourCharString, sixtyFourCharString + "\n"},
+ {sixtyFourCharString + "X", sixtyFourCharString + "\nX\n"},
+ {sixtyFourCharString + sixtyFourCharString, sixtyFourCharString + "\n" + sixtyFourCharString + "\n"},
}
func TestLineBreaker(t *testing.T) {
diff --git a/src/pkg/exp/4s/data.go b/src/pkg/exp/4s/data.go
index 7ac27d81d1..9e2a045fe7 100644
--- a/src/pkg/exp/4s/data.go
+++ b/src/pkg/exp/4s/data.go
@@ -13,130 +13,130 @@ package main
import . "image"
var pieces4 = []Piece{
- Piece{0, 0, Point{4, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{1, 0, Point{1, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
- Piece{2, 0, Point{4, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 0, Point{1, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 3, Point{2, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{0, -1}, Point{-1, 0}}, nil, nil},
- Piece{1, 3, Point{2, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{0, -1}, Point{-1, 0}}, nil, nil},
- Piece{2, 3, Point{2, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{0, -1}, Point{-1, 0}}, nil, nil},
- Piece{3, 3, Point{2, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{0, -1}, Point{-1, 0}}, nil, nil},
-
- Piece{0, 1, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{1, 1, Point{2, 3}, []Point{Point{1, 0}, Point{0, 1}, Point{0, 1}, Point{-1, 0}}, nil, nil},
- Piece{2, 1, Point{3, 2}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 1, Point{2, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{-1, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 2, Point{3, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{0, -1}}, nil, nil},
- Piece{1, 2, Point{2, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{2, 2, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{-2, 1}}, nil, nil},
- Piece{3, 2, Point{2, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 4, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{1, 4, Point{2, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 4, Point{3, 2}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 4, Point{2, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{1, -1}}, nil, nil},
-
- Piece{0, 5, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{1, 5, Point{2, 3}, []Point{Point{1, 0}, Point{0, 1}, Point{-1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 5, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{3, 5, Point{2, 3}, []Point{Point{1, 0}, Point{0, 1}, Point{-1, 0}, Point{0, 1}}, nil, nil},
-
- Piece{0, 6, Point{3, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{0, -1}, Point{1, 0}}, nil, nil},
- Piece{1, 6, Point{2, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 6, Point{3, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{0, -1}, Point{1, 0}}, nil, nil},
- Piece{3, 6, Point{2, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
+ {0, 0, Point{4, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {1, 0, Point{1, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil},
+ {2, 0, Point{4, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 0, Point{1, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil},
+
+ {0, 3, Point{2, 2}, []Point{{0, 1}, {1, 0}, {0, -1}, {-1, 0}}, nil, nil},
+ {1, 3, Point{2, 2}, []Point{{0, 1}, {1, 0}, {0, -1}, {-1, 0}}, nil, nil},
+ {2, 3, Point{2, 2}, []Point{{0, 1}, {1, 0}, {0, -1}, {-1, 0}}, nil, nil},
+ {3, 3, Point{2, 2}, []Point{{0, 1}, {1, 0}, {0, -1}, {-1, 0}}, nil, nil},
+
+ {0, 1, Point{3, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {0, 1}}, nil, nil},
+ {1, 1, Point{2, 3}, []Point{{1, 0}, {0, 1}, {0, 1}, {-1, 0}}, nil, nil},
+ {2, 1, Point{3, 2}, []Point{{0, 0}, {0, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 1, Point{2, 3}, []Point{{0, 0}, {1, 0}, {-1, 1}, {0, 1}}, nil, nil},
+
+ {0, 2, Point{3, 2}, []Point{{0, 1}, {1, 0}, {1, 0}, {0, -1}}, nil, nil},
+ {1, 2, Point{2, 3}, []Point{{0, 0}, {0, 1}, {0, 1}, {1, 0}}, nil, nil},
+ {2, 2, Point{3, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {-2, 1}}, nil, nil},
+ {3, 2, Point{2, 3}, []Point{{0, 0}, {1, 0}, {0, 1}, {0, 1}}, nil, nil},
+
+ {0, 4, Point{3, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+ {1, 4, Point{2, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 4, Point{3, 2}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 4, Point{2, 3}, []Point{{0, 0}, {0, 1}, {0, 1}, {1, -1}}, nil, nil},
+
+ {0, 5, Point{3, 2}, []Point{{0, 0}, {1, 0}, {0, 1}, {1, 0}}, nil, nil},
+ {1, 5, Point{2, 3}, []Point{{1, 0}, {0, 1}, {-1, 0}, {0, 1}}, nil, nil},
+ {2, 5, Point{3, 2}, []Point{{0, 0}, {1, 0}, {0, 1}, {1, 0}}, nil, nil},
+ {3, 5, Point{2, 3}, []Point{{1, 0}, {0, 1}, {-1, 0}, {0, 1}}, nil, nil},
+
+ {0, 6, Point{3, 2}, []Point{{0, 1}, {1, 0}, {0, -1}, {1, 0}}, nil, nil},
+ {1, 6, Point{2, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 6, Point{3, 2}, []Point{{0, 1}, {1, 0}, {0, -1}, {1, 0}}, nil, nil},
+ {3, 6, Point{2, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {0, 1}}, nil, nil},
}
var pieces5 = []Piece{
- Piece{0, 1, Point{5, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{1, 1, Point{1, 5}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
- Piece{2, 1, Point{5, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 1, Point{1, 5}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 0, Point{4, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{1, 0, Point{2, 4}, []Point{Point{1, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}, Point{-1, 0}}, nil, nil},
- Piece{2, 0, Point{4, 2}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 0, Point{2, 4}, []Point{Point{0, 0}, Point{1, 0}, Point{-1, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 2, Point{4, 2}, []Point{Point{0, 0}, Point{0, 1}, Point{1, -1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{1, 2, Point{2, 4}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
- Piece{2, 2, Point{4, 2}, []Point{Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{0, -1}}, nil, nil},
- Piece{3, 2, Point{2, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}, Point{1, 0}}, nil, nil},
-
- Piece{0, 7, Point{3, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{0, 1}, Point{0, 1}}, nil, nil},
- Piece{1, 7, Point{3, 3}, []Point{Point{0, 2}, Point{1, 0}, Point{1, 0}, Point{0, -1}, Point{0, -1}}, nil, nil},
- Piece{2, 7, Point{3, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 7, Point{3, 3}, []Point{Point{0, 2}, Point{0, -1}, Point{0, -1}, Point{1, 0}, Point{1, 0}}, nil, nil},
-
- Piece{0, 3, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{-2, 1}, Point{1, 0}}, nil, nil},
- Piece{1, 3, Point{2, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 3, Point{3, 2}, []Point{Point{1, 0}, Point{1, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 3, Point{2, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{-1, 1}, Point{1, 0}}, nil, nil},
-
- Piece{0, 4, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{-1, 1}, Point{1, 0}}, nil, nil},
- Piece{1, 4, Point{2, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{-1, 1}, Point{1, 0}}, nil, nil},
- Piece{2, 4, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 4, Point{2, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{-1, 1}}, nil, nil},
-
- Piece{0, 7, Point{3, 2}, []Point{Point{0, 0}, Point{2, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{1, 7, Point{2, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{-1, 1}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{2, 7, Point{3, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{-2, 1}, Point{2, 0}}, nil, nil},
- Piece{3, 7, Point{2, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{-1, 1}, Point{1, 0}}, nil, nil},
-
- Piece{0, 5, Point{3, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{1, 5, Point{3, 3}, []Point{Point{2, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{2, 5, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{3, 5, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{-2, 1}}, nil, nil},
-
- Piece{0, 6, Point{3, 3}, []Point{Point{1, 0}, Point{1, 0}, Point{-2, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{1, 6, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 6, Point{3, 3}, []Point{Point{1, 0}, Point{0, 1}, Point{1, 0}, Point{-2, 1}, Point{1, 0}}, nil, nil},
- Piece{3, 6, Point{3, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
-
- Piece{0, 0, Point{4, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{-2, 1}}, nil, nil},
- Piece{1, 0, Point{2, 4}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{0, 1}, Point{0, 1}}, nil, nil},
- Piece{2, 0, Point{4, 2}, []Point{Point{2, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 0, Point{2, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{1, 0}, Point{-1, 1}}, nil, nil},
-
- Piece{0, 2, Point{4, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{1, 2, Point{2, 4}, []Point{Point{1, 0}, Point{0, 1}, Point{-1, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 2, Point{4, 2}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 2, Point{2, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{-1, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 1, Point{3, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{1, 1, Point{3, 3}, []Point{Point{2, 0}, Point{-1, 1}, Point{1, 0}, Point{-2, 1}, Point{1, 0}}, nil, nil},
- Piece{2, 1, Point{3, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{3, 1, Point{3, 3}, []Point{Point{1, 0}, Point{1, 0}, Point{-2, 1}, Point{1, 0}, Point{-1, 1}}, nil, nil},
-
- Piece{0, 3, Point{3, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{-1, 1}, Point{0, 1}}, nil, nil},
- Piece{1, 3, Point{3, 3}, []Point{Point{2, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 3, Point{3, 3}, []Point{Point{1, 0}, Point{0, 1}, Point{-1, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{3, 3, Point{3, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{-2, 1}}, nil, nil},
-
- Piece{0, 4, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{1, 4, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{2, 4, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
- Piece{3, 4, Point{3, 3}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{1, 0}, Point{-1, 1}}, nil, nil},
-
- Piece{0, 8, Point{4, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{1, 8, Point{2, 4}, []Point{Point{1, 0}, Point{-1, 1}, Point{1, 0}, Point{-1, 1}, Point{0, 1}}, nil, nil},
- Piece{2, 8, Point{4, 2}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{3, 8, Point{2, 4}, []Point{Point{1, 0}, Point{0, 1}, Point{-1, 1}, Point{1, 0}, Point{-1, 1}}, nil, nil},
-
- Piece{0, 9, Point{4, 2}, []Point{Point{2, 0}, Point{1, 0}, Point{-3, 1}, Point{1, 0}, Point{1, 0}}, nil, nil},
- Piece{1, 9, Point{2, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{2, 9, Point{4, 2}, []Point{Point{1, 0}, Point{1, 0}, Point{1, 0}, Point{-3, 1}, Point{1, 0}}, nil, nil},
- Piece{3, 9, Point{2, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{0, 1}, Point{0, 1}}, nil, nil},
-
- Piece{0, 5, Point{3, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{1, 5, Point{3, 3}, []Point{Point{1, 0}, Point{1, 0}, Point{-1, 1}, Point{-1, 1}, Point{1, 0}}, nil, nil},
- Piece{2, 5, Point{3, 3}, []Point{Point{0, 0}, Point{0, 1}, Point{1, 0}, Point{1, 0}, Point{0, 1}}, nil, nil},
- Piece{3, 5, Point{3, 3}, []Point{Point{1, 0}, Point{1, 0}, Point{-1, 1}, Point{-1, 1}, Point{1, 0}}, nil, nil},
-
- Piece{0, 6, Point{3, 3}, []Point{Point{2, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}, Point{-2, 1}}, nil, nil},
- Piece{1, 6, Point{3, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{0, 1}, Point{1, 0}}, nil, nil},
- Piece{2, 6, Point{3, 3}, []Point{Point{2, 0}, Point{-2, 1}, Point{1, 0}, Point{1, 0}, Point{-2, 1}}, nil, nil},
- Piece{3, 6, Point{3, 3}, []Point{Point{0, 0}, Point{1, 0}, Point{0, 1}, Point{0, 1}, Point{1, 0}}, nil, nil},
+ {0, 1, Point{5, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {1, 1, Point{1, 5}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}, {0, 1}}, nil, nil},
+ {2, 1, Point{5, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 1, Point{1, 5}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}, {0, 1}}, nil, nil},
+
+ {0, 0, Point{4, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}, {0, 1}}, nil, nil},
+ {1, 0, Point{2, 4}, []Point{{1, 0}, {0, 1}, {0, 1}, {0, 1}, {-1, 0}}, nil, nil},
+ {2, 0, Point{4, 2}, []Point{{0, 0}, {0, 1}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 0, Point{2, 4}, []Point{{0, 0}, {1, 0}, {-1, 1}, {0, 1}, {0, 1}}, nil, nil},
+
+ {0, 2, Point{4, 2}, []Point{{0, 0}, {0, 1}, {1, -1}, {1, 0}, {1, 0}}, nil, nil},
+ {1, 2, Point{2, 4}, []Point{{0, 0}, {1, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil},
+ {2, 2, Point{4, 2}, []Point{{0, 1}, {1, 0}, {1, 0}, {1, 0}, {0, -1}}, nil, nil},
+ {3, 2, Point{2, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}, {1, 0}}, nil, nil},
+
+ {0, 7, Point{3, 3}, []Point{{0, 0}, {1, 0}, {1, 0}, {0, 1}, {0, 1}}, nil, nil},
+ {1, 7, Point{3, 3}, []Point{{0, 2}, {1, 0}, {1, 0}, {0, -1}, {0, -1}}, nil, nil},
+ {2, 7, Point{3, 3}, []Point{{0, 0}, {0, 1}, {0, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 7, Point{3, 3}, []Point{{0, 2}, {0, -1}, {0, -1}, {1, 0}, {1, 0}}, nil, nil},
+
+ {0, 3, Point{3, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {-2, 1}, {1, 0}}, nil, nil},
+ {1, 3, Point{2, 3}, []Point{{0, 0}, {1, 0}, {-1, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 3, Point{3, 2}, []Point{{1, 0}, {1, 0}, {-2, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 3, Point{2, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {-1, 1}, {1, 0}}, nil, nil},
+
+ {0, 4, Point{3, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {-1, 1}, {1, 0}}, nil, nil},
+ {1, 4, Point{2, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {-1, 1}, {1, 0}}, nil, nil},
+ {2, 4, Point{3, 2}, []Point{{0, 0}, {1, 0}, {-1, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 4, Point{2, 3}, []Point{{0, 0}, {1, 0}, {-1, 1}, {1, 0}, {-1, 1}}, nil, nil},
+
+ {0, 7, Point{3, 2}, []Point{{0, 0}, {2, 0}, {-2, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {1, 7, Point{2, 3}, []Point{{0, 0}, {1, 0}, {-1, 1}, {0, 1}, {1, 0}}, nil, nil},
+ {2, 7, Point{3, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {-2, 1}, {2, 0}}, nil, nil},
+ {3, 7, Point{2, 3}, []Point{{0, 0}, {1, 0}, {0, 1}, {-1, 1}, {1, 0}}, nil, nil},
+
+ {0, 5, Point{3, 3}, []Point{{0, 0}, {1, 0}, {0, 1}, {1, 0}, {-1, 1}}, nil, nil},
+ {1, 5, Point{3, 3}, []Point{{2, 0}, {-2, 1}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+ {2, 5, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {0, 1}, {1, 0}}, nil, nil},
+ {3, 5, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {-2, 1}}, nil, nil},
+
+ {0, 6, Point{3, 3}, []Point{{1, 0}, {1, 0}, {-2, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {1, 6, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 6, Point{3, 3}, []Point{{1, 0}, {0, 1}, {1, 0}, {-2, 1}, {1, 0}}, nil, nil},
+ {3, 6, Point{3, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+
+ {0, 0, Point{4, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}, {-2, 1}}, nil, nil},
+ {1, 0, Point{2, 4}, []Point{{1, 0}, {-1, 1}, {1, 0}, {0, 1}, {0, 1}}, nil, nil},
+ {2, 0, Point{4, 2}, []Point{{2, 0}, {-2, 1}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 0, Point{2, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {1, 0}, {-1, 1}}, nil, nil},
+
+ {0, 2, Point{4, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+ {1, 2, Point{2, 4}, []Point{{1, 0}, {0, 1}, {-1, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 2, Point{4, 2}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 2, Point{2, 4}, []Point{{0, 0}, {0, 1}, {1, 0}, {-1, 1}, {0, 1}}, nil, nil},
+
+ {0, 1, Point{3, 3}, []Point{{0, 0}, {1, 0}, {0, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {1, 1, Point{3, 3}, []Point{{2, 0}, {-1, 1}, {1, 0}, {-2, 1}, {1, 0}}, nil, nil},
+ {2, 1, Point{3, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {0, 1}, {1, 0}}, nil, nil},
+ {3, 1, Point{3, 3}, []Point{{1, 0}, {1, 0}, {-2, 1}, {1, 0}, {-1, 1}}, nil, nil},
+
+ {0, 3, Point{3, 3}, []Point{{0, 0}, {1, 0}, {1, 0}, {-1, 1}, {0, 1}}, nil, nil},
+ {1, 3, Point{3, 3}, []Point{{2, 0}, {-2, 1}, {1, 0}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 3, Point{3, 3}, []Point{{1, 0}, {0, 1}, {-1, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {3, 3, Point{3, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {1, 0}, {-2, 1}}, nil, nil},
+
+ {0, 4, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+ {1, 4, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+ {2, 4, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+ {3, 4, Point{3, 3}, []Point{{1, 0}, {-1, 1}, {1, 0}, {1, 0}, {-1, 1}}, nil, nil},
+
+ {0, 8, Point{4, 2}, []Point{{0, 0}, {1, 0}, {0, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {1, 8, Point{2, 4}, []Point{{1, 0}, {-1, 1}, {1, 0}, {-1, 1}, {0, 1}}, nil, nil},
+ {2, 8, Point{4, 2}, []Point{{0, 0}, {1, 0}, {1, 0}, {0, 1}, {1, 0}}, nil, nil},
+ {3, 8, Point{2, 4}, []Point{{1, 0}, {0, 1}, {-1, 1}, {1, 0}, {-1, 1}}, nil, nil},
+
+ {0, 9, Point{4, 2}, []Point{{2, 0}, {1, 0}, {-3, 1}, {1, 0}, {1, 0}}, nil, nil},
+ {1, 9, Point{2, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {1, 0}, {0, 1}}, nil, nil},
+ {2, 9, Point{4, 2}, []Point{{1, 0}, {1, 0}, {1, 0}, {-3, 1}, {1, 0}}, nil, nil},
+ {3, 9, Point{2, 4}, []Point{{0, 0}, {0, 1}, {1, 0}, {0, 1}, {0, 1}}, nil, nil},
+
+ {0, 5, Point{3, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {1, 0}, {0, 1}}, nil, nil},
+ {1, 5, Point{3, 3}, []Point{{1, 0}, {1, 0}, {-1, 1}, {-1, 1}, {1, 0}}, nil, nil},
+ {2, 5, Point{3, 3}, []Point{{0, 0}, {0, 1}, {1, 0}, {1, 0}, {0, 1}}, nil, nil},
+ {3, 5, Point{3, 3}, []Point{{1, 0}, {1, 0}, {-1, 1}, {-1, 1}, {1, 0}}, nil, nil},
+
+ {0, 6, Point{3, 3}, []Point{{2, 0}, {-2, 1}, {1, 0}, {1, 0}, {-2, 1}}, nil, nil},
+ {1, 6, Point{3, 3}, []Point{{0, 0}, {1, 0}, {0, 1}, {0, 1}, {1, 0}}, nil, nil},
+ {2, 6, Point{3, 3}, []Point{{2, 0}, {-2, 1}, {1, 0}, {1, 0}, {-2, 1}}, nil, nil},
+ {3, 6, Point{3, 3}, []Point{{0, 0}, {1, 0}, {0, 1}, {0, 1}, {1, 0}}, nil, nil},
}
diff --git a/src/pkg/exp/4s/xs.go b/src/pkg/exp/4s/xs.go
index 0b4b29de37..c6806c02d2 100644
--- a/src/pkg/exp/4s/xs.go
+++ b/src/pkg/exp/4s/xs.go
@@ -92,52 +92,52 @@ type Piece struct {
}
var txbits = [NCOL][32]byte{
- [32]byte{0xDD, 0xDD, 0xFF, 0xFF, 0x77, 0x77, 0xFF, 0xFF,
+ {0xDD, 0xDD, 0xFF, 0xFF, 0x77, 0x77, 0xFF, 0xFF,
0xDD, 0xDD, 0xFF, 0xFF, 0x77, 0x77, 0xFF, 0xFF,
0xDD, 0xDD, 0xFF, 0xFF, 0x77, 0x77, 0xFF, 0xFF,
0xDD, 0xDD, 0xFF, 0xFF, 0x77, 0x77, 0xFF, 0xFF,
},
- [32]byte{0xDD, 0xDD, 0x77, 0x77, 0xDD, 0xDD, 0x77, 0x77,
+ {0xDD, 0xDD, 0x77, 0x77, 0xDD, 0xDD, 0x77, 0x77,
0xDD, 0xDD, 0x77, 0x77, 0xDD, 0xDD, 0x77, 0x77,
0xDD, 0xDD, 0x77, 0x77, 0xDD, 0xDD, 0x77, 0x77,
0xDD, 0xDD, 0x77, 0x77, 0xDD, 0xDD, 0x77, 0x77,
},
- [32]byte{0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
+ {0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
},
- [32]byte{0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
+ {0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
0xAA, 0xAA, 0x55, 0x55, 0xAA, 0xAA, 0x55, 0x55,
},
- [32]byte{0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
+ {0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
},
- [32]byte{0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
+ {0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
},
- [32]byte{0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
+ {0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
},
- [32]byte{0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
+ {0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
},
- [32]byte{0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
},
- [32]byte{0xCC, 0xCC, 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33,
+ {0xCC, 0xCC, 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33,
0xCC, 0xCC, 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33,
0xCC, 0xCC, 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33,
0xCC, 0xCC, 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33,
diff --git a/src/pkg/exp/draw/draw_test.go b/src/pkg/exp/draw/draw_test.go
index fccc8c2c48..90c9e823d3 100644
--- a/src/pkg/exp/draw/draw_test.go
+++ b/src/pkg/exp/draw/draw_test.go
@@ -73,35 +73,35 @@ type drawTest struct {
var drawTests = []drawTest{
// Uniform mask (0% opaque).
- drawTest{"nop", vgradGreen(255), fillAlpha(0), Over, image.RGBAColor{136, 0, 0, 255}},
- drawTest{"clear", vgradGreen(255), fillAlpha(0), Src, image.RGBAColor{0, 0, 0, 0}},
+ {"nop", vgradGreen(255), fillAlpha(0), Over, image.RGBAColor{136, 0, 0, 255}},
+ {"clear", vgradGreen(255), fillAlpha(0), Src, image.RGBAColor{0, 0, 0, 0}},
// Uniform mask (100%, 75%, nil) and uniform source.
// At (x, y) == (8, 8):
// The destination pixel is {136, 0, 0, 255}.
// The source pixel is {0, 0, 90, 90}.
- drawTest{"fill", fillBlue(90), fillAlpha(255), Over, image.RGBAColor{88, 0, 90, 255}},
- drawTest{"fillSrc", fillBlue(90), fillAlpha(255), Src, image.RGBAColor{0, 0, 90, 90}},
- drawTest{"fillAlpha", fillBlue(90), fillAlpha(192), Over, image.RGBAColor{100, 0, 68, 255}},
- drawTest{"fillAlphaSrc", fillBlue(90), fillAlpha(192), Src, image.RGBAColor{0, 0, 68, 68}},
- drawTest{"fillNil", fillBlue(90), nil, Over, image.RGBAColor{88, 0, 90, 255}},
- drawTest{"fillNilSrc", fillBlue(90), nil, Src, image.RGBAColor{0, 0, 90, 90}},
+ {"fill", fillBlue(90), fillAlpha(255), Over, image.RGBAColor{88, 0, 90, 255}},
+ {"fillSrc", fillBlue(90), fillAlpha(255), Src, image.RGBAColor{0, 0, 90, 90}},
+ {"fillAlpha", fillBlue(90), fillAlpha(192), Over, image.RGBAColor{100, 0, 68, 255}},
+ {"fillAlphaSrc", fillBlue(90), fillAlpha(192), Src, image.RGBAColor{0, 0, 68, 68}},
+ {"fillNil", fillBlue(90), nil, Over, image.RGBAColor{88, 0, 90, 255}},
+ {"fillNilSrc", fillBlue(90), nil, Src, image.RGBAColor{0, 0, 90, 90}},
// Uniform mask (100%, 75%, nil) and variable source.
// At (x, y) == (8, 8):
// The destination pixel is {136, 0, 0, 255}.
// The source pixel is {0, 48, 0, 90}.
- drawTest{"copy", vgradGreen(90), fillAlpha(255), Over, image.RGBAColor{88, 48, 0, 255}},
- drawTest{"copySrc", vgradGreen(90), fillAlpha(255), Src, image.RGBAColor{0, 48, 0, 90}},
- drawTest{"copyAlpha", vgradGreen(90), fillAlpha(192), Over, image.RGBAColor{100, 36, 0, 255}},
- drawTest{"copyAlphaSrc", vgradGreen(90), fillAlpha(192), Src, image.RGBAColor{0, 36, 0, 68}},
- drawTest{"copyNil", vgradGreen(90), nil, Over, image.RGBAColor{88, 48, 0, 255}},
- drawTest{"copyNilSrc", vgradGreen(90), nil, Src, image.RGBAColor{0, 48, 0, 90}},
+ {"copy", vgradGreen(90), fillAlpha(255), Over, image.RGBAColor{88, 48, 0, 255}},
+ {"copySrc", vgradGreen(90), fillAlpha(255), Src, image.RGBAColor{0, 48, 0, 90}},
+ {"copyAlpha", vgradGreen(90), fillAlpha(192), Over, image.RGBAColor{100, 36, 0, 255}},
+ {"copyAlphaSrc", vgradGreen(90), fillAlpha(192), Src, image.RGBAColor{0, 36, 0, 68}},
+ {"copyNil", vgradGreen(90), nil, Over, image.RGBAColor{88, 48, 0, 255}},
+ {"copyNilSrc", vgradGreen(90), nil, Src, image.RGBAColor{0, 48, 0, 90}},
// Variable mask and variable source.
// At (x, y) == (8, 8):
// The destination pixel is {136, 0, 0, 255}.
// The source pixel is {0, 0, 255, 255}.
// The mask pixel's alpha is 102, or 40%.
- drawTest{"generic", fillBlue(255), vgradAlpha(192), Over, image.RGBAColor{81, 0, 102, 255}},
- drawTest{"genericSrc", fillBlue(255), vgradAlpha(192), Src, image.RGBAColor{0, 0, 102, 102}},
+ {"generic", fillBlue(255), vgradAlpha(192), Over, image.RGBAColor{81, 0, 102, 255}},
+ {"genericSrc", fillBlue(255), vgradAlpha(192), Src, image.RGBAColor{0, 0, 102, 102}},
}
func makeGolden(dst, src, mask image.Image, op Op) image.Image {
diff --git a/src/pkg/exp/eval/eval_test.go b/src/pkg/exp/eval/eval_test.go
index 6900a41b35..4de4fb2b98 100644
--- a/src/pkg/exp/eval/eval_test.go
+++ b/src/pkg/exp/eval/eval_test.go
@@ -102,40 +102,40 @@ func match(t *testing.T, err os.Error, pat string) bool {
*/
// Expression compile error
-func CErr(expr string, cerr string) test { return test([]job{job{code: expr, cerr: cerr}}) }
+func CErr(expr string, cerr string) test { return test([]job{{code: expr, cerr: cerr}}) }
// Expression runtime error
-func RErr(expr string, rterr string) test { return test([]job{job{code: expr, rterr: rterr}}) }
+func RErr(expr string, rterr string) test { return test([]job{{code: expr, rterr: rterr}}) }
// Expression value
func Val(expr string, val interface{}) test {
- return test([]job{job{code: expr, val: toValue(val)}})
+ return test([]job{{code: expr, val: toValue(val)}})
}
// Statement runs without error
-func Run(stmts string) test { return test([]job{job{code: stmts, noval: true}}) }
+func Run(stmts string) test { return test([]job{{code: stmts, noval: true}}) }
// Two statements without error.
// TODO(rsc): Should be possible with Run but the parser
// won't let us do both top-level and non-top-level statements.
func Run2(stmt1, stmt2 string) test {
- return test([]job{job{code: stmt1, noval: true}, job{code: stmt2, noval: true}})
+ return test([]job{{code: stmt1, noval: true}, {code: stmt2, noval: true}})
}
// Statement runs and test one expression's value
func Val1(stmts string, expr1 string, val1 interface{}) test {
return test([]job{
- job{code: stmts, noval: true},
- job{code: expr1, val: toValue(val1)},
+ {code: stmts, noval: true},
+ {code: expr1, val: toValue(val1)},
})
}
// Statement runs and test two expressions' values
func Val2(stmts string, expr1 string, val1 interface{}, expr2 string, val2 interface{}) test {
return test([]job{
- job{code: stmts, noval: true},
- job{code: expr1, val: toValue(val1)},
- job{code: expr2, val: toValue(val2)},
+ {code: stmts, noval: true},
+ {code: expr1, val: toValue(val1)},
+ {code: expr2, val: toValue(val2)},
})
}
@@ -241,7 +241,7 @@ func newTestWorld() *World {
def("u", UintType, uint(1))
def("f", FloatType, 1.0)
def("s", StringType, "abc")
- def("t", NewStructType([]StructField{StructField{"a", IntType, false}}), vstruct{1})
+ def("t", NewStructType([]StructField{{"a", IntType, false}}), vstruct{1})
def("ai", NewArrayType(2, IntType), varray{1, 2})
def("aai", NewArrayType(2, NewArrayType(2, IntType)), varray{varray{1, 2}, varray{3, 4}})
def("aai2", NewArrayType(2, NewArrayType(2, IntType)), varray{varray{5, 6}, varray{7, 8}})
diff --git a/src/pkg/exp/eval/gen.go b/src/pkg/exp/eval/gen.go
index b8f4dc8aed..81863dd6fe 100644
--- a/src/pkg/exp/eval/gen.go
+++ b/src/pkg/exp/eval/gen.go
@@ -40,14 +40,14 @@ type Type struct {
var (
boolType = &Type{Repr: "*boolType", Value: "BoolValue", Native: "bool", As: "asBool"}
uintType = &Type{Repr: "*uintType", Value: "UintValue", Native: "uint64", As: "asUint",
- Sizes: []Size{Size{8, "uint8"}, Size{16, "uint16"}, Size{32, "uint32"}, Size{64, "uint64"}, Size{0, "uint"}},
+ Sizes: []Size{{8, "uint8"}, {16, "uint16"}, {32, "uint32"}, {64, "uint64"}, {0, "uint"}},
}
intType = &Type{Repr: "*intType", Value: "IntValue", Native: "int64", As: "asInt",
- Sizes: []Size{Size{8, "int8"}, Size{16, "int16"}, Size{32, "int32"}, Size{64, "int64"}, Size{0, "int"}},
+ Sizes: []Size{{8, "int8"}, {16, "int16"}, {32, "int32"}, {64, "int64"}, {0, "int"}},
}
idealIntType = &Type{Repr: "*idealIntType", Value: "IdealIntValue", Native: "*big.Int", As: "asIdealInt", IsIdeal: true}
floatType = &Type{Repr: "*floatType", Value: "FloatValue", Native: "float64", As: "asFloat",
- Sizes: []Size{Size{32, "float32"}, Size{64, "float64"}, Size{0, "float"}},
+ Sizes: []Size{{32, "float32"}, {64, "float64"}, {0, "float"}},
}
idealFloatType = &Type{Repr: "*idealFloatType", Value: "IdealFloatValue", Native: "*big.Rat", As: "asIdealFloat", IsIdeal: true}
stringType = &Type{Repr: "*stringType", Value: "StringValue", Native: "string", As: "asString"}
@@ -93,41 +93,41 @@ var (
)
var unOps = []Op{
- Op{Name: "Neg", Expr: "-v", ConstExpr: "val.Neg(val)", Types: numbers},
- Op{Name: "Not", Expr: "!v", Types: bools},
- Op{Name: "Xor", Expr: "^v", ConstExpr: "val.Not(val)", Types: integers},
+ {Name: "Neg", Expr: "-v", ConstExpr: "val.Neg(val)", Types: numbers},
+ {Name: "Not", Expr: "!v", Types: bools},
+ {Name: "Xor", Expr: "^v", ConstExpr: "val.Not(val)", Types: integers},
}
var binOps = []Op{
- Op{Name: "Add", Expr: "l + r", ConstExpr: "l.Add(l, r)", Types: addable},
- Op{Name: "Sub", Expr: "l - r", ConstExpr: "l.Sub(l, r)", Types: numbers},
- Op{Name: "Mul", Expr: "l * r", ConstExpr: "l.Mul(l, r)", Types: numbers},
- Op{Name: "Quo",
+ {Name: "Add", Expr: "l + r", ConstExpr: "l.Add(l, r)", Types: addable},
+ {Name: "Sub", Expr: "l - r", ConstExpr: "l.Sub(l, r)", Types: numbers},
+ {Name: "Mul", Expr: "l * r", ConstExpr: "l.Mul(l, r)", Types: numbers},
+ {Name: "Quo",
Body: "if r == 0 { t.Abort(DivByZeroError{}) }; ret = l / r",
ConstExpr: "l.Quo(l, r)",
Types: numbers,
},
- Op{Name: "Rem",
+ {Name: "Rem",
Body: "if r == 0 { t.Abort(DivByZeroError{}) }; ret = l % r",
ConstExpr: "l.Rem(l, r)",
Types: integers,
},
- Op{Name: "And", Expr: "l & r", ConstExpr: "l.And(l, r)", Types: integers},
- Op{Name: "Or", Expr: "l | r", ConstExpr: "l.Or(l, r)", Types: integers},
- Op{Name: "Xor", Expr: "l ^ r", ConstExpr: "l.Xor(l, r)", Types: integers},
- Op{Name: "AndNot", Expr: "l &^ r", ConstExpr: "l.AndNot(l, r)", Types: integers},
- Op{Name: "Shl", Expr: "l << r", ConstExpr: "l.Lsh(l, uint(r.Value()))",
+ {Name: "And", Expr: "l & r", ConstExpr: "l.And(l, r)", Types: integers},
+ {Name: "Or", Expr: "l | r", ConstExpr: "l.Or(l, r)", Types: integers},
+ {Name: "Xor", Expr: "l ^ r", ConstExpr: "l.Xor(l, r)", Types: integers},
+ {Name: "AndNot", Expr: "l &^ r", ConstExpr: "l.AndNot(l, r)", Types: integers},
+ {Name: "Shl", Expr: "l << r", ConstExpr: "l.Lsh(l, uint(r.Value()))",
AsRightName: "asUint", Types: shiftable,
},
- Op{Name: "Shr", Expr: "l >> r", ConstExpr: "new(big.Int).Rsh(l, uint(r.Value()))",
+ {Name: "Shr", Expr: "l >> r", ConstExpr: "new(big.Int).Rsh(l, uint(r.Value()))",
AsRightName: "asUint", Types: shiftable,
},
- Op{Name: "Lss", Expr: "l < r", ConstExpr: "l.Cmp(r) < 0", ReturnType: "bool", Types: addable},
- Op{Name: "Gtr", Expr: "l > r", ConstExpr: "l.Cmp(r) > 0", ReturnType: "bool", Types: addable},
- Op{Name: "Leq", Expr: "l <= r", ConstExpr: "l.Cmp(r) <= 0", ReturnType: "bool", Types: addable},
- Op{Name: "Geq", Expr: "l >= r", ConstExpr: "l.Cmp(r) >= 0", ReturnType: "bool", Types: addable},
- Op{Name: "Eql", Expr: "l == r", ConstExpr: "l.Cmp(r) == 0", ReturnType: "bool", Types: cmpable},
- Op{Name: "Neq", Expr: "l != r", ConstExpr: "l.Cmp(r) != 0", ReturnType: "bool", Types: cmpable},
+ {Name: "Lss", Expr: "l < r", ConstExpr: "l.Cmp(r) < 0", ReturnType: "bool", Types: addable},
+ {Name: "Gtr", Expr: "l > r", ConstExpr: "l.Cmp(r) > 0", ReturnType: "bool", Types: addable},
+ {Name: "Leq", Expr: "l <= r", ConstExpr: "l.Cmp(r) <= 0", ReturnType: "bool", Types: addable},
+ {Name: "Geq", Expr: "l >= r", ConstExpr: "l.Cmp(r) >= 0", ReturnType: "bool", Types: addable},
+ {Name: "Eql", Expr: "l == r", ConstExpr: "l.Cmp(r) == 0", ReturnType: "bool", Types: cmpable},
+ {Name: "Neq", Expr: "l != r", ConstExpr: "l.Cmp(r) != 0", ReturnType: "bool", Types: cmpable},
}
type Data struct {
diff --git a/src/pkg/exp/ogle/cmd.go b/src/pkg/exp/ogle/cmd.go
index 2f087b777f..d3672c24e3 100644
--- a/src/pkg/exp/ogle/cmd.go
+++ b/src/pkg/exp/ogle/cmd.go
@@ -84,8 +84,8 @@ type cmd struct {
}
var cmds = []cmd{
- cmd{"load", cmdLoad},
- cmd{"bt", cmdBt},
+ {"load", cmdLoad},
+ {"bt", cmdBt},
}
// getCmd attempts to parse an input line as a registered command. If
diff --git a/src/pkg/fmt/fmt_test.go b/src/pkg/fmt/fmt_test.go
index f0d6a9c970..2b50532863 100644
--- a/src/pkg/fmt/fmt_test.go
+++ b/src/pkg/fmt/fmt_test.go
@@ -107,276 +107,276 @@ func (p *P) String() string {
var b byte
var fmttests = []fmtTest{
- fmtTest{"%d", 12345, "12345"},
- fmtTest{"%v", 12345, "12345"},
- fmtTest{"%t", true, "true"},
+ {"%d", 12345, "12345"},
+ {"%v", 12345, "12345"},
+ {"%t", true, "true"},
// basic string
- fmtTest{"%s", "abc", "abc"},
- fmtTest{"%x", "abc", "616263"},
- fmtTest{"%x", "xyz", "78797a"},
- fmtTest{"%X", "xyz", "78797A"},
- fmtTest{"%q", "abc", `"abc"`},
+ {"%s", "abc", "abc"},
+ {"%x", "abc", "616263"},
+ {"%x", "xyz", "78797a"},
+ {"%X", "xyz", "78797A"},
+ {"%q", "abc", `"abc"`},
// basic bytes
- fmtTest{"%s", []byte("abc"), "abc"},
- fmtTest{"%x", []byte("abc"), "616263"},
- fmtTest{"% x", []byte("abc"), "61 62 63"},
- fmtTest{"%x", []byte("xyz"), "78797a"},
- fmtTest{"%X", []byte("xyz"), "78797A"},
- fmtTest{"%q", []byte("abc"), `"abc"`},
+ {"%s", []byte("abc"), "abc"},
+ {"%x", []byte("abc"), "616263"},
+ {"% x", []byte("abc"), "61 62 63"},
+ {"%x", []byte("xyz"), "78797a"},
+ {"%X", []byte("xyz"), "78797A"},
+ {"%q", []byte("abc"), `"abc"`},
// escaped strings
- fmtTest{"%#q", `abc`, "`abc`"},
- fmtTest{"%#q", `"`, "`\"`"},
- fmtTest{"1 %#q", `\n`, "1 `\\n`"},
- fmtTest{"2 %#q", "\n", `2 "\n"`},
- fmtTest{"%q", `"`, `"\""`},
- fmtTest{"%q", "\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"`},
- fmtTest{"%q", "abc\xffdef", `"abc\xffdef"`},
- fmtTest{"%q", "\u263a", `"\u263a"`},
- fmtTest{"%q", "\U0010ffff", `"\U0010ffff"`},
+ {"%#q", `abc`, "`abc`"},
+ {"%#q", `"`, "`\"`"},
+ {"1 %#q", `\n`, "1 `\\n`"},
+ {"2 %#q", "\n", `2 "\n"`},
+ {"%q", `"`, `"\""`},
+ {"%q", "\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"`},
+ {"%q", "abc\xffdef", `"abc\xffdef"`},
+ {"%q", "\u263a", `"\u263a"`},
+ {"%q", "\U0010ffff", `"\U0010ffff"`},
// width
- fmtTest{"%5s", "abc", " abc"},
- fmtTest{"%2s", "\u263a", " \u263a"},
- fmtTest{"%-5s", "abc", "abc "},
- fmtTest{"%05s", "abc", "00abc"},
+ {"%5s", "abc", " abc"},
+ {"%2s", "\u263a", " \u263a"},
+ {"%-5s", "abc", "abc "},
+ {"%05s", "abc", "00abc"},
// integers
- fmtTest{"%d", 12345, "12345"},
- fmtTest{"%d", -12345, "-12345"},
- fmtTest{"%10d", 12345, " 12345"},
- fmtTest{"%10d", -12345, " -12345"},
- fmtTest{"%+10d", 12345, " +12345"},
- fmtTest{"%010d", 12345, "0000012345"},
- fmtTest{"%010d", -12345, "-000012345"},
- fmtTest{"%-10d", 12345, "12345 "},
- fmtTest{"%010.3d", 1, " 001"},
- fmtTest{"%010.3d", -1, " -001"},
- fmtTest{"%+d", 12345, "+12345"},
- fmtTest{"%+d", -12345, "-12345"},
- fmtTest{"%+d", 0, "+0"},
- fmtTest{"% d", 0, " 0"},
- fmtTest{"% d", 12345, " 12345"},
+ {"%d", 12345, "12345"},
+ {"%d", -12345, "-12345"},
+ {"%10d", 12345, " 12345"},
+ {"%10d", -12345, " -12345"},
+ {"%+10d", 12345, " +12345"},
+ {"%010d", 12345, "0000012345"},
+ {"%010d", -12345, "-000012345"},
+ {"%-10d", 12345, "12345 "},
+ {"%010.3d", 1, " 001"},
+ {"%010.3d", -1, " -001"},
+ {"%+d", 12345, "+12345"},
+ {"%+d", -12345, "-12345"},
+ {"%+d", 0, "+0"},
+ {"% d", 0, " 0"},
+ {"% d", 12345, " 12345"},
// floats
- fmtTest{"%+.3e", 0.0, "+0.000e+00"},
- fmtTest{"%+.3e", 1.0, "+1.000e+00"},
- fmtTest{"%+.3f", -1.0, "-1.000"},
- fmtTest{"% .3E", -1.0, "-1.000E+00"},
- fmtTest{"% .3e", 1.0, " 1.000e+00"},
- fmtTest{"%+.3g", 0.0, "+0"},
- fmtTest{"%+.3g", 1.0, "+1"},
- fmtTest{"%+.3g", -1.0, "-1"},
- fmtTest{"% .3g", -1.0, "-1"},
- fmtTest{"% .3g", 1.0, " 1"},
+ {"%+.3e", 0.0, "+0.000e+00"},
+ {"%+.3e", 1.0, "+1.000e+00"},
+ {"%+.3f", -1.0, "-1.000"},
+ {"% .3E", -1.0, "-1.000E+00"},
+ {"% .3e", 1.0, " 1.000e+00"},
+ {"%+.3g", 0.0, "+0"},
+ {"%+.3g", 1.0, "+1"},
+ {"%+.3g", -1.0, "-1"},
+ {"% .3g", -1.0, "-1"},
+ {"% .3g", 1.0, " 1"},
// complex values
- fmtTest{"%+.3e", 0i, "(+0.000e+00+0.000e+00i)"},
- fmtTest{"%+.3f", 0i, "(+0.000+0.000i)"},
- fmtTest{"%+.3g", 0i, "(+0+0i)"},
- fmtTest{"%+.3e", 1 + 2i, "(+1.000e+00+2.000e+00i)"},
- fmtTest{"%+.3f", 1 + 2i, "(+1.000+2.000i)"},
- fmtTest{"%+.3g", 1 + 2i, "(+1+2i)"},
- fmtTest{"%.3e", 0i, "(0.000e+00+0.000e+00i)"},
- fmtTest{"%.3f", 0i, "(0.000+0.000i)"},
- fmtTest{"%.3g", 0i, "(0+0i)"},
- fmtTest{"%.3e", 1 + 2i, "(1.000e+00+2.000e+00i)"},
- fmtTest{"%.3f", 1 + 2i, "(1.000+2.000i)"},
- fmtTest{"%.3g", 1 + 2i, "(1+2i)"},
- fmtTest{"%.3e", -1 - 2i, "(-1.000e+00-2.000e+00i)"},
- fmtTest{"%.3f", -1 - 2i, "(-1.000-2.000i)"},
- fmtTest{"%.3g", -1 - 2i, "(-1-2i)"},
- fmtTest{"% .3E", -1 - 2i, "(-1.000E+00-2.000E+00i)"},
- fmtTest{"%+.3g", complex64(1 + 2i), "(+1+2i)"},
- fmtTest{"%+.3g", complex128(1 + 2i), "(+1+2i)"},
+ {"%+.3e", 0i, "(+0.000e+00+0.000e+00i)"},
+ {"%+.3f", 0i, "(+0.000+0.000i)"},
+ {"%+.3g", 0i, "(+0+0i)"},
+ {"%+.3e", 1 + 2i, "(+1.000e+00+2.000e+00i)"},
+ {"%+.3f", 1 + 2i, "(+1.000+2.000i)"},
+ {"%+.3g", 1 + 2i, "(+1+2i)"},
+ {"%.3e", 0i, "(0.000e+00+0.000e+00i)"},
+ {"%.3f", 0i, "(0.000+0.000i)"},
+ {"%.3g", 0i, "(0+0i)"},
+ {"%.3e", 1 + 2i, "(1.000e+00+2.000e+00i)"},
+ {"%.3f", 1 + 2i, "(1.000+2.000i)"},
+ {"%.3g", 1 + 2i, "(1+2i)"},
+ {"%.3e", -1 - 2i, "(-1.000e+00-2.000e+00i)"},
+ {"%.3f", -1 - 2i, "(-1.000-2.000i)"},
+ {"%.3g", -1 - 2i, "(-1-2i)"},
+ {"% .3E", -1 - 2i, "(-1.000E+00-2.000E+00i)"},
+ {"%+.3g", complex64(1 + 2i), "(+1+2i)"},
+ {"%+.3g", complex128(1 + 2i), "(+1+2i)"},
// erroneous formats
- fmtTest{"", 2, "%!(EXTRA int=2)"},
- fmtTest{"%d", "hello", "%!d(string=hello)"},
+ {"", 2, "%!(EXTRA int=2)"},
+ {"%d", "hello", "%!d(string=hello)"},
// old test/fmt_test.go
- fmtTest{"%d", 1234, "1234"},
- fmtTest{"%d", -1234, "-1234"},
- fmtTest{"%d", uint(1234), "1234"},
- fmtTest{"%d", uint32(b32), "4294967295"},
- fmtTest{"%d", uint64(b64), "18446744073709551615"},
- fmtTest{"%o", 01234, "1234"},
- fmtTest{"%#o", 01234, "01234"},
- fmtTest{"%o", uint32(b32), "37777777777"},
- fmtTest{"%o", uint64(b64), "1777777777777777777777"},
- fmtTest{"%x", 0x1234abcd, "1234abcd"},
- fmtTest{"%#x", 0x1234abcd, "0x1234abcd"},
- fmtTest{"%x", b32 - 0x1234567, "fedcba98"},
- fmtTest{"%X", 0x1234abcd, "1234ABCD"},
- fmtTest{"%X", b32 - 0x1234567, "FEDCBA98"},
- fmtTest{"%#X", 0, "0X0"},
- fmtTest{"%x", b64, "ffffffffffffffff"},
- fmtTest{"%b", 7, "111"},
- fmtTest{"%b", b64, "1111111111111111111111111111111111111111111111111111111111111111"},
- fmtTest{"%b", -6, "-110"},
- fmtTest{"%e", float64(1), "1.000000e+00"},
- fmtTest{"%e", float64(1234.5678e3), "1.234568e+06"},
- fmtTest{"%e", float64(1234.5678e-8), "1.234568e-05"},
- fmtTest{"%e", float64(-7), "-7.000000e+00"},
- fmtTest{"%e", float64(-1e-9), "-1.000000e-09"},
- fmtTest{"%f", float64(1234.5678e3), "1234567.800000"},
- fmtTest{"%f", float64(1234.5678e-8), "0.000012"},
- fmtTest{"%f", float64(-7), "-7.000000"},
- fmtTest{"%f", float64(-1e-9), "-0.000000"},
- fmtTest{"%g", float64(1234.5678e3), "1.2345678e+06"},
- fmtTest{"%g", float32(1234.5678e3), "1.2345678e+06"},
- fmtTest{"%g", float64(1234.5678e-8), "1.2345678e-05"},
- fmtTest{"%g", float64(-7), "-7"},
- fmtTest{"%g", float64(-1e-9), "-1e-09"},
- fmtTest{"%g", float32(-1e-9), "-1e-09"},
- fmtTest{"%E", float64(1), "1.000000E+00"},
- fmtTest{"%E", float64(1234.5678e3), "1.234568E+06"},
- fmtTest{"%E", float64(1234.5678e-8), "1.234568E-05"},
- fmtTest{"%E", float64(-7), "-7.000000E+00"},
- fmtTest{"%E", float64(-1e-9), "-1.000000E-09"},
- fmtTest{"%G", float64(1234.5678e3), "1.2345678E+06"},
- fmtTest{"%G", float32(1234.5678e3), "1.2345678E+06"},
- fmtTest{"%G", float64(1234.5678e-8), "1.2345678E-05"},
- fmtTest{"%G", float64(-7), "-7"},
- fmtTest{"%G", float64(-1e-9), "-1E-09"},
- fmtTest{"%G", float32(-1e-9), "-1E-09"},
- fmtTest{"%c", 'x', "x"},
- fmtTest{"%c", 0xe4, "ä"},
- fmtTest{"%c", 0x672c, "本"},
- fmtTest{"%c", '日', "日"},
- fmtTest{"%20.8d", 1234, " 00001234"},
- fmtTest{"%20.8d", -1234, " -00001234"},
- fmtTest{"%20d", 1234, " 1234"},
- fmtTest{"%-20.8d", 1234, "00001234 "},
- fmtTest{"%-20.8d", -1234, "-00001234 "},
- fmtTest{"%-#20.8x", 0x1234abc, "0x01234abc "},
- fmtTest{"%-#20.8X", 0x1234abc, "0X01234ABC "},
- fmtTest{"%-#20.8o", 01234, "00001234 "},
- fmtTest{"%.20b", 7, "00000000000000000111"},
- fmtTest{"%20.5s", "qwertyuiop", " qwert"},
- fmtTest{"%.5s", "qwertyuiop", "qwert"},
- fmtTest{"%-20.5s", "qwertyuiop", "qwert "},
- fmtTest{"%20c", 'x', " x"},
- fmtTest{"%-20c", 'x', "x "},
- fmtTest{"%20.6e", 1.2345e3, " 1.234500e+03"},
- fmtTest{"%20.6e", 1.2345e-3, " 1.234500e-03"},
- fmtTest{"%20e", 1.2345e3, " 1.234500e+03"},
- fmtTest{"%20e", 1.2345e-3, " 1.234500e-03"},
- fmtTest{"%20.8e", 1.2345e3, " 1.23450000e+03"},
- fmtTest{"%20f", float64(1.23456789e3), " 1234.567890"},
- fmtTest{"%20f", float64(1.23456789e-3), " 0.001235"},
- fmtTest{"%20f", float64(12345678901.23456789), " 12345678901.234568"},
- fmtTest{"%-20f", float64(1.23456789e3), "1234.567890 "},
- fmtTest{"%20.8f", float64(1.23456789e3), " 1234.56789000"},
- fmtTest{"%20.8f", float64(1.23456789e-3), " 0.00123457"},
- fmtTest{"%g", float64(1.23456789e3), "1234.56789"},
- fmtTest{"%g", float64(1.23456789e-3), "0.00123456789"},
- fmtTest{"%g", float64(1.23456789e20), "1.23456789e+20"},
- fmtTest{"%20e", math.Inf(1), " +Inf"},
- fmtTest{"%-20f", math.Inf(-1), "-Inf "},
- fmtTest{"%20g", math.NaN(), " NaN"},
+ {"%d", 1234, "1234"},
+ {"%d", -1234, "-1234"},
+ {"%d", uint(1234), "1234"},
+ {"%d", uint32(b32), "4294967295"},
+ {"%d", uint64(b64), "18446744073709551615"},
+ {"%o", 01234, "1234"},
+ {"%#o", 01234, "01234"},
+ {"%o", uint32(b32), "37777777777"},
+ {"%o", uint64(b64), "1777777777777777777777"},
+ {"%x", 0x1234abcd, "1234abcd"},
+ {"%#x", 0x1234abcd, "0x1234abcd"},
+ {"%x", b32 - 0x1234567, "fedcba98"},
+ {"%X", 0x1234abcd, "1234ABCD"},
+ {"%X", b32 - 0x1234567, "FEDCBA98"},
+ {"%#X", 0, "0X0"},
+ {"%x", b64, "ffffffffffffffff"},
+ {"%b", 7, "111"},
+ {"%b", b64, "1111111111111111111111111111111111111111111111111111111111111111"},
+ {"%b", -6, "-110"},
+ {"%e", float64(1), "1.000000e+00"},
+ {"%e", float64(1234.5678e3), "1.234568e+06"},
+ {"%e", float64(1234.5678e-8), "1.234568e-05"},
+ {"%e", float64(-7), "-7.000000e+00"},
+ {"%e", float64(-1e-9), "-1.000000e-09"},
+ {"%f", float64(1234.5678e3), "1234567.800000"},
+ {"%f", float64(1234.5678e-8), "0.000012"},
+ {"%f", float64(-7), "-7.000000"},
+ {"%f", float64(-1e-9), "-0.000000"},
+ {"%g", float64(1234.5678e3), "1.2345678e+06"},
+ {"%g", float32(1234.5678e3), "1.2345678e+06"},
+ {"%g", float64(1234.5678e-8), "1.2345678e-05"},
+ {"%g", float64(-7), "-7"},
+ {"%g", float64(-1e-9), "-1e-09"},
+ {"%g", float32(-1e-9), "-1e-09"},
+ {"%E", float64(1), "1.000000E+00"},
+ {"%E", float64(1234.5678e3), "1.234568E+06"},
+ {"%E", float64(1234.5678e-8), "1.234568E-05"},
+ {"%E", float64(-7), "-7.000000E+00"},
+ {"%E", float64(-1e-9), "-1.000000E-09"},
+ {"%G", float64(1234.5678e3), "1.2345678E+06"},
+ {"%G", float32(1234.5678e3), "1.2345678E+06"},
+ {"%G", float64(1234.5678e-8), "1.2345678E-05"},
+ {"%G", float64(-7), "-7"},
+ {"%G", float64(-1e-9), "-1E-09"},
+ {"%G", float32(-1e-9), "-1E-09"},
+ {"%c", 'x', "x"},
+ {"%c", 0xe4, "ä"},
+ {"%c", 0x672c, "本"},
+ {"%c", '日', "日"},
+ {"%20.8d", 1234, " 00001234"},
+ {"%20.8d", -1234, " -00001234"},
+ {"%20d", 1234, " 1234"},
+ {"%-20.8d", 1234, "00001234 "},
+ {"%-20.8d", -1234, "-00001234 "},
+ {"%-#20.8x", 0x1234abc, "0x01234abc "},
+ {"%-#20.8X", 0x1234abc, "0X01234ABC "},
+ {"%-#20.8o", 01234, "00001234 "},
+ {"%.20b", 7, "00000000000000000111"},
+ {"%20.5s", "qwertyuiop", " qwert"},
+ {"%.5s", "qwertyuiop", "qwert"},
+ {"%-20.5s", "qwertyuiop", "qwert "},
+ {"%20c", 'x', " x"},
+ {"%-20c", 'x', "x "},
+ {"%20.6e", 1.2345e3, " 1.234500e+03"},
+ {"%20.6e", 1.2345e-3, " 1.234500e-03"},
+ {"%20e", 1.2345e3, " 1.234500e+03"},
+ {"%20e", 1.2345e-3, " 1.234500e-03"},
+ {"%20.8e", 1.2345e3, " 1.23450000e+03"},
+ {"%20f", float64(1.23456789e3), " 1234.567890"},
+ {"%20f", float64(1.23456789e-3), " 0.001235"},
+ {"%20f", float64(12345678901.23456789), " 12345678901.234568"},
+ {"%-20f", float64(1.23456789e3), "1234.567890 "},
+ {"%20.8f", float64(1.23456789e3), " 1234.56789000"},
+ {"%20.8f", float64(1.23456789e-3), " 0.00123457"},
+ {"%g", float64(1.23456789e3), "1234.56789"},
+ {"%g", float64(1.23456789e-3), "0.00123456789"},
+ {"%g", float64(1.23456789e20), "1.23456789e+20"},
+ {"%20e", math.Inf(1), " +Inf"},
+ {"%-20f", math.Inf(-1), "-Inf "},
+ {"%20g", math.NaN(), " NaN"},
// arrays
- fmtTest{"%v", array, "[1 2 3 4 5]"},
- fmtTest{"%v", iarray, "[1 hello 2.5 <nil>]"},
- fmtTest{"%v", &array, "&[1 2 3 4 5]"},
- fmtTest{"%v", &iarray, "&[1 hello 2.5 <nil>]"},
+ {"%v", array, "[1 2 3 4 5]"},
+ {"%v", iarray, "[1 hello 2.5 <nil>]"},
+ {"%v", &array, "&[1 2 3 4 5]"},
+ {"%v", &iarray, "&[1 hello 2.5 <nil>]"},
// complexes with %v
- fmtTest{"%v", 1 + 2i, "(1+2i)"},
- fmtTest{"%v", complex64(1 + 2i), "(1+2i)"},
- fmtTest{"%v", complex128(1 + 2i), "(1+2i)"},
+ {"%v", 1 + 2i, "(1+2i)"},
+ {"%v", complex64(1 + 2i), "(1+2i)"},
+ {"%v", complex128(1 + 2i), "(1+2i)"},
// structs
- fmtTest{"%v", A{1, 2, "a", []int{1, 2}}, `{1 2 a [1 2]}`},
- fmtTest{"%+v", A{1, 2, "a", []int{1, 2}}, `{i:1 j:2 s:a x:[1 2]}`},
+ {"%v", A{1, 2, "a", []int{1, 2}}, `{1 2 a [1 2]}`},
+ {"%+v", A{1, 2, "a", []int{1, 2}}, `{i:1 j:2 s:a x:[1 2]}`},
// +v on structs with Stringable items
- fmtTest{"%+v", B{1, 2}, `{i:<1> j:2}`},
- fmtTest{"%+v", C{1, B{2, 3}}, `{i:1 B:{i:<2> j:3}}`},
+ {"%+v", B{1, 2}, `{i:<1> j:2}`},
+ {"%+v", C{1, B{2, 3}}, `{i:1 B:{i:<2> j:3}}`},
// q on Stringable items
- fmtTest{"%s", I(23), `<23>`},
- fmtTest{"%q", I(23), `"<23>"`},
- fmtTest{"%x", I(23), `3c32333e`},
- fmtTest{"%d", I(23), `%!d(string=<23>)`},
+ {"%s", I(23), `<23>`},
+ {"%q", I(23), `"<23>"`},
+ {"%x", I(23), `3c32333e`},
+ {"%d", I(23), `%!d(string=<23>)`},
// go syntax
- fmtTest{"%#v", A{1, 2, "a", []int{1, 2}}, `fmt_test.A{i:1, j:0x2, s:"a", x:[]int{1, 2}}`},
- fmtTest{"%#v", &b, "(*uint8)(PTR)"},
- fmtTest{"%#v", TestFmtInterface, "(func(*testing.T))(PTR)"},
- fmtTest{"%#v", make(chan int), "(chan int)(PTR)"},
- fmtTest{"%#v", uint64(1<<64 - 1), "0xffffffffffffffff"},
- fmtTest{"%#v", 1000000000, "1000000000"},
- fmtTest{"%#v", map[string]int{"a": 1, "b": 2}, `map[string] int{"a":1, "b":2}`},
- fmtTest{"%#v", map[string]B{"a": B{1, 2}, "b": B{3, 4}}, `map[string] fmt_test.B{"a":fmt_test.B{i:1, j:2}, "b":fmt_test.B{i:3, j:4}}`},
- fmtTest{"%#v", []string{"a", "b"}, `[]string{"a", "b"}`},
+ {"%#v", A{1, 2, "a", []int{1, 2}}, `fmt_test.A{i:1, j:0x2, s:"a", x:[]int{1, 2}}`},
+ {"%#v", &b, "(*uint8)(PTR)"},
+ {"%#v", TestFmtInterface, "(func(*testing.T))(PTR)"},
+ {"%#v", make(chan int), "(chan int)(PTR)"},
+ {"%#v", uint64(1<<64 - 1), "0xffffffffffffffff"},
+ {"%#v", 1000000000, "1000000000"},
+ {"%#v", map[string]int{"a": 1, "b": 2}, `map[string] int{"a":1, "b":2}`},
+ {"%#v", map[string]B{"a": {1, 2}, "b": {3, 4}}, `map[string] fmt_test.B{"a":fmt_test.B{i:1, j:2}, "b":fmt_test.B{i:3, j:4}}`},
+ {"%#v", []string{"a", "b"}, `[]string{"a", "b"}`},
// slices with other formats
- fmtTest{"%#x", []int{1, 2, 15}, `[0x1 0x2 0xf]`},
- fmtTest{"%x", []int{1, 2, 15}, `[1 2 f]`},
- fmtTest{"%d", []int{1, 2, 15}, `[1 2 15]`},
- fmtTest{"%d", []byte{1, 2, 15}, `[1 2 15]`},
- fmtTest{"%q", []string{"a", "b"}, `["a" "b"]`},
+ {"%#x", []int{1, 2, 15}, `[0x1 0x2 0xf]`},
+ {"%x", []int{1, 2, 15}, `[1 2 f]`},
+ {"%d", []int{1, 2, 15}, `[1 2 15]`},
+ {"%d", []byte{1, 2, 15}, `[1 2 15]`},
+ {"%q", []string{"a", "b"}, `["a" "b"]`},
// renamings
- fmtTest{"%v", renamedBool(true), "true"},
- fmtTest{"%d", renamedBool(true), "%!d(fmt_test.renamedBool=true)"},
- fmtTest{"%o", renamedInt(8), "10"},
- fmtTest{"%d", renamedInt8(-9), "-9"},
- fmtTest{"%v", renamedInt16(10), "10"},
- fmtTest{"%v", renamedInt32(-11), "-11"},
- fmtTest{"%X", renamedInt64(255), "FF"},
- fmtTest{"%v", renamedUint(13), "13"},
- fmtTest{"%o", renamedUint8(14), "16"},
- fmtTest{"%X", renamedUint16(15), "F"},
- fmtTest{"%d", renamedUint32(16), "16"},
- fmtTest{"%X", renamedUint64(17), "11"},
- fmtTest{"%o", renamedUintptr(18), "22"},
- fmtTest{"%x", renamedString("thing"), "7468696e67"},
- fmtTest{"%d", renamedBytes([]byte{1, 2, 15}), `[1 2 15]`},
- fmtTest{"%q", renamedBytes([]byte("hello")), `"hello"`},
- fmtTest{"%v", renamedFloat(11), "11"},
- fmtTest{"%v", renamedFloat32(22), "22"},
- fmtTest{"%v", renamedFloat64(33), "33"},
- fmtTest{"%v", renamedComplex(7 + .2i), "(7+0.2i)"},
- fmtTest{"%v", renamedComplex64(3 + 4i), "(3+4i)"},
- fmtTest{"%v", renamedComplex128(4 - 3i), "(4-3i)"},
+ {"%v", renamedBool(true), "true"},
+ {"%d", renamedBool(true), "%!d(fmt_test.renamedBool=true)"},
+ {"%o", renamedInt(8), "10"},
+ {"%d", renamedInt8(-9), "-9"},
+ {"%v", renamedInt16(10), "10"},
+ {"%v", renamedInt32(-11), "-11"},
+ {"%X", renamedInt64(255), "FF"},
+ {"%v", renamedUint(13), "13"},
+ {"%o", renamedUint8(14), "16"},
+ {"%X", renamedUint16(15), "F"},
+ {"%d", renamedUint32(16), "16"},
+ {"%X", renamedUint64(17), "11"},
+ {"%o", renamedUintptr(18), "22"},
+ {"%x", renamedString("thing"), "7468696e67"},
+ {"%d", renamedBytes([]byte{1, 2, 15}), `[1 2 15]`},
+ {"%q", renamedBytes([]byte("hello")), `"hello"`},
+ {"%v", renamedFloat(11), "11"},
+ {"%v", renamedFloat32(22), "22"},
+ {"%v", renamedFloat64(33), "33"},
+ {"%v", renamedComplex(7 + .2i), "(7+0.2i)"},
+ {"%v", renamedComplex64(3 + 4i), "(3+4i)"},
+ {"%v", renamedComplex128(4 - 3i), "(4-3i)"},
// Formatter
- fmtTest{"%x", F(1), "<x=F(1)>"},
- fmtTest{"%x", G(2), "2"},
- fmtTest{"%+v", S{F(4), G(5)}, "{f:<v=F(4)> g:5}"},
+ {"%x", F(1), "<x=F(1)>"},
+ {"%x", G(2), "2"},
+ {"%+v", S{F(4), G(5)}, "{f:<v=F(4)> g:5}"},
// GoStringer
- fmtTest{"%#v", G(6), "GoString(6)"},
- fmtTest{"%#v", S{F(7), G(8)}, "fmt_test.S{f:<v=F(7)>, g:GoString(8)}"},
+ {"%#v", G(6), "GoString(6)"},
+ {"%#v", S{F(7), G(8)}, "fmt_test.S{f:<v=F(7)>, g:GoString(8)}"},
// %T
- fmtTest{"%T", (4 - 3i), "complex"},
- fmtTest{"%T", renamedComplex128(4 - 3i), "fmt_test.renamedComplex128"},
- fmtTest{"%T", intVal, "int"},
- fmtTest{"%6T", &intVal, " *int"},
+ {"%T", (4 - 3i), "complex"},
+ {"%T", renamedComplex128(4 - 3i), "fmt_test.renamedComplex128"},
+ {"%T", intVal, "int"},
+ {"%6T", &intVal, " *int"},
// %p
- fmtTest{"p0=%p", new(int), "p0=PTR"},
- fmtTest{"p1=%s", &pValue, "p1=String(p)"}, // String method...
- fmtTest{"p2=%p", &pValue, "p2=PTR"}, // ... not called with %p
+ {"p0=%p", new(int), "p0=PTR"},
+ {"p1=%s", &pValue, "p1=String(p)"}, // String method...
+ {"p2=%p", &pValue, "p2=PTR"}, // ... not called with %p
// %p on non-pointers
- fmtTest{"%p", make(chan int), "PTR"},
- fmtTest{"%p", make(map[int]int), "PTR"},
- fmtTest{"%p", make([]int, 1), "PTR"},
- fmtTest{"%p", 27, "%!p(int=27)"}, // not a pointer at all
+ {"%p", make(chan int), "PTR"},
+ {"%p", make(map[int]int), "PTR"},
+ {"%p", make([]int, 1), "PTR"},
+ {"%p", 27, "%!p(int=27)"}, // not a pointer at all
// erroneous things
- fmtTest{"%d", "hello", "%!d(string=hello)"},
- fmtTest{"no args", "hello", "no args%!(EXTRA string=hello)"},
- fmtTest{"%s", nil, "%!s(<nil>)"},
- fmtTest{"%T", nil, "<nil>"},
- fmtTest{"%-1", 100, "%!1(int=100)"},
+ {"%d", "hello", "%!d(string=hello)"},
+ {"no args", "hello", "no args%!(EXTRA string=hello)"},
+ {"%s", nil, "%!s(<nil>)"},
+ {"%T", nil, "<nil>"},
+ {"%-1", 100, "%!1(int=100)"},
}
func TestSprintf(t *testing.T) {
@@ -480,18 +480,18 @@ type flagTest struct {
}
var flagtests = []flagTest{
- flagTest{"%a", "[%a]"},
- flagTest{"%-a", "[%-a]"},
- flagTest{"%+a", "[%+a]"},
- flagTest{"%#a", "[%#a]"},
- flagTest{"% a", "[% a]"},
- flagTest{"%0a", "[%0a]"},
- flagTest{"%1.2a", "[%1.2a]"},
- flagTest{"%-1.2a", "[%-1.2a]"},
- flagTest{"%+1.2a", "[%+1.2a]"},
- flagTest{"%-+1.2a", "[%+-1.2a]"},
- flagTest{"%-+1.2abc", "[%+-1.2a]bc"},
- flagTest{"%-1.2abc", "[%-1.2a]bc"},
+ {"%a", "[%a]"},
+ {"%-a", "[%-a]"},
+ {"%+a", "[%+a]"},
+ {"%#a", "[%#a]"},
+ {"% a", "[% a]"},
+ {"%0a", "[%0a]"},
+ {"%1.2a", "[%1.2a]"},
+ {"%-1.2a", "[%-1.2a]"},
+ {"%+1.2a", "[%+1.2a]"},
+ {"%-+1.2a", "[%+-1.2a]"},
+ {"%-+1.2abc", "[%+-1.2a]bc"},
+ {"%-1.2abc", "[%-1.2a]bc"},
}
func TestFlagParser(t *testing.T) {
@@ -518,8 +518,8 @@ func TestStructPrinter(t *testing.T) {
out string
}
var tests = []Test{
- Test{"%v", "{abc def 123}"},
- Test{"%+v", "{a:abc b:def c:123}"},
+ {"%v", "{abc def 123}"},
+ {"%+v", "{a:abc b:def c:123}"},
}
for _, tt := range tests {
out := Sprintf(tt.fmt, s)
@@ -618,19 +618,19 @@ type starTest struct {
}
var startests = []starTest{
- starTest{"%*d", args(4, 42), " 42"},
- starTest{"%.*d", args(4, 42), "0042"},
- starTest{"%*.*d", args(8, 4, 42), " 0042"},
- starTest{"%0*d", args(4, 42), "0042"},
- starTest{"%-*d", args(4, 42), "42 "},
+ {"%*d", args(4, 42), " 42"},
+ {"%.*d", args(4, 42), "0042"},
+ {"%*.*d", args(8, 4, 42), " 0042"},
+ {"%0*d", args(4, 42), "0042"},
+ {"%-*d", args(4, 42), "42 "},
// erroneous
- starTest{"%*d", args(nil, 42), "%!(BADWIDTH)42"},
- starTest{"%.*d", args(nil, 42), "%!(BADPREC)42"},
- starTest{"%*d", args(5, "foo"), "%!d(string= foo)"},
- starTest{"%*% %d", args(20, 5), "% 5"},
- starTest{"%*", args(4), "%!(BADWIDTH)%!*(int=4)"},
- starTest{"%*d", args(int32(4), 42), "%!(BADWIDTH)42"},
+ {"%*d", args(nil, 42), "%!(BADWIDTH)42"},
+ {"%.*d", args(nil, 42), "%!(BADPREC)42"},
+ {"%*d", args(5, "foo"), "%!d(string= foo)"},
+ {"%*% %d", args(20, 5), "% 5"},
+ {"%*", args(4), "%!(BADWIDTH)%!*(int=4)"},
+ {"%*d", args(int32(4), 42), "%!(BADWIDTH)42"},
}
// TODO: there's no conversion from []T to ...T, but we can fake it. These
diff --git a/src/pkg/fmt/scan_test.go b/src/pkg/fmt/scan_test.go
index 72304eaaa6..23c7d2931a 100644
--- a/src/pkg/fmt/scan_test.go
+++ b/src/pkg/fmt/scan_test.go
@@ -126,161 +126,161 @@ func newReader(s string) *myStringReader {
var scanTests = []ScanTest{
// Numbers
- ScanTest{"T\n", &boolVal, true}, // boolean test vals toggle to be sure they are written
- ScanTest{"F\n", &boolVal, false}, // restored to zero value
- ScanTest{"21\n", &intVal, 21},
- ScanTest{"22\n", &int8Val, int8(22)},
- ScanTest{"23\n", &int16Val, int16(23)},
- ScanTest{"24\n", &int32Val, int32(24)},
- ScanTest{"25\n", &int64Val, int64(25)},
- ScanTest{"127\n", &int8Val, int8(127)},
- ScanTest{"-21\n", &intVal, -21},
- ScanTest{"-22\n", &int8Val, int8(-22)},
- ScanTest{"-23\n", &int16Val, int16(-23)},
- ScanTest{"-24\n", &int32Val, int32(-24)},
- ScanTest{"-25\n", &int64Val, int64(-25)},
- ScanTest{"-128\n", &int8Val, int8(-128)},
- ScanTest{"+21\n", &intVal, +21},
- ScanTest{"+22\n", &int8Val, int8(+22)},
- ScanTest{"+23\n", &int16Val, int16(+23)},
- ScanTest{"+24\n", &int32Val, int32(+24)},
- ScanTest{"+25\n", &int64Val, int64(+25)},
- ScanTest{"+127\n", &int8Val, int8(+127)},
- ScanTest{"26\n", &uintVal, uint(26)},
- ScanTest{"27\n", &uint8Val, uint8(27)},
- ScanTest{"28\n", &uint16Val, uint16(28)},
- ScanTest{"29\n", &uint32Val, uint32(29)},
- ScanTest{"30\n", &uint64Val, uint64(30)},
- ScanTest{"255\n", &uint8Val, uint8(255)},
- ScanTest{"32767\n", &int16Val, int16(32767)},
- ScanTest{"2.3\n", &floatVal, 2.3},
- ScanTest{"2.3e1\n", &float32Val, float32(2.3e1)},
- ScanTest{"2.3e2\n", &float64Val, float64(2.3e2)},
- ScanTest{"2.35\n", &stringVal, "2.35"},
- ScanTest{"2345678\n", &bytesVal, []byte("2345678")},
- ScanTest{"(3.4e1-2i)\n", &complexVal, 3.4e1 - 2i},
- ScanTest{"-3.45e1-3i\n", &complex64Val, complex64(-3.45e1 - 3i)},
- ScanTest{"-.45e1-1e2i\n", &complex128Val, complex128(-.45e1 - 100i)},
- ScanTest{"hello\n", &stringVal, "hello"},
+ {"T\n", &boolVal, true}, // boolean test vals toggle to be sure they are written
+ {"F\n", &boolVal, false}, // restored to zero value
+ {"21\n", &intVal, 21},
+ {"22\n", &int8Val, int8(22)},
+ {"23\n", &int16Val, int16(23)},
+ {"24\n", &int32Val, int32(24)},
+ {"25\n", &int64Val, int64(25)},
+ {"127\n", &int8Val, int8(127)},
+ {"-21\n", &intVal, -21},
+ {"-22\n", &int8Val, int8(-22)},
+ {"-23\n", &int16Val, int16(-23)},
+ {"-24\n", &int32Val, int32(-24)},
+ {"-25\n", &int64Val, int64(-25)},
+ {"-128\n", &int8Val, int8(-128)},
+ {"+21\n", &intVal, +21},
+ {"+22\n", &int8Val, int8(+22)},
+ {"+23\n", &int16Val, int16(+23)},
+ {"+24\n", &int32Val, int32(+24)},
+ {"+25\n", &int64Val, int64(+25)},
+ {"+127\n", &int8Val, int8(+127)},
+ {"26\n", &uintVal, uint(26)},
+ {"27\n", &uint8Val, uint8(27)},
+ {"28\n", &uint16Val, uint16(28)},
+ {"29\n", &uint32Val, uint32(29)},
+ {"30\n", &uint64Val, uint64(30)},
+ {"255\n", &uint8Val, uint8(255)},
+ {"32767\n", &int16Val, int16(32767)},
+ {"2.3\n", &floatVal, 2.3},
+ {"2.3e1\n", &float32Val, float32(2.3e1)},
+ {"2.3e2\n", &float64Val, float64(2.3e2)},
+ {"2.35\n", &stringVal, "2.35"},
+ {"2345678\n", &bytesVal, []byte("2345678")},
+ {"(3.4e1-2i)\n", &complexVal, 3.4e1 - 2i},
+ {"-3.45e1-3i\n", &complex64Val, complex64(-3.45e1 - 3i)},
+ {"-.45e1-1e2i\n", &complex128Val, complex128(-.45e1 - 100i)},
+ {"hello\n", &stringVal, "hello"},
// Renamed types
- ScanTest{"true\n", &renamedBoolVal, renamedBool(true)},
- ScanTest{"F\n", &renamedBoolVal, renamedBool(false)},
- ScanTest{"101\n", &renamedIntVal, renamedInt(101)},
- ScanTest{"102\n", &renamedIntVal, renamedInt(102)},
- ScanTest{"103\n", &renamedUintVal, renamedUint(103)},
- ScanTest{"104\n", &renamedUintVal, renamedUint(104)},
- ScanTest{"105\n", &renamedInt8Val, renamedInt8(105)},
- ScanTest{"106\n", &renamedInt16Val, renamedInt16(106)},
- ScanTest{"107\n", &renamedInt32Val, renamedInt32(107)},
- ScanTest{"108\n", &renamedInt64Val, renamedInt64(108)},
- ScanTest{"109\n", &renamedUint8Val, renamedUint8(109)},
- ScanTest{"110\n", &renamedUint16Val, renamedUint16(110)},
- ScanTest{"111\n", &renamedUint32Val, renamedUint32(111)},
- ScanTest{"112\n", &renamedUint64Val, renamedUint64(112)},
- ScanTest{"113\n", &renamedUintptrVal, renamedUintptr(113)},
- ScanTest{"114\n", &renamedStringVal, renamedString("114")},
- ScanTest{"115\n", &renamedBytesVal, renamedBytes([]byte("115"))},
+ {"true\n", &renamedBoolVal, renamedBool(true)},
+ {"F\n", &renamedBoolVal, renamedBool(false)},
+ {"101\n", &renamedIntVal, renamedInt(101)},
+ {"102\n", &renamedIntVal, renamedInt(102)},
+ {"103\n", &renamedUintVal, renamedUint(103)},
+ {"104\n", &renamedUintVal, renamedUint(104)},
+ {"105\n", &renamedInt8Val, renamedInt8(105)},
+ {"106\n", &renamedInt16Val, renamedInt16(106)},
+ {"107\n", &renamedInt32Val, renamedInt32(107)},
+ {"108\n", &renamedInt64Val, renamedInt64(108)},
+ {"109\n", &renamedUint8Val, renamedUint8(109)},
+ {"110\n", &renamedUint16Val, renamedUint16(110)},
+ {"111\n", &renamedUint32Val, renamedUint32(111)},
+ {"112\n", &renamedUint64Val, renamedUint64(112)},
+ {"113\n", &renamedUintptrVal, renamedUintptr(113)},
+ {"114\n", &renamedStringVal, renamedString("114")},
+ {"115\n", &renamedBytesVal, renamedBytes([]byte("115"))},
// Custom scanner.
- ScanTest{" vvv ", &xVal, Xs("vvv")},
+ {" vvv ", &xVal, Xs("vvv")},
// Fixed bugs
- ScanTest{"2147483648\n", &int64Val, int64(2147483648)}, // was: integer overflow
+ {"2147483648\n", &int64Val, int64(2147483648)}, // was: integer overflow
}
var scanfTests = []ScanfTest{
- ScanfTest{"%v", "TRUE\n", &boolVal, true},
- ScanfTest{"%t", "false\n", &boolVal, false},
- ScanfTest{"%v", "-71\n", &intVal, -71},
- ScanfTest{"%d", "72\n", &intVal, 72},
- ScanfTest{"%c", "a\n", &intVal, 'a'},
- ScanfTest{"%c", "\u5072\n", &intVal, 0x5072},
- ScanfTest{"%c", "\u1234\n", &intVal, '\u1234'},
- ScanfTest{"%d", "73\n", &int8Val, int8(73)},
- ScanfTest{"%d", "+74\n", &int16Val, int16(74)},
- ScanfTest{"%d", "75\n", &int32Val, int32(75)},
- ScanfTest{"%d", "76\n", &int64Val, int64(76)},
- ScanfTest{"%b", "1001001\n", &intVal, 73},
- ScanfTest{"%o", "075\n", &intVal, 075},
- ScanfTest{"%x", "a75\n", &intVal, 0xa75},
- ScanfTest{"%v", "71\n", &uintVal, uint(71)},
- ScanfTest{"%d", "72\n", &uintVal, uint(72)},
- ScanfTest{"%d", "73\n", &uint8Val, uint8(73)},
- ScanfTest{"%d", "74\n", &uint16Val, uint16(74)},
- ScanfTest{"%d", "75\n", &uint32Val, uint32(75)},
- ScanfTest{"%d", "76\n", &uint64Val, uint64(76)},
- ScanfTest{"%b", "1001001\n", &uintVal, uint(73)},
- ScanfTest{"%o", "075\n", &uintVal, uint(075)},
- ScanfTest{"%x", "a75\n", &uintVal, uint(0xa75)},
- ScanfTest{"%x", "A75\n", &uintVal, uint(0xa75)},
+ {"%v", "TRUE\n", &boolVal, true},
+ {"%t", "false\n", &boolVal, false},
+ {"%v", "-71\n", &intVal, -71},
+ {"%d", "72\n", &intVal, 72},
+ {"%c", "a\n", &intVal, 'a'},
+ {"%c", "\u5072\n", &intVal, 0x5072},
+ {"%c", "\u1234\n", &intVal, '\u1234'},
+ {"%d", "73\n", &int8Val, int8(73)},
+ {"%d", "+74\n", &int16Val, int16(74)},
+ {"%d", "75\n", &int32Val, int32(75)},
+ {"%d", "76\n", &int64Val, int64(76)},
+ {"%b", "1001001\n", &intVal, 73},
+ {"%o", "075\n", &intVal, 075},
+ {"%x", "a75\n", &intVal, 0xa75},
+ {"%v", "71\n", &uintVal, uint(71)},
+ {"%d", "72\n", &uintVal, uint(72)},
+ {"%d", "73\n", &uint8Val, uint8(73)},
+ {"%d", "74\n", &uint16Val, uint16(74)},
+ {"%d", "75\n", &uint32Val, uint32(75)},
+ {"%d", "76\n", &uint64Val, uint64(76)},
+ {"%b", "1001001\n", &uintVal, uint(73)},
+ {"%o", "075\n", &uintVal, uint(075)},
+ {"%x", "a75\n", &uintVal, uint(0xa75)},
+ {"%x", "A75\n", &uintVal, uint(0xa75)},
// Strings
- ScanfTest{"%s", "using-%s\n", &stringVal, "using-%s"},
- ScanfTest{"%x", "7573696e672d2578\n", &stringVal, "using-%x"},
- ScanfTest{"%q", `"quoted\twith\\do\u0075bl\x65s"` + "\n", &stringVal, "quoted\twith\\doubles"},
- ScanfTest{"%q", "`quoted with backs`\n", &stringVal, "quoted with backs"},
+ {"%s", "using-%s\n", &stringVal, "using-%s"},
+ {"%x", "7573696e672d2578\n", &stringVal, "using-%x"},
+ {"%q", `"quoted\twith\\do\u0075bl\x65s"` + "\n", &stringVal, "quoted\twith\\doubles"},
+ {"%q", "`quoted with backs`\n", &stringVal, "quoted with backs"},
// Byte slices
- ScanfTest{"%s", "bytes-%s\n", &bytesVal, []byte("bytes-%s")},
- ScanfTest{"%x", "62797465732d2578\n", &bytesVal, []byte("bytes-%x")},
- ScanfTest{"%q", `"bytes\rwith\vdo\u0075bl\x65s"` + "\n", &bytesVal, []byte("bytes\rwith\vdoubles")},
- ScanfTest{"%q", "`bytes with backs`\n", &bytesVal, []byte("bytes with backs")},
+ {"%s", "bytes-%s\n", &bytesVal, []byte("bytes-%s")},
+ {"%x", "62797465732d2578\n", &bytesVal, []byte("bytes-%x")},
+ {"%q", `"bytes\rwith\vdo\u0075bl\x65s"` + "\n", &bytesVal, []byte("bytes\rwith\vdoubles")},
+ {"%q", "`bytes with backs`\n", &bytesVal, []byte("bytes with backs")},
// Renamed types
- ScanfTest{"%v\n", "true\n", &renamedBoolVal, renamedBool(true)},
- ScanfTest{"%t\n", "F\n", &renamedBoolVal, renamedBool(false)},
- ScanfTest{"%v", "101\n", &renamedIntVal, renamedInt(101)},
- ScanfTest{"%c", "\u0101\n", &renamedIntVal, renamedInt('\u0101')},
- ScanfTest{"%o", "0146\n", &renamedIntVal, renamedInt(102)},
- ScanfTest{"%v", "103\n", &renamedUintVal, renamedUint(103)},
- ScanfTest{"%d", "104\n", &renamedUintVal, renamedUint(104)},
- ScanfTest{"%d", "105\n", &renamedInt8Val, renamedInt8(105)},
- ScanfTest{"%d", "106\n", &renamedInt16Val, renamedInt16(106)},
- ScanfTest{"%d", "107\n", &renamedInt32Val, renamedInt32(107)},
- ScanfTest{"%d", "108\n", &renamedInt64Val, renamedInt64(108)},
- ScanfTest{"%x", "6D\n", &renamedUint8Val, renamedUint8(109)},
- ScanfTest{"%o", "0156\n", &renamedUint16Val, renamedUint16(110)},
- ScanfTest{"%d", "111\n", &renamedUint32Val, renamedUint32(111)},
- ScanfTest{"%d", "112\n", &renamedUint64Val, renamedUint64(112)},
- ScanfTest{"%d", "113\n", &renamedUintptrVal, renamedUintptr(113)},
- ScanfTest{"%s", "114\n", &renamedStringVal, renamedString("114")},
- ScanfTest{"%q", "\"1155\"\n", &renamedBytesVal, renamedBytes([]byte("1155"))},
- ScanfTest{"%g", "115.1\n", &renamedFloatVal, renamedFloat(115.1)},
- ScanfTest{"%g", "116e1\n", &renamedFloat32Val, renamedFloat32(116e1)},
- ScanfTest{"%g", "-11.7e+1", &renamedFloat64Val, renamedFloat64(-11.7e+1)},
- ScanfTest{"%g", "11+5.1i\n", &renamedComplexVal, renamedComplex(11 + 5.1i)},
- ScanfTest{"%g", "11+6e1i\n", &renamedComplex64Val, renamedComplex64(11 + 6e1i)},
- ScanfTest{"%g", "-11.+7e+1i", &renamedComplex128Val, renamedComplex128(-11. + 7e+1i)},
+ {"%v\n", "true\n", &renamedBoolVal, renamedBool(true)},
+ {"%t\n", "F\n", &renamedBoolVal, renamedBool(false)},
+ {"%v", "101\n", &renamedIntVal, renamedInt(101)},
+ {"%c", "\u0101\n", &renamedIntVal, renamedInt('\u0101')},
+ {"%o", "0146\n", &renamedIntVal, renamedInt(102)},
+ {"%v", "103\n", &renamedUintVal, renamedUint(103)},
+ {"%d", "104\n", &renamedUintVal, renamedUint(104)},
+ {"%d", "105\n", &renamedInt8Val, renamedInt8(105)},
+ {"%d", "106\n", &renamedInt16Val, renamedInt16(106)},
+ {"%d", "107\n", &renamedInt32Val, renamedInt32(107)},
+ {"%d", "108\n", &renamedInt64Val, renamedInt64(108)},
+ {"%x", "6D\n", &renamedUint8Val, renamedUint8(109)},
+ {"%o", "0156\n", &renamedUint16Val, renamedUint16(110)},
+ {"%d", "111\n", &renamedUint32Val, renamedUint32(111)},
+ {"%d", "112\n", &renamedUint64Val, renamedUint64(112)},
+ {"%d", "113\n", &renamedUintptrVal, renamedUintptr(113)},
+ {"%s", "114\n", &renamedStringVal, renamedString("114")},
+ {"%q", "\"1155\"\n", &renamedBytesVal, renamedBytes([]byte("1155"))},
+ {"%g", "115.1\n", &renamedFloatVal, renamedFloat(115.1)},
+ {"%g", "116e1\n", &renamedFloat32Val, renamedFloat32(116e1)},
+ {"%g", "-11.7e+1", &renamedFloat64Val, renamedFloat64(-11.7e+1)},
+ {"%g", "11+5.1i\n", &renamedComplexVal, renamedComplex(11 + 5.1i)},
+ {"%g", "11+6e1i\n", &renamedComplex64Val, renamedComplex64(11 + 6e1i)},
+ {"%g", "-11.+7e+1i", &renamedComplex128Val, renamedComplex128(-11. + 7e+1i)},
// Interesting formats
- ScanfTest{"here is\tthe value:%d", "here is the\tvalue:118\n", &intVal, 118},
- ScanfTest{"%% %%:%d", "% %:119\n", &intVal, 119},
+ {"here is\tthe value:%d", "here is the\tvalue:118\n", &intVal, 118},
+ {"%% %%:%d", "% %:119\n", &intVal, 119},
// Corner cases
- ScanfTest{"%x", "FFFFFFFF\n", &uint32Val, uint32(0xFFFFFFFF)},
+ {"%x", "FFFFFFFF\n", &uint32Val, uint32(0xFFFFFFFF)},
// Custom scanner.
- ScanfTest{"%s", " sss ", &xVal, Xs("sss")},
- ScanfTest{"%2s", "sssss", &xVal, Xs("ss")},
+ {"%s", " sss ", &xVal, Xs("sss")},
+ {"%2s", "sssss", &xVal, Xs("ss")},
// Fixed bugs
- ScanfTest{"%d\n", "27\n", &intVal, 27}, // ok
- ScanfTest{"%d\n", "28 \n", &intVal, 28}, // was: "unexpected newline"
+ {"%d\n", "27\n", &intVal, 27}, // ok
+ {"%d\n", "28 \n", &intVal, 28}, // was: "unexpected newline"
}
var overflowTests = []ScanTest{
- ScanTest{"128", &int8Val, 0},
- ScanTest{"32768", &int16Val, 0},
- ScanTest{"-129", &int8Val, 0},
- ScanTest{"-32769", &int16Val, 0},
- ScanTest{"256", &uint8Val, 0},
- ScanTest{"65536", &uint16Val, 0},
- ScanTest{"1e100", &float32Val, 0},
- ScanTest{"1e500", &float64Val, 0},
- ScanTest{"(1e100+0i)", &complexVal, 0},
- ScanTest{"(1+1e100i)", &complex64Val, 0},
- ScanTest{"(1-1e500i)", &complex128Val, 0},
+ {"128", &int8Val, 0},
+ {"32768", &int16Val, 0},
+ {"-129", &int8Val, 0},
+ {"-32769", &int16Val, 0},
+ {"256", &uint8Val, 0},
+ {"65536", &uint16Val, 0},
+ {"1e100", &float32Val, 0},
+ {"1e500", &float64Val, 0},
+ {"(1e100+0i)", &complexVal, 0},
+ {"(1+1e100i)", &complex64Val, 0},
+ {"(1-1e500i)", &complex128Val, 0},
}
var i, j, k int
@@ -290,29 +290,29 @@ var c complex
var x, y Xs
var multiTests = []ScanfMultiTest{
- ScanfMultiTest{"", "", nil, nil, ""},
- ScanfMultiTest{"%d", "23", args(&i), args(23), ""},
- ScanfMultiTest{"%2s%3s", "22333", args(&s, &t), args("22", "333"), ""},
- ScanfMultiTest{"%2d%3d", "44555", args(&i, &j), args(44, 555), ""},
- ScanfMultiTest{"%2d.%3d", "66.777", args(&i, &j), args(66, 777), ""},
- ScanfMultiTest{"%d, %d", "23, 18", args(&i, &j), args(23, 18), ""},
- ScanfMultiTest{"%3d22%3d", "33322333", args(&i, &j), args(333, 333), ""},
- ScanfMultiTest{"%6vX=%3fY", "3+2iX=2.5Y", args(&c, &f), args((3 + 2i), float(2.5)), ""},
- ScanfMultiTest{"%d%s", "123abc", args(&i, &s), args(123, "abc"), ""},
- ScanfMultiTest{"%c%c%c", "2\u50c2X", args(&i, &j, &k), args('2', '\u50c2', 'X'), ""},
+ {"", "", nil, nil, ""},
+ {"%d", "23", args(&i), args(23), ""},
+ {"%2s%3s", "22333", args(&s, &t), args("22", "333"), ""},
+ {"%2d%3d", "44555", args(&i, &j), args(44, 555), ""},
+ {"%2d.%3d", "66.777", args(&i, &j), args(66, 777), ""},
+ {"%d, %d", "23, 18", args(&i, &j), args(23, 18), ""},
+ {"%3d22%3d", "33322333", args(&i, &j), args(333, 333), ""},
+ {"%6vX=%3fY", "3+2iX=2.5Y", args(&c, &f), args((3 + 2i), float(2.5)), ""},
+ {"%d%s", "123abc", args(&i, &s), args(123, "abc"), ""},
+ {"%c%c%c", "2\u50c2X", args(&i, &j, &k), args('2', '\u50c2', 'X'), ""},
// Custom scanner.
- ScanfMultiTest{"%2e%f", "eefffff", args(&x, &y), args(Xs("ee"), Xs("fffff")), ""},
+ {"%2e%f", "eefffff", args(&x, &y), args(Xs("ee"), Xs("fffff")), ""},
// Errors
- ScanfMultiTest{"%t", "23 18", args(&i), nil, "bad verb"},
- ScanfMultiTest{"%d %d %d", "23 18", args(&i, &j), args(23, 18), "too few operands"},
- ScanfMultiTest{"%d %d", "23 18 27", args(&i, &j, &k), args(23, 18), "too many operands"},
- ScanfMultiTest{"%c", "\u0100", args(&int8Val), nil, "overflow"},
- ScanfMultiTest{"X%d", "10X", args(&intVal), nil, "input does not match format"},
+ {"%t", "23 18", args(&i), nil, "bad verb"},
+ {"%d %d %d", "23 18", args(&i, &j), args(23, 18), "too few operands"},
+ {"%d %d", "23 18 27", args(&i, &j, &k), args(23, 18), "too many operands"},
+ {"%c", "\u0100", args(&int8Val), nil, "overflow"},
+ {"X%d", "10X", args(&intVal), nil, "input does not match format"},
// Bad UTF-8: should see every byte.
- ScanfMultiTest{"%c%c%c", "\xc2X\xc2", args(&i, &j, &k), args(utf8.RuneError, 'X', utf8.RuneError), ""},
+ {"%c%c%c", "\xc2X\xc2", args(&i, &j, &k), args(utf8.RuneError, 'X', utf8.RuneError), ""},
}
func testScan(name string, t *testing.T, scan func(r io.Reader, a ...interface{}) (int, os.Error)) {
diff --git a/src/pkg/go/printer/printer_test.go b/src/pkg/go/printer/printer_test.go
index 21a06ce470..b5d7b81d8f 100644
--- a/src/pkg/go/printer/printer_test.go
+++ b/src/pkg/go/printer/printer_test.go
@@ -112,14 +112,14 @@ type entry struct {
// Use gotest -update to create/update the respective golden files.
var data = []entry{
- entry{"empty.input", "empty.golden", 0},
- entry{"comments.input", "comments.golden", 0},
- entry{"comments.input", "comments.x", export},
- entry{"linebreaks.input", "linebreaks.golden", 0},
- entry{"expressions.input", "expressions.golden", 0},
- entry{"expressions.input", "expressions.raw", rawFormat},
- entry{"declarations.input", "declarations.golden", 0},
- entry{"statements.input", "statements.golden", 0},
+ {"empty.input", "empty.golden", 0},
+ {"comments.input", "comments.golden", 0},
+ {"comments.input", "comments.x", export},
+ {"linebreaks.input", "linebreaks.golden", 0},
+ {"expressions.input", "expressions.golden", 0},
+ {"expressions.input", "expressions.raw", rawFormat},
+ {"declarations.input", "declarations.golden", 0},
+ {"statements.input", "statements.golden", 0},
}
diff --git a/src/pkg/go/scanner/scanner_test.go b/src/pkg/go/scanner/scanner_test.go
index 07b5df988d..0e4256ef40 100644
--- a/src/pkg/go/scanner/scanner_test.go
+++ b/src/pkg/go/scanner/scanner_test.go
@@ -41,136 +41,136 @@ type elt struct {
var tokens = [...]elt{
// Special tokens
- elt{token.COMMENT, "/* a comment */", special},
- elt{token.COMMENT, "// a comment \n", special},
+ {token.COMMENT, "/* a comment */", special},
+ {token.COMMENT, "// a comment \n", special},
// Identifiers and basic type literals
- elt{token.IDENT, "foobar", literal},
- elt{token.IDENT, "a۰۱۸", literal},
- elt{token.IDENT, "foo६४", literal},
- elt{token.IDENT, "bar9876", literal},
- elt{token.INT, "0", literal},
- elt{token.INT, "1", literal},
- elt{token.INT, "123456789012345678890", literal},
- elt{token.INT, "01234567", literal},
- elt{token.INT, "0xcafebabe", literal},
- elt{token.FLOAT, "0.", literal},
- elt{token.FLOAT, ".0", literal},
- elt{token.FLOAT, "3.14159265", literal},
- elt{token.FLOAT, "1e0", literal},
- elt{token.FLOAT, "1e+100", literal},
- elt{token.FLOAT, "1e-100", literal},
- elt{token.FLOAT, "2.71828e-1000", literal},
- elt{token.IMAG, "0i", literal},
- elt{token.IMAG, "1i", literal},
- elt{token.IMAG, "012345678901234567889i", literal},
- elt{token.IMAG, "123456789012345678890i", literal},
- elt{token.IMAG, "0.i", literal},
- elt{token.IMAG, ".0i", literal},
- elt{token.IMAG, "3.14159265i", literal},
- elt{token.IMAG, "1e0i", literal},
- elt{token.IMAG, "1e+100i", literal},
- elt{token.IMAG, "1e-100i", literal},
- elt{token.IMAG, "2.71828e-1000i", literal},
- elt{token.CHAR, "'a'", literal},
- elt{token.CHAR, "'\\000'", literal},
- elt{token.CHAR, "'\\xFF'", literal},
- elt{token.CHAR, "'\\uff16'", literal},
- elt{token.CHAR, "'\\U0000ff16'", literal},
- elt{token.STRING, "`foobar`", literal},
- elt{token.STRING, "`" + `foo
+ {token.IDENT, "foobar", literal},
+ {token.IDENT, "a۰۱۸", literal},
+ {token.IDENT, "foo६४", literal},
+ {token.IDENT, "bar9876", literal},
+ {token.INT, "0", literal},
+ {token.INT, "1", literal},
+ {token.INT, "123456789012345678890", literal},
+ {token.INT, "01234567", literal},
+ {token.INT, "0xcafebabe", literal},
+ {token.FLOAT, "0.", literal},
+ {token.FLOAT, ".0", literal},
+ {token.FLOAT, "3.14159265", literal},
+ {token.FLOAT, "1e0", literal},
+ {token.FLOAT, "1e+100", literal},
+ {token.FLOAT, "1e-100", literal},
+ {token.FLOAT, "2.71828e-1000", literal},
+ {token.IMAG, "0i", literal},
+ {token.IMAG, "1i", literal},
+ {token.IMAG, "012345678901234567889i", literal},
+ {token.IMAG, "123456789012345678890i", literal},
+ {token.IMAG, "0.i", literal},
+ {token.IMAG, ".0i", literal},
+ {token.IMAG, "3.14159265i", literal},
+ {token.IMAG, "1e0i", literal},
+ {token.IMAG, "1e+100i", literal},
+ {token.IMAG, "1e-100i", literal},
+ {token.IMAG, "2.71828e-1000i", literal},
+ {token.CHAR, "'a'", literal},
+ {token.CHAR, "'\\000'", literal},
+ {token.CHAR, "'\\xFF'", literal},
+ {token.CHAR, "'\\uff16'", literal},
+ {token.CHAR, "'\\U0000ff16'", literal},
+ {token.STRING, "`foobar`", literal},
+ {token.STRING, "`" + `foo
bar` +
"`",
literal,
},
// Operators and delimitors
- elt{token.ADD, "+", operator},
- elt{token.SUB, "-", operator},
- elt{token.MUL, "*", operator},
- elt{token.QUO, "/", operator},
- elt{token.REM, "%", operator},
-
- elt{token.AND, "&", operator},
- elt{token.OR, "|", operator},
- elt{token.XOR, "^", operator},
- elt{token.SHL, "<<", operator},
- elt{token.SHR, ">>", operator},
- elt{token.AND_NOT, "&^", operator},
-
- elt{token.ADD_ASSIGN, "+=", operator},
- elt{token.SUB_ASSIGN, "-=", operator},
- elt{token.MUL_ASSIGN, "*=", operator},
- elt{token.QUO_ASSIGN, "/=", operator},
- elt{token.REM_ASSIGN, "%=", operator},
-
- elt{token.AND_ASSIGN, "&=", operator},
- elt{token.OR_ASSIGN, "|=", operator},
- elt{token.XOR_ASSIGN, "^=", operator},
- elt{token.SHL_ASSIGN, "<<=", operator},
- elt{token.SHR_ASSIGN, ">>=", operator},
- elt{token.AND_NOT_ASSIGN, "&^=", operator},
-
- elt{token.LAND, "&&", operator},
- elt{token.LOR, "||", operator},
- elt{token.ARROW, "<-", operator},
- elt{token.INC, "++", operator},
- elt{token.DEC, "--", operator},
-
- elt{token.EQL, "==", operator},
- elt{token.LSS, "<", operator},
- elt{token.GTR, ">", operator},
- elt{token.ASSIGN, "=", operator},
- elt{token.NOT, "!", operator},
-
- elt{token.NEQ, "!=", operator},
- elt{token.LEQ, "<=", operator},
- elt{token.GEQ, ">=", operator},
- elt{token.DEFINE, ":=", operator},
- elt{token.ELLIPSIS, "...", operator},
-
- elt{token.LPAREN, "(", operator},
- elt{token.LBRACK, "[", operator},
- elt{token.LBRACE, "{", operator},
- elt{token.COMMA, ",", operator},
- elt{token.PERIOD, ".", operator},
-
- elt{token.RPAREN, ")", operator},
- elt{token.RBRACK, "]", operator},
- elt{token.RBRACE, "}", operator},
- elt{token.SEMICOLON, ";", operator},
- elt{token.COLON, ":", operator},
+ {token.ADD, "+", operator},
+ {token.SUB, "-", operator},
+ {token.MUL, "*", operator},
+ {token.QUO, "/", operator},
+ {token.REM, "%", operator},
+
+ {token.AND, "&", operator},
+ {token.OR, "|", operator},
+ {token.XOR, "^", operator},
+ {token.SHL, "<<", operator},
+ {token.SHR, ">>", operator},
+ {token.AND_NOT, "&^", operator},
+
+ {token.ADD_ASSIGN, "+=", operator},
+ {token.SUB_ASSIGN, "-=", operator},
+ {token.MUL_ASSIGN, "*=", operator},
+ {token.QUO_ASSIGN, "/=", operator},
+ {token.REM_ASSIGN, "%=", operator},
+
+ {token.AND_ASSIGN, "&=", operator},
+ {token.OR_ASSIGN, "|=", operator},
+ {token.XOR_ASSIGN, "^=", operator},
+ {token.SHL_ASSIGN, "<<=", operator},
+ {token.SHR_ASSIGN, ">>=", operator},
+ {token.AND_NOT_ASSIGN, "&^=", operator},
+
+ {token.LAND, "&&", operator},
+ {token.LOR, "||", operator},
+ {token.ARROW, "<-", operator},
+ {token.INC, "++", operator},
+ {token.DEC, "--", operator},
+
+ {token.EQL, "==", operator},
+ {token.LSS, "<", operator},
+ {token.GTR, ">", operator},
+ {token.ASSIGN, "=", operator},
+ {token.NOT, "!", operator},
+
+ {token.NEQ, "!=", operator},
+ {token.LEQ, "<=", operator},
+ {token.GEQ, ">=", operator},
+ {token.DEFINE, ":=", operator},
+ {token.ELLIPSIS, "...", operator},
+
+ {token.LPAREN, "(", operator},
+ {token.LBRACK, "[", operator},
+ {token.LBRACE, "{", operator},
+ {token.COMMA, ",", operator},
+ {token.PERIOD, ".", operator},
+
+ {token.RPAREN, ")", operator},
+ {token.RBRACK, "]", operator},
+ {token.RBRACE, "}", operator},
+ {token.SEMICOLON, ";", operator},
+ {token.COLON, ":", operator},
// Keywords
- elt{token.BREAK, "break", keyword},
- elt{token.CASE, "case", keyword},
- elt{token.CHAN, "chan", keyword},
- elt{token.CONST, "const", keyword},
- elt{token.CONTINUE, "continue", keyword},
-
- elt{token.DEFAULT, "default", keyword},
- elt{token.DEFER, "defer", keyword},
- elt{token.ELSE, "else", keyword},
- elt{token.FALLTHROUGH, "fallthrough", keyword},
- elt{token.FOR, "for", keyword},
-
- elt{token.FUNC, "func", keyword},
- elt{token.GO, "go", keyword},
- elt{token.GOTO, "goto", keyword},
- elt{token.IF, "if", keyword},
- elt{token.IMPORT, "import", keyword},
-
- elt{token.INTERFACE, "interface", keyword},
- elt{token.MAP, "map", keyword},
- elt{token.PACKAGE, "package", keyword},
- elt{token.RANGE, "range", keyword},
- elt{token.RETURN, "return", keyword},
-
- elt{token.SELECT, "select", keyword},
- elt{token.STRUCT, "struct", keyword},
- elt{token.SWITCH, "switch", keyword},
- elt{token.TYPE, "type", keyword},
- elt{token.VAR, "var", keyword},
+ {token.BREAK, "break", keyword},
+ {token.CASE, "case", keyword},
+ {token.CHAN, "chan", keyword},
+ {token.CONST, "const", keyword},
+ {token.CONTINUE, "continue", keyword},
+
+ {token.DEFAULT, "default", keyword},
+ {token.DEFER, "defer", keyword},
+ {token.ELSE, "else", keyword},
+ {token.FALLTHROUGH, "fallthrough", keyword},
+ {token.FOR, "for", keyword},
+
+ {token.FUNC, "func", keyword},
+ {token.GO, "go", keyword},
+ {token.GOTO, "goto", keyword},
+ {token.IF, "if", keyword},
+ {token.IMPORT, "import", keyword},
+
+ {token.INTERFACE, "interface", keyword},
+ {token.MAP, "map", keyword},
+ {token.PACKAGE, "package", keyword},
+ {token.RANGE, "range", keyword},
+ {token.RETURN, "return", keyword},
+
+ {token.SELECT, "select", keyword},
+ {token.STRUCT, "struct", keyword},
+ {token.SWITCH, "switch", keyword},
+ {token.TYPE, "type", keyword},
+ {token.VAR, "var", keyword},
}
@@ -436,20 +436,20 @@ type seg struct {
var segments = []seg{
// exactly one token per line since the test consumes one token per segment
- seg{" line1", "TestLineComments", 1},
- seg{"\nline2", "TestLineComments", 2},
- seg{"\nline3 //line File1.go:100", "TestLineComments", 3}, // bad line comment, ignored
- seg{"\nline4", "TestLineComments", 4},
- seg{"\n//line File1.go:100\n line100", "File1.go", 100},
- seg{"\n//line File2.go:200\n line200", "File2.go", 200},
- seg{"\n//line :1\n line1", "", 1},
- seg{"\n//line foo:42\n line42", "foo", 42},
- seg{"\n //line foo:42\n line44", "foo", 44}, // bad line comment, ignored
- seg{"\n//line foo 42\n line46", "foo", 46}, // bad line comment, ignored
- seg{"\n//line foo:42 extra text\n line48", "foo", 48}, // bad line comment, ignored
- seg{"\n//line foo:42\n line42", "foo", 42},
- seg{"\n//line foo:42\n line42", "foo", 42},
- seg{"\n//line File1.go:100\n line100", "File1.go", 100},
+ {" line1", "TestLineComments", 1},
+ {"\nline2", "TestLineComments", 2},
+ {"\nline3 //line File1.go:100", "TestLineComments", 3}, // bad line comment, ignored
+ {"\nline4", "TestLineComments", 4},
+ {"\n//line File1.go:100\n line100", "File1.go", 100},
+ {"\n//line File2.go:200\n line200", "File2.go", 200},
+ {"\n//line :1\n line1", "", 1},
+ {"\n//line foo:42\n line42", "foo", 42},
+ {"\n //line foo:42\n line44", "foo", 44}, // bad line comment, ignored
+ {"\n//line foo 42\n line46", "foo", 46}, // bad line comment, ignored
+ {"\n//line foo:42 extra text\n line48", "foo", 48}, // bad line comment, ignored
+ {"\n//line foo:42\n line42", "foo", 42},
+ {"\n//line foo:42\n line42", "foo", 42},
+ {"\n//line File1.go:100\n line100", "File1.go", 100},
}
@@ -612,20 +612,20 @@ type srcerr struct {
}
var errors = []srcerr{
- srcerr{"\"\"", token.STRING, 0, ""},
- srcerr{"\"", token.STRING, 0, "string not terminated"},
- srcerr{"/**/", token.COMMENT, 0, ""},
- srcerr{"/*", token.COMMENT, 0, "comment not terminated"},
- srcerr{"//\n", token.COMMENT, 0, ""},
- srcerr{"//", token.COMMENT, 0, "comment not terminated"},
- srcerr{"077", token.INT, 0, ""},
- srcerr{"078.", token.FLOAT, 0, ""},
- srcerr{"07801234567.", token.FLOAT, 0, ""},
- srcerr{"078e0", token.FLOAT, 0, ""},
- srcerr{"078", token.INT, 0, "illegal octal number"},
- srcerr{"07800000009", token.INT, 0, "illegal octal number"},
- srcerr{"\"abc\x00def\"", token.STRING, 4, "illegal character NUL"},
- srcerr{"\"abc\x80def\"", token.STRING, 4, "illegal UTF-8 encoding"},
+ {"\"\"", token.STRING, 0, ""},
+ {"\"", token.STRING, 0, "string not terminated"},
+ {"/**/", token.COMMENT, 0, ""},
+ {"/*", token.COMMENT, 0, "comment not terminated"},
+ {"//\n", token.COMMENT, 0, ""},
+ {"//", token.COMMENT, 0, "comment not terminated"},
+ {"077", token.INT, 0, ""},
+ {"078.", token.FLOAT, 0, ""},
+ {"07801234567.", token.FLOAT, 0, ""},
+ {"078e0", token.FLOAT, 0, ""},
+ {"078", token.INT, 0, "illegal octal number"},
+ {"07800000009", token.INT, 0, "illegal octal number"},
+ {"\"abc\x00def\"", token.STRING, 4, "illegal character NUL"},
+ {"\"abc\x80def\"", token.STRING, 4, "illegal UTF-8 encoding"},
}
diff --git a/src/pkg/gob/codec_test.go b/src/pkg/gob/codec_test.go
index 47c6a6698f..a7562769a6 100644
--- a/src/pkg/gob/codec_test.go
+++ b/src/pkg/gob/codec_test.go
@@ -21,20 +21,20 @@ type EncodeT struct {
}
var encodeT = []EncodeT{
- EncodeT{0x00, []byte{0x00}},
- EncodeT{0x0F, []byte{0x0F}},
- EncodeT{0xFF, []byte{0xFF, 0xFF}},
- EncodeT{0xFFFF, []byte{0xFE, 0xFF, 0xFF}},
- EncodeT{0xFFFFFF, []byte{0xFD, 0xFF, 0xFF, 0xFF}},
- EncodeT{0xFFFFFFFF, []byte{0xFC, 0xFF, 0xFF, 0xFF, 0xFF}},
- EncodeT{0xFFFFFFFFFF, []byte{0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
- EncodeT{0xFFFFFFFFFFFF, []byte{0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
- EncodeT{0xFFFFFFFFFFFFFF, []byte{0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
- EncodeT{0xFFFFFFFFFFFFFFFF, []byte{0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
- EncodeT{0x1111, []byte{0xFE, 0x11, 0x11}},
- EncodeT{0x1111111111111111, []byte{0xF8, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}},
- EncodeT{0x8888888888888888, []byte{0xF8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88}},
- EncodeT{1 << 63, []byte{0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
+ {0x00, []byte{0x00}},
+ {0x0F, []byte{0x0F}},
+ {0xFF, []byte{0xFF, 0xFF}},
+ {0xFFFF, []byte{0xFE, 0xFF, 0xFF}},
+ {0xFFFFFF, []byte{0xFD, 0xFF, 0xFF, 0xFF}},
+ {0xFFFFFFFF, []byte{0xFC, 0xFF, 0xFF, 0xFF, 0xFF}},
+ {0xFFFFFFFFFF, []byte{0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
+ {0xFFFFFFFFFFFF, []byte{0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
+ {0xFFFFFFFFFFFFFF, []byte{0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
+ {0xFFFFFFFFFFFFFFFF, []byte{0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}},
+ {0x1111, []byte{0xFE, 0x11, 0x11}},
+ {0x1111111111111111, []byte{0xF8, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}},
+ {0x8888888888888888, []byte{0xF8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88}},
+ {1 << 63, []byte{0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
}
// Test basic encode/decode routines for unsigned integers
diff --git a/src/pkg/gob/encoder_test.go b/src/pkg/gob/encoder_test.go
index ea1d2c8681..337efef9dc 100644
--- a/src/pkg/gob/encoder_test.go
+++ b/src/pkg/gob/encoder_test.go
@@ -283,16 +283,16 @@ type SingleTest struct {
}
var singleTests = []SingleTest{
- SingleTest{17, &testInt, ""},
- SingleTest{float32(17.5), &testFloat32, ""},
- SingleTest{"bike shed", &testString, ""},
- SingleTest{[]string{"bike", "shed", "paint", "color"}, &testSlice, ""},
- SingleTest{map[string]int{"seven": 7, "twelve": 12}, &testMap, ""},
- SingleTest{[7]int{4, 55, 0, 0, 0, 0, 0}, &testArray, ""}, // case that once triggered a bug
- SingleTest{[7]int{4, 55, 1, 44, 22, 66, 1234}, &testArray, ""},
+ {17, &testInt, ""},
+ {float32(17.5), &testFloat32, ""},
+ {"bike shed", &testString, ""},
+ {[]string{"bike", "shed", "paint", "color"}, &testSlice, ""},
+ {map[string]int{"seven": 7, "twelve": 12}, &testMap, ""},
+ {[7]int{4, 55, 0, 0, 0, 0, 0}, &testArray, ""}, // case that once triggered a bug
+ {[7]int{4, 55, 1, 44, 22, 66, 1234}, &testArray, ""},
// Decode errors
- SingleTest{172, &testFloat32, "wrong type"},
+ {172, &testFloat32, "wrong type"},
}
func TestSingletons(t *testing.T) {
diff --git a/src/pkg/gob/type_test.go b/src/pkg/gob/type_test.go
index 6acfa7135e..106e4f10b5 100644
--- a/src/pkg/gob/type_test.go
+++ b/src/pkg/gob/type_test.go
@@ -15,12 +15,12 @@ type typeT struct {
}
var basicTypes = []typeT{
- typeT{tBool, "bool"},
- typeT{tInt, "int"},
- typeT{tUint, "uint"},
- typeT{tFloat, "float"},
- typeT{tBytes, "bytes"},
- typeT{tString, "string"},
+ {tBool, "bool"},
+ {tInt, "int"},
+ {tUint, "uint"},
+ {tFloat, "float"},
+ {tBytes, "bytes"},
+ {tString, "string"},
}
func getTypeUnlocked(name string, rt reflect.Type) gobType {
diff --git a/src/pkg/hash/adler32/adler32_test.go b/src/pkg/hash/adler32/adler32_test.go
index cfe9c95476..ffa5569bcd 100644
--- a/src/pkg/hash/adler32/adler32_test.go
+++ b/src/pkg/hash/adler32/adler32_test.go
@@ -15,38 +15,38 @@ type _Adler32Test struct {
}
var golden = []_Adler32Test{
- _Adler32Test{0x1, ""},
- _Adler32Test{0x620062, "a"},
- _Adler32Test{0x12600c4, "ab"},
- _Adler32Test{0x24d0127, "abc"},
- _Adler32Test{0x3d8018b, "abcd"},
- _Adler32Test{0x5c801f0, "abcde"},
- _Adler32Test{0x81e0256, "abcdef"},
- _Adler32Test{0xadb02bd, "abcdefg"},
- _Adler32Test{0xe000325, "abcdefgh"},
- _Adler32Test{0x118e038e, "abcdefghi"},
- _Adler32Test{0x158603f8, "abcdefghij"},
- _Adler32Test{0x3f090f02, "Discard medicine more than two years old."},
- _Adler32Test{0x46d81477, "He who has a shady past knows that nice guys finish last."},
- _Adler32Test{0x40ee0ee1, "I wouldn't marry him with a ten foot pole."},
- _Adler32Test{0x16661315, "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- _Adler32Test{0x5b2e1480, "The days of the digital watch are numbered. -Tom Stoppard"},
- _Adler32Test{0x8c3c09ea, "Nepal premier won't resign."},
- _Adler32Test{0x45ac18fd, "For every action there is an equal and opposite government program."},
- _Adler32Test{0x53c61462, "His money is twice tainted: 'taint yours and 'taint mine."},
- _Adler32Test{0x7e511e63, "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- _Adler32Test{0xe4801a6a, "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- _Adler32Test{0x61b507df, "size: a.out: bad magic"},
- _Adler32Test{0xb8631171, "The major problem is with sendmail. -Mark Horton"},
- _Adler32Test{0x8b5e1904, "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- _Adler32Test{0x7cc6102b, "If the enemy is within range, then so are you."},
- _Adler32Test{0x700318e7, "It's well we cannot hear the screams/That we create in others' dreams."},
- _Adler32Test{0x1e601747, "You remind me of a TV show, but that's all right: I watch it anyway."},
- _Adler32Test{0xb55b0b09, "C is as portable as Stonehedge!!"},
- _Adler32Test{0x39111dd0, "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- _Adler32Test{0x91dd304f, "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- _Adler32Test{0x2e5d1316, "How can you write a big system without C++? -Paul Glick"},
- _Adler32Test{0xd0201df6, "'Invariant assertions' is the most elegant programming technique! -Tom Szymanski"},
+ {0x1, ""},
+ {0x620062, "a"},
+ {0x12600c4, "ab"},
+ {0x24d0127, "abc"},
+ {0x3d8018b, "abcd"},
+ {0x5c801f0, "abcde"},
+ {0x81e0256, "abcdef"},
+ {0xadb02bd, "abcdefg"},
+ {0xe000325, "abcdefgh"},
+ {0x118e038e, "abcdefghi"},
+ {0x158603f8, "abcdefghij"},
+ {0x3f090f02, "Discard medicine more than two years old."},
+ {0x46d81477, "He who has a shady past knows that nice guys finish last."},
+ {0x40ee0ee1, "I wouldn't marry him with a ten foot pole."},
+ {0x16661315, "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {0x5b2e1480, "The days of the digital watch are numbered. -Tom Stoppard"},
+ {0x8c3c09ea, "Nepal premier won't resign."},
+ {0x45ac18fd, "For every action there is an equal and opposite government program."},
+ {0x53c61462, "His money is twice tainted: 'taint yours and 'taint mine."},
+ {0x7e511e63, "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {0xe4801a6a, "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {0x61b507df, "size: a.out: bad magic"},
+ {0xb8631171, "The major problem is with sendmail. -Mark Horton"},
+ {0x8b5e1904, "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {0x7cc6102b, "If the enemy is within range, then so are you."},
+ {0x700318e7, "It's well we cannot hear the screams/That we create in others' dreams."},
+ {0x1e601747, "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {0xb55b0b09, "C is as portable as Stonehedge!!"},
+ {0x39111dd0, "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {0x91dd304f, "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {0x2e5d1316, "How can you write a big system without C++? -Paul Glick"},
+ {0xd0201df6, "'Invariant assertions' is the most elegant programming technique! -Tom Szymanski"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/hash/crc32/crc32_test.go b/src/pkg/hash/crc32/crc32_test.go
index 45ad84be76..cf5743c992 100644
--- a/src/pkg/hash/crc32/crc32_test.go
+++ b/src/pkg/hash/crc32/crc32_test.go
@@ -15,37 +15,37 @@ type test struct {
}
var golden = []test{
- test{0x0, ""},
- test{0xe8b7be43, "a"},
- test{0x9e83486d, "ab"},
- test{0x352441c2, "abc"},
- test{0xed82cd11, "abcd"},
- test{0x8587d865, "abcde"},
- test{0x4b8e39ef, "abcdef"},
- test{0x312a6aa6, "abcdefg"},
- test{0xaeef2a50, "abcdefgh"},
- test{0x8da988af, "abcdefghi"},
- test{0x3981703a, "abcdefghij"},
- test{0x6b9cdfe7, "Discard medicine more than two years old."},
- test{0xc90ef73f, "He who has a shady past knows that nice guys finish last."},
- test{0xb902341f, "I wouldn't marry him with a ten foot pole."},
- test{0x42080e8, "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- test{0x154c6d11, "The days of the digital watch are numbered. -Tom Stoppard"},
- test{0x4c418325, "Nepal premier won't resign."},
- test{0x33955150, "For every action there is an equal and opposite government program."},
- test{0x26216a4b, "His money is twice tainted: 'taint yours and 'taint mine."},
- test{0x1abbe45e, "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- test{0xc89a94f7, "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- test{0xab3abe14, "size: a.out: bad magic"},
- test{0xbab102b6, "The major problem is with sendmail. -Mark Horton"},
- test{0x999149d7, "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- test{0x6d52a33c, "If the enemy is within range, then so are you."},
- test{0x90631e8d, "It's well we cannot hear the screams/That we create in others' dreams."},
- test{0x78309130, "You remind me of a TV show, but that's all right: I watch it anyway."},
- test{0x7d0a377f, "C is as portable as Stonehedge!!"},
- test{0x8c79fd79, "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- test{0xa20b7167, "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- test{0x8e0bb443, "How can you write a big system without C++? -Paul Glick"},
+ {0x0, ""},
+ {0xe8b7be43, "a"},
+ {0x9e83486d, "ab"},
+ {0x352441c2, "abc"},
+ {0xed82cd11, "abcd"},
+ {0x8587d865, "abcde"},
+ {0x4b8e39ef, "abcdef"},
+ {0x312a6aa6, "abcdefg"},
+ {0xaeef2a50, "abcdefgh"},
+ {0x8da988af, "abcdefghi"},
+ {0x3981703a, "abcdefghij"},
+ {0x6b9cdfe7, "Discard medicine more than two years old."},
+ {0xc90ef73f, "He who has a shady past knows that nice guys finish last."},
+ {0xb902341f, "I wouldn't marry him with a ten foot pole."},
+ {0x42080e8, "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {0x154c6d11, "The days of the digital watch are numbered. -Tom Stoppard"},
+ {0x4c418325, "Nepal premier won't resign."},
+ {0x33955150, "For every action there is an equal and opposite government program."},
+ {0x26216a4b, "His money is twice tainted: 'taint yours and 'taint mine."},
+ {0x1abbe45e, "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {0xc89a94f7, "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {0xab3abe14, "size: a.out: bad magic"},
+ {0xbab102b6, "The major problem is with sendmail. -Mark Horton"},
+ {0x999149d7, "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {0x6d52a33c, "If the enemy is within range, then so are you."},
+ {0x90631e8d, "It's well we cannot hear the screams/That we create in others' dreams."},
+ {0x78309130, "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {0x7d0a377f, "C is as portable as Stonehedge!!"},
+ {0x8c79fd79, "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {0xa20b7167, "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {0x8e0bb443, "How can you write a big system without C++? -Paul Glick"},
}
func TestGolden(t *testing.T) {
diff --git a/src/pkg/hash/crc64/crc64_test.go b/src/pkg/hash/crc64/crc64_test.go
index 664e1aeb36..e932524e09 100644
--- a/src/pkg/hash/crc64/crc64_test.go
+++ b/src/pkg/hash/crc64/crc64_test.go
@@ -15,37 +15,37 @@ type test struct {
}
var golden = []test{
- test{0x0, ""},
- test{0x3420000000000000, "a"},
- test{0x36c4200000000000, "ab"},
- test{0x3776c42000000000, "abc"},
- test{0x336776c420000000, "abcd"},
- test{0x32d36776c4200000, "abcde"},
- test{0x3002d36776c42000, "abcdef"},
- test{0x31b002d36776c420, "abcdefg"},
- test{0xe21b002d36776c4, "abcdefgh"},
- test{0x8b6e21b002d36776, "abcdefghi"},
- test{0x7f5b6e21b002d367, "abcdefghij"},
- test{0x8ec0e7c835bf9cdf, "Discard medicine more than two years old."},
- test{0xc7db1759e2be5ab4, "He who has a shady past knows that nice guys finish last."},
- test{0xfbf9d9603a6fa020, "I wouldn't marry him with a ten foot pole."},
- test{0xeafc4211a6daa0ef, "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
- test{0x3e05b21c7a4dc4da, "The days of the digital watch are numbered. -Tom Stoppard"},
- test{0x5255866ad6ef28a6, "Nepal premier won't resign."},
- test{0x8a79895be1e9c361, "For every action there is an equal and opposite government program."},
- test{0x8878963a649d4916, "His money is twice tainted: 'taint yours and 'taint mine."},
- test{0xa7b9d53ea87eb82f, "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
- test{0xdb6805c0966a2f9c, "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
- test{0xf3553c65dacdadd2, "size: a.out: bad magic"},
- test{0x9d5e034087a676b9, "The major problem is with sendmail. -Mark Horton"},
- test{0xa6db2d7f8da96417, "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
- test{0x325e00cd2fe819f9, "If the enemy is within range, then so are you."},
- test{0x88c6600ce58ae4c6, "It's well we cannot hear the screams/That we create in others' dreams."},
- test{0x28c4a3f3b769e078, "You remind me of a TV show, but that's all right: I watch it anyway."},
- test{0xa698a34c9d9f1dca, "C is as portable as Stonehedge!!"},
- test{0xf6c1e2a8c26c5cfc, "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
- test{0xd402559dfe9b70c, "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
- test{0xdb6efff26aa94946, "How can you write a big system without C++? -Paul Glick"},
+ {0x0, ""},
+ {0x3420000000000000, "a"},
+ {0x36c4200000000000, "ab"},
+ {0x3776c42000000000, "abc"},
+ {0x336776c420000000, "abcd"},
+ {0x32d36776c4200000, "abcde"},
+ {0x3002d36776c42000, "abcdef"},
+ {0x31b002d36776c420, "abcdefg"},
+ {0xe21b002d36776c4, "abcdefgh"},
+ {0x8b6e21b002d36776, "abcdefghi"},
+ {0x7f5b6e21b002d367, "abcdefghij"},
+ {0x8ec0e7c835bf9cdf, "Discard medicine more than two years old."},
+ {0xc7db1759e2be5ab4, "He who has a shady past knows that nice guys finish last."},
+ {0xfbf9d9603a6fa020, "I wouldn't marry him with a ten foot pole."},
+ {0xeafc4211a6daa0ef, "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"},
+ {0x3e05b21c7a4dc4da, "The days of the digital watch are numbered. -Tom Stoppard"},
+ {0x5255866ad6ef28a6, "Nepal premier won't resign."},
+ {0x8a79895be1e9c361, "For every action there is an equal and opposite government program."},
+ {0x8878963a649d4916, "His money is twice tainted: 'taint yours and 'taint mine."},
+ {0xa7b9d53ea87eb82f, "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"},
+ {0xdb6805c0966a2f9c, "It's a tiny change to the code and not completely disgusting. - Bob Manchek"},
+ {0xf3553c65dacdadd2, "size: a.out: bad magic"},
+ {0x9d5e034087a676b9, "The major problem is with sendmail. -Mark Horton"},
+ {0xa6db2d7f8da96417, "Give me a rock, paper and scissors and I will move the world. CCFestoon"},
+ {0x325e00cd2fe819f9, "If the enemy is within range, then so are you."},
+ {0x88c6600ce58ae4c6, "It's well we cannot hear the screams/That we create in others' dreams."},
+ {0x28c4a3f3b769e078, "You remind me of a TV show, but that's all right: I watch it anyway."},
+ {0xa698a34c9d9f1dca, "C is as portable as Stonehedge!!"},
+ {0xf6c1e2a8c26c5cfc, "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"},
+ {0xd402559dfe9b70c, "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"},
+ {0xdb6efff26aa94946, "How can you write a big system without C++? -Paul Glick"},
}
var tab = MakeTable(ISO)
diff --git a/src/pkg/html/token_test.go b/src/pkg/html/token_test.go
index 0ab2aac248..5759476eab 100644
--- a/src/pkg/html/token_test.go
+++ b/src/pkg/html/token_test.go
@@ -22,7 +22,7 @@ type tokenTest struct {
var tokenTests = []tokenTest{
// A single text node. The tokenizer should not break text nodes on whitespace,
// nor should it normalize whitespace within a text node.
- tokenTest{
+ {
"text",
"foo bar",
[]string{
@@ -30,7 +30,7 @@ var tokenTests = []tokenTest{
},
},
// An entity.
- tokenTest{
+ {
"entity",
"one &lt; two",
[]string{
@@ -39,7 +39,7 @@ var tokenTests = []tokenTest{
},
// A start, self-closing and end tag. The tokenizer does not care if the start
// and end tokens don't match; that is the job of the parser.
- tokenTest{
+ {
"tags",
"<a>b<c/>d</e>",
[]string{
@@ -51,7 +51,7 @@ var tokenTests = []tokenTest{
},
},
// An attribute with a backslash.
- tokenTest{
+ {
"backslash",
`<p id="a\"b">`,
[]string{
@@ -60,7 +60,7 @@ var tokenTests = []tokenTest{
},
// Entities, tag name and attribute key lower-casing, and whitespace
// normalization within a tag.
- tokenTest{
+ {
"tricky",
"<p \t\n iD=\"a&quot;B\" foo=\"bar\"><EM>te&lt;&amp;;xt</em></p>",
[]string{
@@ -73,7 +73,7 @@ var tokenTests = []tokenTest{
},
// A non-existant entity. Tokenizing and converting back to a string should
// escape the "&" to become "&amp;".
- tokenTest{
+ {
"noSuchEntity",
`<a b="c&noSuchEntity;d">&lt;&alsoDoesntExist;&`,
[]string{
diff --git a/src/pkg/http/lex_test.go b/src/pkg/http/lex_test.go
index 043430cb74..5386f7534d 100644
--- a/src/pkg/http/lex_test.go
+++ b/src/pkg/http/lex_test.go
@@ -15,29 +15,29 @@ type lexTest struct {
}
var lexTests = []lexTest{
- lexTest{
+ {
Raw: `"abc"def,:ghi`,
Parsed: 13,
Result: []string{"abcdef", "ghi"},
},
// My understanding of the RFC is that escape sequences outside of
// quotes are not interpreted?
- lexTest{
+ {
Raw: `"\t"\t"\t"`,
Parsed: 10,
Result: []string{"\t", "t\t"},
},
- lexTest{
+ {
Raw: `"\yab"\r\n`,
Parsed: 10,
Result: []string{"?ab", "r", "n"},
},
- lexTest{
+ {
Raw: "ab\f",
Parsed: 3,
Result: []string{"ab?"},
},
- lexTest{
+ {
Raw: "\"ab \" c,de f, gh, ij\n\t\r",
Parsed: 23,
Result: []string{"ab ", "c", "de", "f", "gh", "ij"},
diff --git a/src/pkg/http/readrequest_test.go b/src/pkg/http/readrequest_test.go
index f3bcc9f3df..067e17ddae 100644
--- a/src/pkg/http/readrequest_test.go
+++ b/src/pkg/http/readrequest_test.go
@@ -20,7 +20,7 @@ type reqTest struct {
var reqTests = []reqTest{
// Baseline test; All Request fields included for template use
- reqTest{
+ {
"GET http://www.techcrunch.com/ HTTP/1.1\r\n" +
"Host: www.techcrunch.com\r\n" +
"User-Agent: Fake\r\n" +
diff --git a/src/pkg/http/request_test.go b/src/pkg/http/request_test.go
index 1029971824..d25e5e5e7e 100644
--- a/src/pkg/http/request_test.go
+++ b/src/pkg/http/request_test.go
@@ -20,15 +20,15 @@ type parseTest struct {
}
var parseTests = []parseTest{
- parseTest{
+ {
query: "a=1&b=2",
out: stringMultimap{"a": []string{"1"}, "b": []string{"2"}},
},
- parseTest{
+ {
query: "a=1&a=2&a=banana",
out: stringMultimap{"a": []string{"1", "2", "banana"}},
},
- parseTest{
+ {
query: "ascii=%3Ckey%3A+0x90%3E",
out: stringMultimap{"ascii": []string{"<key: 0x90>"}},
},
@@ -94,10 +94,10 @@ type parseContentTypeTest struct {
}
var parseContentTypeTests = []parseContentTypeTest{
- parseContentTypeTest{contentType: stringMap{"Content-Type": "text/plain"}},
- parseContentTypeTest{contentType: stringMap{"Content-Type": ""}},
- parseContentTypeTest{contentType: stringMap{"Content-Type": "text/plain; boundary="}},
- parseContentTypeTest{
+ {contentType: stringMap{"Content-Type": "text/plain"}},
+ {contentType: stringMap{"Content-Type": ""}},
+ {contentType: stringMap{"Content-Type": "text/plain; boundary="}},
+ {
contentType: stringMap{"Content-Type": "application/unknown"},
error: true,
},
diff --git a/src/pkg/http/requestwrite_test.go b/src/pkg/http/requestwrite_test.go
index a74d547834..3ceabe4ee7 100644
--- a/src/pkg/http/requestwrite_test.go
+++ b/src/pkg/http/requestwrite_test.go
@@ -16,7 +16,7 @@ type reqWriteTest struct {
var reqWriteTests = []reqWriteTest{
// HTTP/1.1 => chunked coding; no body; no trailer
- reqWriteTest{
+ {
Request{
Method: "GET",
RawURL: "http://www.techcrunch.com/",
@@ -61,7 +61,7 @@ var reqWriteTests = []reqWriteTest{
"Proxy-Connection: keep-alive\r\n\r\n",
},
// HTTP/1.1 => chunked coding; body; empty trailer
- reqWriteTest{
+ {
Request{
Method: "GET",
URL: &URL{
@@ -83,7 +83,7 @@ var reqWriteTests = []reqWriteTest{
"6\r\nabcdef\r\n0\r\n\r\n",
},
// HTTP/1.1 POST => chunked coding; body; empty trailer
- reqWriteTest{
+ {
Request{
Method: "POST",
URL: &URL{
@@ -107,7 +107,7 @@ var reqWriteTests = []reqWriteTest{
"6\r\nabcdef\r\n0\r\n\r\n",
},
// default to HTTP/1.1
- reqWriteTest{
+ {
Request{
Method: "GET",
RawURL: "/search",
diff --git a/src/pkg/http/response_test.go b/src/pkg/http/response_test.go
index 889b770be4..f21587fd46 100644
--- a/src/pkg/http/response_test.go
+++ b/src/pkg/http/response_test.go
@@ -21,7 +21,7 @@ type respTest struct {
var respTests = []respTest{
// Unchunked response without Content-Length.
- respTest{
+ {
"HTTP/1.0 200 OK\r\n" +
"Connection: close\r\n" +
"\r\n" +
@@ -45,7 +45,7 @@ var respTests = []respTest{
},
// Unchunked response with Content-Length.
- respTest{
+ {
"HTTP/1.0 200 OK\r\n" +
"Content-Length: 10\r\n" +
"Connection: close\r\n" +
@@ -71,7 +71,7 @@ var respTests = []respTest{
},
// Chunked response without Content-Length.
- respTest{
+ {
"HTTP/1.0 200 OK\r\n" +
"Transfer-Encoding: chunked\r\n" +
"\r\n" +
@@ -97,7 +97,7 @@ var respTests = []respTest{
},
// Chunked response with Content-Length.
- respTest{
+ {
"HTTP/1.0 200 OK\r\n" +
"Transfer-Encoding: chunked\r\n" +
"Content-Length: 10\r\n" +
diff --git a/src/pkg/http/responsewrite_test.go b/src/pkg/http/responsewrite_test.go
index ba9ad4bebb..9f10be5626 100644
--- a/src/pkg/http/responsewrite_test.go
+++ b/src/pkg/http/responsewrite_test.go
@@ -16,7 +16,7 @@ type respWriteTest struct {
var respWriteTests = []respWriteTest{
// HTTP/1.0, identity coding; no trailer
- respWriteTest{
+ {
Response{
StatusCode: 503,
ProtoMajor: 1,
@@ -32,7 +32,7 @@ var respWriteTests = []respWriteTest{
"abcdef",
},
// Unchunked response without Content-Length.
- respWriteTest{
+ {
Response{
StatusCode: 200,
ProtoMajor: 1,
@@ -47,7 +47,7 @@ var respWriteTests = []respWriteTest{
"abcdef",
},
// HTTP/1.1, chunked coding; empty trailer; close
- respWriteTest{
+ {
Response{
StatusCode: 200,
ProtoMajor: 1,
diff --git a/src/pkg/http/url_test.go b/src/pkg/http/url_test.go
index 7bb36a76e3..8198e5f3e7 100644
--- a/src/pkg/http/url_test.go
+++ b/src/pkg/http/url_test.go
@@ -24,7 +24,7 @@ type URLTest struct {
var urltests = []URLTest{
// no path
- URLTest{
+ {
"http://www.google.com",
&URL{
Raw: "http://www.google.com",
@@ -35,7 +35,7 @@ var urltests = []URLTest{
"",
},
// path
- URLTest{
+ {
"http://www.google.com/",
&URL{
Raw: "http://www.google.com/",
@@ -48,7 +48,7 @@ var urltests = []URLTest{
"",
},
// path with hex escaping
- URLTest{
+ {
"http://www.google.com/file%20one%26two",
&URL{
Raw: "http://www.google.com/file%20one%26two",
@@ -61,7 +61,7 @@ var urltests = []URLTest{
"http://www.google.com/file%20one&two",
},
// user
- URLTest{
+ {
"ftp://webmaster@www.google.com/",
&URL{
Raw: "ftp://webmaster@www.google.com/",
@@ -75,7 +75,7 @@ var urltests = []URLTest{
"",
},
// escape sequence in username
- URLTest{
+ {
"ftp://john%20doe@www.google.com/",
&URL{
Raw: "ftp://john%20doe@www.google.com/",
@@ -89,7 +89,7 @@ var urltests = []URLTest{
"ftp://john%20doe@www.google.com/",
},
// query
- URLTest{
+ {
"http://www.google.com/?q=go+language",
&URL{
Raw: "http://www.google.com/?q=go+language",
@@ -103,7 +103,7 @@ var urltests = []URLTest{
"",
},
// query with hex escaping: NOT parsed
- URLTest{
+ {
"http://www.google.com/?q=go%20language",
&URL{
Raw: "http://www.google.com/?q=go%20language",
@@ -117,7 +117,7 @@ var urltests = []URLTest{
"",
},
// %20 outside query
- URLTest{
+ {
"http://www.google.com/a%20b?q=c+d",
&URL{
Raw: "http://www.google.com/a%20b?q=c+d",
@@ -131,7 +131,7 @@ var urltests = []URLTest{
"",
},
// path without leading /, so no query parsing
- URLTest{
+ {
"http:www.google.com/?q=go+language",
&URL{
Raw: "http:www.google.com/?q=go+language",
@@ -143,7 +143,7 @@ var urltests = []URLTest{
"http:www.google.com/?q=go+language",
},
// path without leading /, so no query parsing
- URLTest{
+ {
"http:%2f%2fwww.google.com/?q=go+language",
&URL{
Raw: "http:%2f%2fwww.google.com/?q=go+language",
@@ -155,7 +155,7 @@ var urltests = []URLTest{
"http:%2f/www.google.com/?q=go+language",
},
// non-authority
- URLTest{
+ {
"mailto:/webmaster@golang.org",
&URL{
Raw: "mailto:/webmaster@golang.org",
@@ -166,7 +166,7 @@ var urltests = []URLTest{
"",
},
// non-authority
- URLTest{
+ {
"mailto:webmaster@golang.org",
&URL{
Raw: "mailto:webmaster@golang.org",
@@ -178,7 +178,7 @@ var urltests = []URLTest{
"",
},
// unescaped :// in query should not create a scheme
- URLTest{
+ {
"/foo?query=http://bad",
&URL{
Raw: "/foo?query=http://bad",
@@ -189,7 +189,7 @@ var urltests = []URLTest{
"",
},
// leading // without scheme shouldn't create an authority
- URLTest{
+ {
"//foo",
&URL{
Raw: "//foo",
@@ -199,7 +199,7 @@ var urltests = []URLTest{
},
"",
},
- URLTest{
+ {
"http://user:password@google.com",
&URL{
Raw: "http://user:password@google.com",
@@ -210,7 +210,7 @@ var urltests = []URLTest{
},
"http://user:******@google.com",
},
- URLTest{
+ {
"http://user:longerpass@google.com",
&URL{
Raw: "http://user:longerpass@google.com",
@@ -224,7 +224,7 @@ var urltests = []URLTest{
}
var urlnofragtests = []URLTest{
- URLTest{
+ {
"http://www.google.com/?q=go+language#foo",
&URL{
Raw: "http://www.google.com/?q=go+language#foo",
@@ -240,7 +240,7 @@ var urlnofragtests = []URLTest{
}
var urlfragtests = []URLTest{
- URLTest{
+ {
"http://www.google.com/?q=go+language#foo",
&URL{
Raw: "http://www.google.com/?q=go+language#foo",
@@ -254,7 +254,7 @@ var urlfragtests = []URLTest{
},
"",
},
- URLTest{
+ {
"http://www.google.com/?q=go+language#foo%26bar",
&URL{
Raw: "http://www.google.com/?q=go+language#foo%26bar",
@@ -333,57 +333,57 @@ type URLEscapeTest struct {
}
var unescapeTests = []URLEscapeTest{
- URLEscapeTest{
+ {
"",
"",
nil,
},
- URLEscapeTest{
+ {
"abc",
"abc",
nil,
},
- URLEscapeTest{
+ {
"1%41",
"1A",
nil,
},
- URLEscapeTest{
+ {
"1%41%42%43",
"1ABC",
nil,
},
- URLEscapeTest{
+ {
"%4a",
"J",
nil,
},
- URLEscapeTest{
+ {
"%6F",
"o",
nil,
},
- URLEscapeTest{
+ {
"%", // not enough characters after %
"",
URLEscapeError("%"),
},
- URLEscapeTest{
+ {
"%a", // not enough characters after %
"",
URLEscapeError("%a"),
},
- URLEscapeTest{
+ {
"%1", // not enough characters after %
"",
URLEscapeError("%1"),
},
- URLEscapeTest{
+ {
"123%45%6", // not enough characters after %
"",
URLEscapeError("%6"),
},
- URLEscapeTest{
+ {
"%zzzzz", // invalid hex digits
"",
URLEscapeError("%zz"),
@@ -400,27 +400,27 @@ func TestURLUnescape(t *testing.T) {
}
var escapeTests = []URLEscapeTest{
- URLEscapeTest{
+ {
"",
"",
nil,
},
- URLEscapeTest{
+ {
"abc",
"abc",
nil,
},
- URLEscapeTest{
+ {
"one two",
"one+two",
nil,
},
- URLEscapeTest{
+ {
"10%",
"10%25",
nil,
},
- URLEscapeTest{
+ {
" ?&=#+%!<>#\"{}|\\^[]`☺\t",
"+%3f%26%3d%23%2b%25!%3c%3e%23%22%7b%7d%7c%5c%5e%5b%5d%60%e2%98%ba%09",
nil,
@@ -448,27 +448,27 @@ type CanonicalPathTest struct {
}
var canonicalTests = []CanonicalPathTest{
- CanonicalPathTest{"", ""},
- CanonicalPathTest{"/", "/"},
- CanonicalPathTest{".", ""},
- CanonicalPathTest{"./", ""},
- CanonicalPathTest{"/a/", "/a/"},
- CanonicalPathTest{"a/", "a/"},
- CanonicalPathTest{"a/./", "a/"},
- CanonicalPathTest{"./a", "a"},
- CanonicalPathTest{"/a/../b", "/b"},
- CanonicalPathTest{"a/../b", "b"},
- CanonicalPathTest{"a/../../b", "../b"},
- CanonicalPathTest{"a/.", "a/"},
- CanonicalPathTest{"../.././a", "../../a"},
- CanonicalPathTest{"/../.././a", "/../../a"},
- CanonicalPathTest{"a/b/g/../..", "a/"},
- CanonicalPathTest{"a/b/..", "a/"},
- CanonicalPathTest{"a/b/.", "a/b/"},
- CanonicalPathTest{"a/b/../../../..", "../.."},
- CanonicalPathTest{"a./", "a./"},
- CanonicalPathTest{"/../a/b/../../../", "/../../"},
- CanonicalPathTest{"../a/b/../../../", "../../"},
+ {"", ""},
+ {"/", "/"},
+ {".", ""},
+ {"./", ""},
+ {"/a/", "/a/"},
+ {"a/", "a/"},
+ {"a/./", "a/"},
+ {"./a", "a"},
+ {"/a/../b", "/b"},
+ {"a/../b", "b"},
+ {"a/../../b", "../b"},
+ {"a/.", "a/"},
+ {"../.././a", "../../a"},
+ {"/../.././a", "/../../a"},
+ {"a/b/g/../..", "a/"},
+ {"a/b/..", "a/"},
+ {"a/b/.", "a/b/"},
+ {"a/b/../../../..", "../.."},
+ {"a./", "a./"},
+ {"/../a/b/../../../", "/../../"},
+ {"../a/b/../../../", "../../"},
}
func TestCanonicalPath(t *testing.T) {
@@ -487,8 +487,8 @@ type UserinfoTest struct {
}
var userinfoTests = []UserinfoTest{
- UserinfoTest{"user", "password", "user:password"},
- UserinfoTest{"foo:bar", "~!@#$%^&*()_+{}|[]\\-=`:;'\"<>?,./",
+ {"user", "password", "user:password"},
+ {"foo:bar", "~!@#$%^&*()_+{}|[]\\-=`:;'\"<>?,./",
"foo%3abar:~!%40%23$%25%5e&*()_+%7b%7d%7c%5b%5d%5c-=%60%3a;'%22%3c%3e?,.%2f"},
}
diff --git a/src/pkg/index/suffixarray/suffixarray_test.go b/src/pkg/index/suffixarray/suffixarray_test.go
index 7352b08e53..8280750edd 100644
--- a/src/pkg/index/suffixarray/suffixarray_test.go
+++ b/src/pkg/index/suffixarray/suffixarray_test.go
@@ -20,7 +20,7 @@ type testCase struct {
var testCases = []testCase{
- testCase{
+ {
"empty string",
"",
[]string{
@@ -29,7 +29,7 @@ var testCases = []testCase{
},
},
- testCase{
+ {
"all a's",
"aaaaaaaaaa", // 10 a's
[]string{
@@ -48,7 +48,7 @@ var testCases = []testCase{
},
},
- testCase{
+ {
"abc",
"abc",
[]string{
@@ -61,7 +61,7 @@ var testCases = []testCase{
},
},
- testCase{
+ {
"barbara*3",
"barbarabarbarabarbara",
[]string{
@@ -73,7 +73,7 @@ var testCases = []testCase{
},
},
- testCase{
+ {
"typing drill",
"Now is the time for all good men to come to the aid of their country.",
[]string{
diff --git a/src/pkg/io/pipe_test.go b/src/pkg/io/pipe_test.go
index 902d7a0a3f..bd4b94f0ad 100644
--- a/src/pkg/io/pipe_test.go
+++ b/src/pkg/io/pipe_test.go
@@ -157,12 +157,12 @@ func (p pipeTest) String() string {
}
var pipeTests = []pipeTest{
- pipeTest{true, nil, false},
- pipeTest{true, nil, true},
- pipeTest{true, ErrShortWrite, true},
- pipeTest{false, nil, false},
- pipeTest{false, nil, true},
- pipeTest{false, ErrShortWrite, true},
+ {true, nil, false},
+ {true, nil, true},
+ {true, ErrShortWrite, true},
+ {false, nil, false},
+ {false, nil, true},
+ {false, ErrShortWrite, true},
}
func delayClose(t *testing.T, cl closer, ch chan int, tt pipeTest) {
diff --git a/src/pkg/json/decode_test.go b/src/pkg/json/decode_test.go
index d2aa8ab64a..c7d176a581 100644
--- a/src/pkg/json/decode_test.go
+++ b/src/pkg/json/decode_test.go
@@ -32,30 +32,30 @@ type unmarshalTest struct {
var unmarshalTests = []unmarshalTest{
// basic types
- unmarshalTest{`true`, new(bool), true, nil},
- unmarshalTest{`1`, new(int), 1, nil},
- unmarshalTest{`1.2`, new(float), 1.2, nil},
- unmarshalTest{`-5`, new(int16), int16(-5), nil},
- unmarshalTest{`"a\u1234"`, new(string), "a\u1234", nil},
- unmarshalTest{`"http:\/\/"`, new(string), "http://", nil},
- unmarshalTest{`"g-clef: \uD834\uDD1E"`, new(string), "g-clef: \U0001D11E", nil},
- unmarshalTest{`"invalid: \uD834x\uDD1E"`, new(string), "invalid: \uFFFDx\uFFFD", nil},
- unmarshalTest{"null", new(interface{}), nil, nil},
- unmarshalTest{`{"X": [1,2,3], "Y": 4}`, new(T), T{Y: 4}, &UnmarshalTypeError{"array", reflect.Typeof("")}},
- unmarshalTest{`{"x": 1}`, new(tx), tx{}, &UnmarshalFieldError{"x", txType, txType.Field(0)}},
+ {`true`, new(bool), true, nil},
+ {`1`, new(int), 1, nil},
+ {`1.2`, new(float), 1.2, nil},
+ {`-5`, new(int16), int16(-5), nil},
+ {`"a\u1234"`, new(string), "a\u1234", nil},
+ {`"http:\/\/"`, new(string), "http://", nil},
+ {`"g-clef: \uD834\uDD1E"`, new(string), "g-clef: \U0001D11E", nil},
+ {`"invalid: \uD834x\uDD1E"`, new(string), "invalid: \uFFFDx\uFFFD", nil},
+ {"null", new(interface{}), nil, nil},
+ {`{"X": [1,2,3], "Y": 4}`, new(T), T{Y: 4}, &UnmarshalTypeError{"array", reflect.Typeof("")}},
+ {`{"x": 1}`, new(tx), tx{}, &UnmarshalFieldError{"x", txType, txType.Field(0)}},
// syntax errors
- unmarshalTest{`{"X": "foo", "Y"}`, nil, nil, SyntaxError("invalid character '}' after object key")},
+ {`{"X": "foo", "Y"}`, nil, nil, SyntaxError("invalid character '}' after object key")},
// composite tests
- unmarshalTest{allValueIndent, new(All), allValue, nil},
- unmarshalTest{allValueCompact, new(All), allValue, nil},
- unmarshalTest{allValueIndent, new(*All), &allValue, nil},
- unmarshalTest{allValueCompact, new(*All), &allValue, nil},
- unmarshalTest{pallValueIndent, new(All), pallValue, nil},
- unmarshalTest{pallValueCompact, new(All), pallValue, nil},
- unmarshalTest{pallValueIndent, new(*All), &pallValue, nil},
- unmarshalTest{pallValueCompact, new(*All), &pallValue, nil},
+ {allValueIndent, new(All), allValue, nil},
+ {allValueCompact, new(All), allValue, nil},
+ {allValueIndent, new(*All), &allValue, nil},
+ {allValueCompact, new(*All), &allValue, nil},
+ {pallValueIndent, new(All), pallValue, nil},
+ {pallValueCompact, new(All), pallValue, nil},
+ {pallValueIndent, new(*All), &pallValue, nil},
+ {pallValueCompact, new(*All), &pallValue, nil},
}
func TestMarshal(t *testing.T) {
@@ -259,15 +259,15 @@ var allValue = All{
Foo: "foo",
String: "16",
Map: map[string]Small{
- "17": Small{Tag: "tag17"},
- "18": Small{Tag: "tag18"},
+ "17": {Tag: "tag17"},
+ "18": {Tag: "tag18"},
},
MapP: map[string]*Small{
"19": &Small{Tag: "tag19"},
"20": nil,
},
EmptyMap: map[string]Small{},
- Slice: []Small{Small{Tag: "tag20"}, Small{Tag: "tag21"}},
+ Slice: []Small{{Tag: "tag20"}, {Tag: "tag21"}},
SliceP: []*Small{&Small{Tag: "tag22"}, nil, &Small{Tag: "tag23"}},
EmptySlice: []Small{},
StringSlice: []string{"str24", "str25", "str26"},
diff --git a/src/pkg/json/scanner_test.go b/src/pkg/json/scanner_test.go
index cdc032263e..82d520b633 100644
--- a/src/pkg/json/scanner_test.go
+++ b/src/pkg/json/scanner_test.go
@@ -19,14 +19,14 @@ type example struct {
}
var examples = []example{
- example{`1`, `1`},
- example{`{}`, `{}`},
- example{`[]`, `[]`},
- example{`{"":2}`, "{\n\t\"\": 2\n}"},
- example{`[3]`, "[\n\t3\n]"},
- example{`[1,2,3]`, "[\n\t1,\n\t2,\n\t3\n]"},
- example{`{"x":1}`, "{\n\t\"x\": 1\n}"},
- example{ex1, ex1i},
+ {`1`, `1`},
+ {`{}`, `{}`},
+ {`[]`, `[]`},
+ {`{"":2}`, "{\n\t\"\": 2\n}"},
+ {`[3]`, "[\n\t3\n]"},
+ {`[1,2,3]`, "[\n\t1,\n\t2,\n\t3\n]"},
+ {`{"x":1}`, "{\n\t\"x\": 1\n}"},
+ {ex1, ex1i},
}
var ex1 = `[true,false,null,"x",1,1.5,0,-5e+2]`
diff --git a/src/pkg/log/log_test.go b/src/pkg/log/log_test.go
index 67c0452dc3..f99070afb4 100644
--- a/src/pkg/log/log_test.go
+++ b/src/pkg/log/log_test.go
@@ -30,18 +30,18 @@ type tester struct {
var tests = []tester{
// individual pieces:
- tester{0, "", ""},
- tester{0, "XXX", "XXX"},
- tester{Ldate, "", Rdate + " "},
- tester{Ltime, "", Rtime + " "},
- tester{Ltime | Lmicroseconds, "", Rtime + Rmicroseconds + " "},
- tester{Lmicroseconds, "", Rtime + Rmicroseconds + " "}, // microsec implies time
- tester{Llongfile, "", Rlongfile + " "},
- tester{Lshortfile, "", Rshortfile + " "},
- tester{Llongfile | Lshortfile, "", Rshortfile + " "}, // shortfile overrides longfile
+ {0, "", ""},
+ {0, "XXX", "XXX"},
+ {Ldate, "", Rdate + " "},
+ {Ltime, "", Rtime + " "},
+ {Ltime | Lmicroseconds, "", Rtime + Rmicroseconds + " "},
+ {Lmicroseconds, "", Rtime + Rmicroseconds + " "}, // microsec implies time
+ {Llongfile, "", Rlongfile + " "},
+ {Lshortfile, "", Rshortfile + " "},
+ {Llongfile | Lshortfile, "", Rshortfile + " "}, // shortfile overrides longfile
// everything at once:
- tester{Ldate | Ltime | Lmicroseconds | Llongfile, "XXX", "XXX" + Rdate + " " + Rtime + Rmicroseconds + " " + Rlongfile + " "},
- tester{Ldate | Ltime | Lmicroseconds | Lshortfile, "XXX", "XXX" + Rdate + " " + Rtime + Rmicroseconds + " " + Rshortfile + " "},
+ {Ldate | Ltime | Lmicroseconds | Llongfile, "XXX", "XXX" + Rdate + " " + Rtime + Rmicroseconds + " " + Rlongfile + " "},
+ {Ldate | Ltime | Lmicroseconds | Lshortfile, "XXX", "XXX" + Rdate + " " + Rtime + Rmicroseconds + " " + Rshortfile + " "},
}
// Test using Println("hello", 23, "world") or using Printf("hello %d world", 23)
diff --git a/src/pkg/math/all_test.go b/src/pkg/math/all_test.go
index 8a60bca01d..7a612808ff 100644
--- a/src/pkg/math/all_test.go
+++ b/src/pkg/math/all_test.go
@@ -287,16 +287,16 @@ type fi struct {
}
var frexp = []fi{
- fi{6.2237649061045918750e-01, 3},
- fi{9.6735905932226306250e-01, 3},
- fi{-5.5376011438400318000e-01, -1},
- fi{-6.2632545228388436250e-01, 3},
- fi{6.02268356699901081250e-01, 4},
- fi{7.3159430981099115000e-01, 2},
- fi{6.5363542893241332500e-01, 3},
- fi{6.8198497760900255000e-01, 2},
- fi{9.1265404584042750000e-01, 1},
- fi{-5.4287029803597508250e-01, 4},
+ {6.2237649061045918750e-01, 3},
+ {9.6735905932226306250e-01, 3},
+ {-5.5376011438400318000e-01, -1},
+ {-6.2632545228388436250e-01, 3},
+ {6.02268356699901081250e-01, 4},
+ {7.3159430981099115000e-01, 2},
+ {6.5363542893241332500e-01, 3},
+ {6.8198497760900255000e-01, 2},
+ {9.1265404584042750000e-01, 1},
+ {-5.4287029803597508250e-01, 4},
}
var gamma = []float64{
2.3254348370739963835386613898e+01,
@@ -359,16 +359,16 @@ var jM3 = []float64{
-2.3762660886100206491674503e-01,
}
var lgamma = []fi{
- fi{3.146492141244545774319734e+00, 1},
- fi{8.003414490659126375852113e+00, 1},
- fi{1.517575735509779707488106e+00, -1},
- fi{-2.588480028182145853558748e-01, 1},
- fi{1.1989897050205555002007985e+01, 1},
- fi{6.262899811091257519386906e-01, 1},
- fi{3.5287924899091566764846037e+00, 1},
- fi{4.5725644770161182299423372e-01, 1},
- fi{-6.363667087767961257654854e-02, 1},
- fi{-1.077385130910300066425564e+01, -1},
+ {3.146492141244545774319734e+00, 1},
+ {8.003414490659126375852113e+00, 1},
+ {1.517575735509779707488106e+00, -1},
+ {-2.588480028182145853558748e-01, 1},
+ {1.1989897050205555002007985e+01, 1},
+ {6.262899811091257519386906e-01, 1},
+ {3.5287924899091566764846037e+00, 1},
+ {4.5725644770161182299423372e-01, 1},
+ {-6.363667087767961257654854e-02, 1},
+ {-1.077385130910300066425564e+01, -1},
}
var log = []float64{
1.605231462693062999102599e+00,
@@ -431,16 +431,16 @@ var log2 = []float64{
3.118679457227342224364709e+00,
}
var modf = [][2]float64{
- [2]float64{4.0000000000000000e+00, 9.7901192488367350108546816e-01},
- [2]float64{7.0000000000000000e+00, 7.3887247457810456552351752e-01},
- [2]float64{0.0000000000000000e+00, -2.7688005719200159404635997e-01},
- [2]float64{-5.0000000000000000e+00, -1.060361827107492160848778e-02},
- [2]float64{9.0000000000000000e+00, 6.3629370719841737980004837e-01},
- [2]float64{2.0000000000000000e+00, 9.2637723924396464525443662e-01},
- [2]float64{5.0000000000000000e+00, 2.2908343145930665230025625e-01},
- [2]float64{2.0000000000000000e+00, 7.2793991043601025126008608e-01},
- [2]float64{1.0000000000000000e+00, 8.2530809168085506044576505e-01},
- [2]float64{-8.0000000000000000e+00, -6.8592476857560136238589621e-01},
+ {4.0000000000000000e+00, 9.7901192488367350108546816e-01},
+ {7.0000000000000000e+00, 7.3887247457810456552351752e-01},
+ {0.0000000000000000e+00, -2.7688005719200159404635997e-01},
+ {-5.0000000000000000e+00, -1.060361827107492160848778e-02},
+ {9.0000000000000000e+00, 6.3629370719841737980004837e-01},
+ {2.0000000000000000e+00, 9.2637723924396464525443662e-01},
+ {5.0000000000000000e+00, 2.2908343145930665230025625e-01},
+ {2.0000000000000000e+00, 7.2793991043601025126008608e-01},
+ {1.0000000000000000e+00, 8.2530809168085506044576505e-01},
+ {-8.0000000000000000e+00, -6.8592476857560136238589621e-01},
}
var nextafter = []float64{
4.97901192488367438926388786e+00,
@@ -708,41 +708,41 @@ var atanhSC = []float64{
NaN(),
}
var vfatan2SC = [][2]float64{
- [2]float64{Inf(-1), Inf(-1)},
- [2]float64{Inf(-1), -Pi},
- [2]float64{Inf(-1), 0},
- [2]float64{Inf(-1), +Pi},
- [2]float64{Inf(-1), Inf(1)},
- [2]float64{Inf(-1), NaN()},
- [2]float64{-Pi, Inf(-1)},
- [2]float64{-Pi, 0},
- [2]float64{-Pi, Inf(1)},
- [2]float64{-Pi, NaN()},
- [2]float64{Copysign(0, -1), Inf(-1)},
- [2]float64{Copysign(0, -1), -Pi},
- [2]float64{Copysign(0, -1), Copysign(0, -1)},
- [2]float64{Copysign(0, -1), 0},
- [2]float64{Copysign(0, -1), +Pi},
- [2]float64{Copysign(0, -1), Inf(1)},
- [2]float64{Copysign(0, -1), NaN()},
- [2]float64{0, Inf(-1)},
- [2]float64{0, -Pi},
- [2]float64{0, Copysign(0, -1)},
- [2]float64{0, 0},
- [2]float64{0, +Pi},
- [2]float64{0, Inf(1)},
- [2]float64{0, NaN()},
- [2]float64{+Pi, Inf(-1)},
- [2]float64{+Pi, 0},
- [2]float64{+Pi, Inf(1)},
- [2]float64{+Pi, NaN()},
- [2]float64{Inf(1), Inf(-1)},
- [2]float64{Inf(1), -Pi},
- [2]float64{Inf(1), 0},
- [2]float64{Inf(1), +Pi},
- [2]float64{Inf(1), Inf(1)},
- [2]float64{Inf(1), NaN()},
- [2]float64{NaN(), NaN()},
+ {Inf(-1), Inf(-1)},
+ {Inf(-1), -Pi},
+ {Inf(-1), 0},
+ {Inf(-1), +Pi},
+ {Inf(-1), Inf(1)},
+ {Inf(-1), NaN()},
+ {-Pi, Inf(-1)},
+ {-Pi, 0},
+ {-Pi, Inf(1)},
+ {-Pi, NaN()},
+ {Copysign(0, -1), Inf(-1)},
+ {Copysign(0, -1), -Pi},
+ {Copysign(0, -1), Copysign(0, -1)},
+ {Copysign(0, -1), 0},
+ {Copysign(0, -1), +Pi},
+ {Copysign(0, -1), Inf(1)},
+ {Copysign(0, -1), NaN()},
+ {0, Inf(-1)},
+ {0, -Pi},
+ {0, Copysign(0, -1)},
+ {0, 0},
+ {0, +Pi},
+ {0, Inf(1)},
+ {0, NaN()},
+ {+Pi, Inf(-1)},
+ {+Pi, 0},
+ {+Pi, Inf(1)},
+ {+Pi, NaN()},
+ {Inf(1), Inf(-1)},
+ {Inf(1), -Pi},
+ {Inf(1), 0},
+ {Inf(1), +Pi},
+ {Inf(1), Inf(1)},
+ {Inf(1), NaN()},
+ {NaN(), NaN()},
}
var atan2SC = []float64{
-3 * Pi / 4, // atan2(-Inf, -Inf)
@@ -921,40 +921,40 @@ var fabsSC = []float64{
}
var vffmodSC = [][2]float64{
- [2]float64{Inf(-1), Inf(-1)},
- [2]float64{Inf(-1), -Pi},
- [2]float64{Inf(-1), 0},
- [2]float64{Inf(-1), Pi},
- [2]float64{Inf(-1), Inf(1)},
- [2]float64{Inf(-1), NaN()},
- [2]float64{-Pi, Inf(-1)},
- [2]float64{-Pi, 0},
- [2]float64{-Pi, Inf(1)},
- [2]float64{-Pi, NaN()},
- [2]float64{Copysign(0, -1), Inf(-1)},
- [2]float64{Copysign(0, -1), 0},
- [2]float64{Copysign(0, -1), Inf(1)},
- [2]float64{Copysign(0, -1), NaN()},
- [2]float64{0, Inf(-1)},
- [2]float64{0, 0},
- [2]float64{0, Inf(1)},
- [2]float64{0, NaN()},
- [2]float64{Pi, Inf(-1)},
- [2]float64{Pi, 0},
- [2]float64{Pi, Inf(1)},
- [2]float64{Pi, NaN()},
- [2]float64{Inf(1), Inf(-1)},
- [2]float64{Inf(1), -Pi},
- [2]float64{Inf(1), 0},
- [2]float64{Inf(1), Pi},
- [2]float64{Inf(1), Inf(1)},
- [2]float64{Inf(1), NaN()},
- [2]float64{NaN(), Inf(-1)},
- [2]float64{NaN(), -Pi},
- [2]float64{NaN(), 0},
- [2]float64{NaN(), Pi},
- [2]float64{NaN(), Inf(1)},
- [2]float64{NaN(), NaN()},
+ {Inf(-1), Inf(-1)},
+ {Inf(-1), -Pi},
+ {Inf(-1), 0},
+ {Inf(-1), Pi},
+ {Inf(-1), Inf(1)},
+ {Inf(-1), NaN()},
+ {-Pi, Inf(-1)},
+ {-Pi, 0},
+ {-Pi, Inf(1)},
+ {-Pi, NaN()},
+ {Copysign(0, -1), Inf(-1)},
+ {Copysign(0, -1), 0},
+ {Copysign(0, -1), Inf(1)},
+ {Copysign(0, -1), NaN()},
+ {0, Inf(-1)},
+ {0, 0},
+ {0, Inf(1)},
+ {0, NaN()},
+ {Pi, Inf(-1)},
+ {Pi, 0},
+ {Pi, Inf(1)},
+ {Pi, NaN()},
+ {Inf(1), Inf(-1)},
+ {Inf(1), -Pi},
+ {Inf(1), 0},
+ {Inf(1), Pi},
+ {Inf(1), Inf(1)},
+ {Inf(1), NaN()},
+ {NaN(), Inf(-1)},
+ {NaN(), -Pi},
+ {NaN(), 0},
+ {NaN(), Pi},
+ {NaN(), Inf(1)},
+ {NaN(), NaN()},
}
var fmodSC = []float64{
NaN(), // fmod(-Inf, -Inf)
@@ -1001,11 +1001,11 @@ var vffrexpSC = []float64{
NaN(),
}
var frexpSC = []fi{
- fi{Inf(-1), 0},
- fi{Copysign(0, -1), 0},
- fi{0, 0},
- fi{Inf(1), 0},
- fi{NaN(), 0},
+ {Inf(-1), 0},
+ {Copysign(0, -1), 0},
+ {0, 0},
+ {Inf(1), 0},
+ {NaN(), 0},
}
var vfgammaSC = []float64{
@@ -1026,25 +1026,25 @@ var gammaSC = []float64{
}
var vfhypotSC = [][2]float64{
- [2]float64{Inf(-1), Inf(-1)},
- [2]float64{Inf(-1), 0},
- [2]float64{Inf(-1), Inf(1)},
- [2]float64{Inf(-1), NaN()},
- [2]float64{Copysign(0, -1), Copysign(0, -1)},
- [2]float64{Copysign(0, -1), 0},
- [2]float64{0, Copysign(0, -1)},
- [2]float64{0, 0}, // +0, +0
- [2]float64{0, Inf(-1)},
- [2]float64{0, Inf(1)},
- [2]float64{0, NaN()},
- [2]float64{Inf(1), Inf(-1)},
- [2]float64{Inf(1), 0},
- [2]float64{Inf(1), Inf(1)},
- [2]float64{Inf(1), NaN()},
- [2]float64{NaN(), Inf(-1)},
- [2]float64{NaN(), 0},
- [2]float64{NaN(), Inf(1)},
- [2]float64{NaN(), NaN()},
+ {Inf(-1), Inf(-1)},
+ {Inf(-1), 0},
+ {Inf(-1), Inf(1)},
+ {Inf(-1), NaN()},
+ {Copysign(0, -1), Copysign(0, -1)},
+ {Copysign(0, -1), 0},
+ {0, Copysign(0, -1)},
+ {0, 0}, // +0, +0
+ {0, Inf(-1)},
+ {0, Inf(1)},
+ {0, NaN()},
+ {Inf(1), Inf(-1)},
+ {Inf(1), 0},
+ {Inf(1), Inf(1)},
+ {Inf(1), NaN()},
+ {NaN(), Inf(-1)},
+ {NaN(), 0},
+ {NaN(), Inf(1)},
+ {NaN(), NaN()},
}
var hypotSC = []float64{
Inf(1),
@@ -1122,13 +1122,13 @@ var vflgammaSC = []float64{
NaN(),
}
var lgammaSC = []fi{
- fi{Inf(-1), 1},
- fi{Inf(1), 1},
- fi{Inf(1), 1},
- fi{0, 1},
- fi{0, 1},
- fi{Inf(1), 1},
- fi{NaN(), 1},
+ {Inf(-1), 1},
+ {Inf(1), 1},
+ {Inf(1), 1},
+ {0, 1},
+ {0, 1},
+ {Inf(1), 1},
+ {NaN(), 1},
}
var vflogSC = []float64{
@@ -1188,15 +1188,15 @@ var vfmodfSC = []float64{
NaN(),
}
var modfSC = [][2]float64{
- [2]float64{Inf(-1), NaN()}, // [2]float64{Copysign(0, -1), Inf(-1)},
- [2]float64{Inf(1), NaN()}, // [2]float64{0, Inf(1)},
- [2]float64{NaN(), NaN()},
+ {Inf(-1), NaN()}, // [2]float64{Copysign(0, -1), Inf(-1)},
+ {Inf(1), NaN()}, // [2]float64{0, Inf(1)},
+ {NaN(), NaN()},
}
var vfnextafterSC = [][2]float64{
- [2]float64{0, NaN()},
- [2]float64{NaN(), 0},
- [2]float64{NaN(), NaN()},
+ {0, NaN()},
+ {NaN(), 0},
+ {NaN(), NaN()},
}
var nextafterSC = []float64{
NaN(),
@@ -1205,70 +1205,70 @@ var nextafterSC = []float64{
}
var vfpowSC = [][2]float64{
- [2]float64{Inf(-1), -Pi},
- [2]float64{Inf(-1), -3},
- [2]float64{Inf(-1), Copysign(0, -1)},
- [2]float64{Inf(-1), 0},
- [2]float64{Inf(-1), 1},
- [2]float64{Inf(-1), 3},
- [2]float64{Inf(-1), Pi},
- [2]float64{Inf(-1), NaN()},
-
- [2]float64{-Pi, Inf(-1)},
- [2]float64{-Pi, -Pi},
- [2]float64{-Pi, Copysign(0, -1)},
- [2]float64{-Pi, 0},
- [2]float64{-Pi, 1},
- [2]float64{-Pi, Pi},
- [2]float64{-Pi, Inf(1)},
- [2]float64{-Pi, NaN()},
-
- [2]float64{-1, Inf(-1)},
- [2]float64{-1, Inf(1)},
- [2]float64{-1, NaN()},
- [2]float64{-1 / 2, Inf(-1)},
- [2]float64{-1 / 2, Inf(1)},
- [2]float64{Copysign(0, -1), Inf(-1)},
- [2]float64{Copysign(0, -1), -Pi},
- [2]float64{Copysign(0, -1), -3},
- [2]float64{Copysign(0, -1), 3},
- [2]float64{Copysign(0, -1), Pi},
- [2]float64{Copysign(0, -1), Inf(1)},
-
- [2]float64{0, Inf(-1)},
- [2]float64{0, -Pi},
- [2]float64{0, -3},
- [2]float64{0, Copysign(0, -1)},
- [2]float64{0, 0},
- [2]float64{0, 3},
- [2]float64{0, Pi},
- [2]float64{0, Inf(1)},
- [2]float64{0, NaN()},
-
- [2]float64{1 / 2, Inf(-1)},
- [2]float64{1 / 2, Inf(1)},
- [2]float64{1, Inf(-1)},
- [2]float64{1, Inf(1)},
- [2]float64{1, NaN()},
-
- [2]float64{Pi, Inf(-1)},
- [2]float64{Pi, Copysign(0, -1)},
- [2]float64{Pi, 0},
- [2]float64{Pi, 1},
- [2]float64{Pi, Inf(1)},
- [2]float64{Pi, NaN()},
- [2]float64{Inf(1), -Pi},
- [2]float64{Inf(1), Copysign(0, -1)},
- [2]float64{Inf(1), 0},
- [2]float64{Inf(1), 1},
- [2]float64{Inf(1), Pi},
- [2]float64{Inf(1), NaN()},
- [2]float64{NaN(), -Pi},
- [2]float64{NaN(), Copysign(0, -1)},
- [2]float64{NaN(), 0},
- [2]float64{NaN(), 1},
- [2]float64{NaN(), Pi},
- [2]float64{NaN(), NaN()},
+ {Inf(-1), -Pi},
+ {Inf(-1), -3},
+ {Inf(-1), Copysign(0, -1)},
+ {Inf(-1), 0},
+ {Inf(-1), 1},
+ {Inf(-1), 3},
+ {Inf(-1), Pi},
+ {Inf(-1), NaN()},
+
+ {-Pi, Inf(-1)},
+ {-Pi, -Pi},
+ {-Pi, Copysign(0, -1)},
+ {-Pi, 0},
+ {-Pi, 1},
+ {-Pi, Pi},
+ {-Pi, Inf(1)},
+ {-Pi, NaN()},
+
+ {-1, Inf(-1)},
+ {-1, Inf(1)},
+ {-1, NaN()},
+ {-1 / 2, Inf(-1)},
+ {-1 / 2, Inf(1)},
+ {Copysign(0, -1), Inf(-1)},
+ {Copysign(0, -1), -Pi},
+ {Copysign(0, -1), -3},
+ {Copysign(0, -1), 3},
+ {Copysign(0, -1), Pi},
+ {Copysign(0, -1), Inf(1)},
+
+ {0, Inf(-1)},
+ {0, -Pi},
+ {0, -3},
+ {0, Copysign(0, -1)},
+ {0, 0},
+ {0, 3},
+ {0, Pi},
+ {0, Inf(1)},
+ {0, NaN()},
+
+ {1 / 2, Inf(-1)},
+ {1 / 2, Inf(1)},
+ {1, Inf(-1)},
+ {1, Inf(1)},
+ {1, NaN()},
+
+ {Pi, Inf(-1)},
+ {Pi, Copysign(0, -1)},
+ {Pi, 0},
+ {Pi, 1},
+ {Pi, Inf(1)},
+ {Pi, NaN()},
+ {Inf(1), -Pi},
+ {Inf(1), Copysign(0, -1)},
+ {Inf(1), 0},
+ {Inf(1), 1},
+ {Inf(1), Pi},
+ {Inf(1), NaN()},
+ {NaN(), -Pi},
+ {NaN(), Copysign(0, -1)},
+ {NaN(), 0},
+ {NaN(), 1},
+ {NaN(), Pi},
+ {NaN(), NaN()},
}
var powSC = []float64{
0, // pow(-Inf, -Pi)
@@ -2245,10 +2245,10 @@ type floatTest struct {
}
var floatTests = []floatTest{
- floatTest{float64(MaxFloat64), "MaxFloat64", "1.7976931348623157e+308"},
- floatTest{float64(MinFloat64), "MinFloat64", "5e-324"},
- floatTest{float32(MaxFloat32), "MaxFloat32", "3.4028235e+38"},
- floatTest{float32(MinFloat32), "MinFloat32", "1e-45"},
+ {float64(MaxFloat64), "MaxFloat64", "1.7976931348623157e+308"},
+ {float64(MinFloat64), "MinFloat64", "5e-324"},
+ {float32(MaxFloat32), "MaxFloat32", "3.4028235e+38"},
+ {float32(MinFloat32), "MinFloat32", "1e-45"},
}
func TestFloatMinMax(t *testing.T) {
diff --git a/src/pkg/mime/mediatype_test.go b/src/pkg/mime/mediatype_test.go
index 42c8a9b074..4891e899d4 100644
--- a/src/pkg/mime/mediatype_test.go
+++ b/src/pkg/mime/mediatype_test.go
@@ -10,10 +10,10 @@ import (
func TestConsumeToken(t *testing.T) {
tests := [...][3]string{
- [3]string{"foo bar", "foo", " bar"},
- [3]string{"bar", "bar", ""},
- [3]string{"", "", ""},
- [3]string{" foo", "", " foo"},
+ {"foo bar", "foo", " bar"},
+ {"bar", "bar", ""},
+ {"", "", ""},
+ {" foo", "", " foo"},
}
for _, test := range tests {
token, rest := consumeToken(test[0])
@@ -31,14 +31,14 @@ func TestConsumeToken(t *testing.T) {
func TestConsumeValue(t *testing.T) {
tests := [...][3]string{
- [3]string{"foo bar", "foo", " bar"},
- [3]string{"bar", "bar", ""},
- [3]string{" bar ", "", " bar "},
- [3]string{`"My value"end`, "My value", "end"},
- [3]string{`"My value" end`, "My value", " end"},
- [3]string{`"\\" rest`, "\\", " rest"},
- [3]string{`"My \" value"end`, "My \" value", "end"},
- [3]string{`"\" rest`, "", `"\" rest`},
+ {"foo bar", "foo", " bar"},
+ {"bar", "bar", ""},
+ {" bar ", "", " bar "},
+ {`"My value"end`, "My value", "end"},
+ {`"My value" end`, "My value", " end"},
+ {`"\\" rest`, "\\", " rest"},
+ {`"My \" value"end`, "My \" value", "end"},
+ {`"\" rest`, "", `"\" rest`},
}
for _, test := range tests {
value, rest := consumeValue(test[0])
@@ -56,16 +56,16 @@ func TestConsumeValue(t *testing.T) {
func TestConsumeMediaParam(t *testing.T) {
tests := [...][4]string{
- [4]string{" ; foo=bar", "foo", "bar", ""},
- [4]string{"; foo=bar", "foo", "bar", ""},
- [4]string{";foo=bar", "foo", "bar", ""},
- [4]string{`;foo="bar"`, "foo", "bar", ""},
- [4]string{`;foo="bar"; `, "foo", "bar", "; "},
- [4]string{`;foo="bar"; foo=baz`, "foo", "bar", "; foo=baz"},
- [4]string{` ; boundary=----CUT;`, "boundary", "----CUT", ";"},
- [4]string{` ; key=value; blah="value";name="foo" `, "key", "value", `; blah="value";name="foo" `},
- [4]string{`; blah="value";name="foo" `, "blah", "value", `;name="foo" `},
- [4]string{`;name="foo" `, "name", "foo", ` `},
+ {" ; foo=bar", "foo", "bar", ""},
+ {"; foo=bar", "foo", "bar", ""},
+ {";foo=bar", "foo", "bar", ""},
+ {`;foo="bar"`, "foo", "bar", ""},
+ {`;foo="bar"; `, "foo", "bar", "; "},
+ {`;foo="bar"; foo=baz`, "foo", "bar", "; foo=baz"},
+ {` ; boundary=----CUT;`, "boundary", "----CUT", ";"},
+ {` ; key=value; blah="value";name="foo" `, "key", "value", `; blah="value";name="foo" `},
+ {`; blah="value";name="foo" `, "blah", "value", `;name="foo" `},
+ {`;name="foo" `, "name", "foo", ` `},
}
for _, test := range tests {
param, value, rest := consumeMediaParam(test[0])
diff --git a/src/pkg/mime/multipart/multipart_test.go b/src/pkg/mime/multipart/multipart_test.go
index f737a90700..7e1ed133ec 100644
--- a/src/pkg/mime/multipart/multipart_test.go
+++ b/src/pkg/mime/multipart/multipart_test.go
@@ -60,13 +60,13 @@ func TestFormName(t *testing.T) {
p := new(Part)
p.Header = make(map[string]string)
tests := [...][2]string{
- [2]string{`form-data; name="foo"`, "foo"},
- [2]string{` form-data ; name=foo`, "foo"},
- [2]string{`FORM-DATA;name="foo"`, "foo"},
- [2]string{` FORM-DATA ; name="foo"`, "foo"},
- [2]string{` FORM-DATA ; name="foo"`, "foo"},
- [2]string{` FORM-DATA ; name=foo`, "foo"},
- [2]string{` FORM-DATA ; filename="foo.txt"; name=foo; baz=quux`, "foo"},
+ {`form-data; name="foo"`, "foo"},
+ {` form-data ; name=foo`, "foo"},
+ {`FORM-DATA;name="foo"`, "foo"},
+ {` FORM-DATA ; name="foo"`, "foo"},
+ {` FORM-DATA ; name="foo"`, "foo"},
+ {` FORM-DATA ; name=foo`, "foo"},
+ {` FORM-DATA ; filename="foo.txt"; name=foo; baz=quux`, "foo"},
}
for _, test := range tests {
p.Header["Content-Disposition"] = test[0]
diff --git a/src/pkg/net/dnsclient.go b/src/pkg/net/dnsclient.go
index 16103c4d05..accee63890 100644
--- a/src/pkg/net/dnsclient.go
+++ b/src/pkg/net/dnsclient.go
@@ -55,7 +55,7 @@ func exchange(cfg *dnsConfig, c Conn, name string, qtype uint16) (*dnsMsg, os.Er
out := new(dnsMsg)
out.id = uint16(rand.Int()) ^ uint16(time.Nanoseconds())
out.question = []dnsQuestion{
- dnsQuestion{name, qtype, dnsClassINET},
+ {name, qtype, dnsClassINET},
}
out.recursion_desired = true
msg, ok := out.Pack()
diff --git a/src/pkg/net/hosts_test.go b/src/pkg/net/hosts_test.go
index d0ee2a7acb..84cd92e376 100644
--- a/src/pkg/net/hosts_test.go
+++ b/src/pkg/net/hosts_test.go
@@ -15,19 +15,19 @@ type hostTest struct {
var hosttests = []hostTest{
- hostTest{"odin", []IP{
+ {"odin", []IP{
IPv4(127, 0, 0, 2),
IPv4(127, 0, 0, 3),
ParseIP("::2"),
}},
- hostTest{"thor", []IP{
+ {"thor", []IP{
IPv4(127, 1, 1, 1),
}},
- hostTest{"loki", []IP{}},
- hostTest{"ullr", []IP{
+ {"loki", []IP{}},
+ {"ullr", []IP{
IPv4(127, 1, 1, 2),
}},
- hostTest{"ullrhost", []IP{
+ {"ullrhost", []IP{
IPv4(127, 1, 1, 2),
}},
}
diff --git a/src/pkg/net/ip_test.go b/src/pkg/net/ip_test.go
index d237e53291..e29c3021da 100644
--- a/src/pkg/net/ip_test.go
+++ b/src/pkg/net/ip_test.go
@@ -29,17 +29,17 @@ type parseIPTest struct {
}
var parseiptests = []parseIPTest{
- parseIPTest{"127.0.1.2", IPv4(127, 0, 1, 2)},
- parseIPTest{"127.0.0.1", IPv4(127, 0, 0, 1)},
- parseIPTest{"127.0.0.256", nil},
- parseIPTest{"abc", nil},
- parseIPTest{"::ffff:127.0.0.1", IPv4(127, 0, 0, 1)},
- parseIPTest{"2001:4860:0:2001::68",
+ {"127.0.1.2", IPv4(127, 0, 1, 2)},
+ {"127.0.0.1", IPv4(127, 0, 0, 1)},
+ {"127.0.0.256", nil},
+ {"abc", nil},
+ {"::ffff:127.0.0.1", IPv4(127, 0, 0, 1)},
+ {"2001:4860:0:2001::68",
IP{0x20, 0x01, 0x48, 0x60, 0, 0, 0x20, 0x01,
0, 0, 0, 0, 0, 0, 0x00, 0x68,
},
},
- parseIPTest{"::ffff:4a7d:1363", IPv4(74, 125, 19, 99)},
+ {"::ffff:4a7d:1363", IPv4(74, 125, 19, 99)},
}
func TestParseIP(t *testing.T) {
@@ -58,28 +58,28 @@ type ipStringTest struct {
var ipstringtests = []ipStringTest{
// cf. RFC 5952 (A Recommendation for IPv6 Address Text Representation)
- ipStringTest{IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
+ {IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
0, 0, 0x1, 0x23, 0, 0x12, 0, 0x1},
"2001:db8::123:12:1"},
- ipStringTest{IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
+ {IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0x1},
"2001:db8::1"},
- ipStringTest{IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0x1,
+ {IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0x1,
0, 0, 0, 0x1, 0, 0, 0, 0x1},
"2001:db8:0:1:0:1:0:1"},
- ipStringTest{IP{0x20, 0x1, 0xd, 0xb8, 0, 0x1, 0, 0,
+ {IP{0x20, 0x1, 0xd, 0xb8, 0, 0x1, 0, 0,
0, 0x1, 0, 0, 0, 0x1, 0, 0},
"2001:db8:1:0:1:0:1:0"},
- ipStringTest{IP{0x20, 0x1, 0, 0, 0, 0, 0, 0,
+ {IP{0x20, 0x1, 0, 0, 0, 0, 0, 0,
0, 0x1, 0, 0, 0, 0, 0, 0x1},
"2001::1:0:0:1"},
- ipStringTest{IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
+ {IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
0, 0x1, 0, 0, 0, 0, 0, 0},
"2001:db8:0:0:1::"},
- ipStringTest{IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
+ {IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0,
0, 0x1, 0, 0, 0, 0, 0, 0x1},
"2001:db8::1:0:0:1"},
- ipStringTest{IP{0x20, 0x1, 0xD, 0xB8, 0, 0, 0, 0,
+ {IP{0x20, 0x1, 0xD, 0xB8, 0, 0, 0, 0,
0, 0xA, 0, 0xB, 0, 0xC, 0, 0xD},
"2001:db8::a:b:c:d"},
}
diff --git a/src/pkg/net/net_test.go b/src/pkg/net/net_test.go
index 72f7303eac..b303254c63 100644
--- a/src/pkg/net/net_test.go
+++ b/src/pkg/net/net_test.go
@@ -20,35 +20,35 @@ type DialErrorTest struct {
}
var dialErrorTests = []DialErrorTest{
- DialErrorTest{
+ {
"datakit", "", "mh/astro/r70",
"dial datakit mh/astro/r70: unknown network datakit",
},
- DialErrorTest{
+ {
"tcp", "", "127.0.0.1:☺",
"dial tcp 127.0.0.1:☺: unknown port tcp/☺",
},
- DialErrorTest{
+ {
"tcp", "", "no-such-name.google.com.:80",
"dial tcp no-such-name.google.com.:80: lookup no-such-name.google.com.( on .*)?: no (.*)",
},
- DialErrorTest{
+ {
"tcp", "", "no-such-name.no-such-top-level-domain.:80",
"dial tcp no-such-name.no-such-top-level-domain.:80: lookup no-such-name.no-such-top-level-domain.( on .*)?: no (.*)",
},
- DialErrorTest{
+ {
"tcp", "", "no-such-name:80",
`dial tcp no-such-name:80: lookup no-such-name\.(.*\.)?( on .*)?: no (.*)`,
},
- DialErrorTest{
+ {
"tcp", "", "mh/astro/r70:http",
"dial tcp mh/astro/r70:http: lookup mh/astro/r70: invalid domain name",
},
- DialErrorTest{
+ {
"unix", "", "/etc/file-not-found",
"dial unix /etc/file-not-found: no such file or directory",
},
- DialErrorTest{
+ {
"unix", "", "/etc/",
"dial unix /etc/: (permission denied|socket operation on non-socket|connection refused)",
},
diff --git a/src/pkg/net/port_test.go b/src/pkg/net/port_test.go
index 7a796a874c..1b7eaf2312 100644
--- a/src/pkg/net/port_test.go
+++ b/src/pkg/net/port_test.go
@@ -16,32 +16,32 @@ type portTest struct {
}
var porttests = []portTest{
- portTest{"tcp", "echo", 7, true},
- portTest{"tcp", "discard", 9, true},
- portTest{"tcp", "systat", 11, true},
- portTest{"tcp", "daytime", 13, true},
- portTest{"tcp", "chargen", 19, true},
- portTest{"tcp", "ftp-data", 20, true},
- portTest{"tcp", "ftp", 21, true},
- portTest{"tcp", "telnet", 23, true},
- portTest{"tcp", "smtp", 25, true},
- portTest{"tcp", "time", 37, true},
- portTest{"tcp", "domain", 53, true},
- portTest{"tcp", "gopher", 70, true},
- portTest{"tcp", "finger", 79, true},
- portTest{"tcp", "http", 80, true},
+ {"tcp", "echo", 7, true},
+ {"tcp", "discard", 9, true},
+ {"tcp", "systat", 11, true},
+ {"tcp", "daytime", 13, true},
+ {"tcp", "chargen", 19, true},
+ {"tcp", "ftp-data", 20, true},
+ {"tcp", "ftp", 21, true},
+ {"tcp", "telnet", 23, true},
+ {"tcp", "smtp", 25, true},
+ {"tcp", "time", 37, true},
+ {"tcp", "domain", 53, true},
+ {"tcp", "gopher", 70, true},
+ {"tcp", "finger", 79, true},
+ {"tcp", "http", 80, true},
- portTest{"udp", "echo", 7, true},
- portTest{"udp", "tftp", 69, true},
- portTest{"udp", "bootpc", 68, true},
- portTest{"udp", "bootps", 67, true},
- portTest{"udp", "domain", 53, true},
- portTest{"udp", "ntp", 123, true},
- portTest{"udp", "snmp", 161, true},
- portTest{"udp", "syslog", 514, true},
+ {"udp", "echo", 7, true},
+ {"udp", "tftp", 69, true},
+ {"udp", "bootpc", 68, true},
+ {"udp", "bootps", 67, true},
+ {"udp", "domain", 53, true},
+ {"udp", "ntp", 123, true},
+ {"udp", "snmp", 161, true},
+ {"udp", "syslog", 514, true},
- portTest{"--badnet--", "zzz", 0, false},
- portTest{"tcp", "--badport--", 0, false},
+ {"--badnet--", "zzz", 0, false},
+ {"tcp", "--badport--", 0, false},
}
func TestLookupPort(t *testing.T) {
diff --git a/src/pkg/net/textproto/reader_test.go b/src/pkg/net/textproto/reader_test.go
index c27907b56e..2cecbc75f2 100644
--- a/src/pkg/net/textproto/reader_test.go
+++ b/src/pkg/net/textproto/reader_test.go
@@ -18,12 +18,12 @@ type canonicalHeaderKeyTest struct {
}
var canonicalHeaderKeyTests = []canonicalHeaderKeyTest{
- canonicalHeaderKeyTest{"a-b-c", "A-B-C"},
- canonicalHeaderKeyTest{"a-1-c", "A-1-C"},
- canonicalHeaderKeyTest{"User-Agent", "User-Agent"},
- canonicalHeaderKeyTest{"uSER-aGENT", "User-Agent"},
- canonicalHeaderKeyTest{"user-agent", "User-Agent"},
- canonicalHeaderKeyTest{"USER-AGENT", "User-Agent"},
+ {"a-b-c", "A-B-C"},
+ {"a-1-c", "A-1-C"},
+ {"User-Agent", "User-Agent"},
+ {"uSER-aGENT", "User-Agent"},
+ {"user-agent", "User-Agent"},
+ {"USER-AGENT", "User-Agent"},
}
func TestCanonicalHeaderKey(t *testing.T) {
@@ -131,8 +131,8 @@ func TestReadMIMEHeader(t *testing.T) {
r := reader("my-key: Value 1 \r\nLong-key: Even \n Longer Value\r\nmy-Key: Value 2\r\n\n")
m, err := r.ReadMIMEHeader()
want := map[string][]string{
- "My-Key": []string{"Value 1", "Value 2"},
- "Long-Key": []string{"Even Longer Value"},
+ "My-Key": {"Value 1", "Value 2"},
+ "Long-Key": {"Even Longer Value"},
}
if !reflect.DeepEqual(m, want) || err != nil {
t.Fatalf("ReadMIMEHeader: %v, %v; want %v", m, err, want)
diff --git a/src/pkg/os/os_test.go b/src/pkg/os/os_test.go
index 9cc2eb54a5..eacb0f71f5 100644
--- a/src/pkg/os/os_test.go
+++ b/src/pkg/os/os_test.go
@@ -680,14 +680,14 @@ func TestSeek(t *testing.T) {
out int64
}
var tests = []test{
- test{0, 1, int64(len(data))},
- test{0, 0, 0},
- test{5, 0, 5},
- test{0, 2, int64(len(data))},
- test{0, 0, 0},
- test{-1, 2, int64(len(data)) - 1},
- test{1 << 33, 0, 1 << 33},
- test{1 << 33, 2, 1<<33 + int64(len(data))},
+ {0, 1, int64(len(data))},
+ {0, 0, 0},
+ {5, 0, 5},
+ {0, 2, int64(len(data))},
+ {0, 0, 0},
+ {-1, 2, int64(len(data)) - 1},
+ {1 << 33, 0, 1 << 33},
+ {1 << 33, 2, 1<<33 + int64(len(data))},
}
for i, tt := range tests {
off, err := f.Seek(tt.in, tt.whence)
@@ -709,17 +709,17 @@ type openErrorTest struct {
}
var openErrorTests = []openErrorTest{
- openErrorTest{
+ {
sfdir + "/no-such-file",
O_RDONLY,
ENOENT,
},
- openErrorTest{
+ {
sfdir,
O_WRONLY,
EISDIR,
},
- openErrorTest{
+ {
sfdir + "/" + sfname + "/no-such-file",
O_WRONLY,
ENOTDIR,
diff --git a/src/pkg/patch/patch_test.go b/src/pkg/patch/patch_test.go
index afc0ea71c0..0a4aef7ea6 100644
--- a/src/pkg/patch/patch_test.go
+++ b/src/pkg/patch/patch_test.go
@@ -37,7 +37,7 @@ func TestFileApply(t *testing.T) {
}
var tests = []Test{
- Test{
+ {
"hello, world\n",
"goodbye, world\n",
"Index: a\n" +
@@ -47,7 +47,7 @@ var tests = []Test{
"-hello, world\n" +
"+goodbye, world\n",
},
- Test{
+ {
"hello, world\n",
"goodbye, world\n",
"Index: a\n" +
@@ -58,7 +58,7 @@ var tests = []Test{
"-hello, world\n" +
"+goodbye, world\n",
},
- Test{
+ {
"hello, world\n",
"goodbye, world\n",
"diff a/a b/b\n" +
@@ -68,7 +68,7 @@ var tests = []Test{
"-hello, world\n" +
"+goodbye, world\n",
},
- Test{
+ {
"hello, world",
"goodbye, world\n",
"diff --git a/a b/b\n" +
@@ -79,7 +79,7 @@ var tests = []Test{
"\\ No newline at end of file\n" +
"+goodbye, world\n",
},
- Test{
+ {
"hello, world\n",
"goodbye, world",
"Index: a\n" +
@@ -90,7 +90,7 @@ var tests = []Test{
"+goodbye, world\n" +
"\\ No newline at end of file\n",
},
- Test{
+ {
"hello, world",
"goodbye, world",
"Index: a\n" +
@@ -102,7 +102,7 @@ var tests = []Test{
"+goodbye, world\n" +
"\\ No newline at end of file\n",
},
- Test{
+ {
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\n",
"a\nB\nC\nD\ne\nf\ng\nj\nk\nl\nm\nN\n",
"Index: a\n" +
@@ -128,7 +128,7 @@ var tests = []Test{
"-n\n" +
"+N\n",
},
- Test{
+ {
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"a\nb\nc\ng\nh\ni\nj\nk\nl\nm\nN\nO\np\nq\nr\ns\nt\nu\nv\nw\nd\ne\nf\nx\n",
"Index: a\n" +
@@ -167,7 +167,7 @@ var tests = []Test{
"-y\n" +
"-z\n",
},
- Test{
+ {
"a\nb\nc\ng\nh\ni\nj\nk\nl\nm\nN\nO\np\nq\nr\ns\nt\nu\nv\nw\nd\ne\nf\nx\n",
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"Index: a\n" +
@@ -205,7 +205,7 @@ var tests = []Test{
"+y\n" +
"+z\n",
},
- Test{
+ {
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"",
"Index: a\n" +
@@ -240,7 +240,7 @@ var tests = []Test{
"-y\n" +
"-z\n",
},
- Test{
+ {
"",
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"Index: a\n" +
@@ -275,7 +275,7 @@ var tests = []Test{
"+y\n" +
"+z\n",
},
- Test{
+ {
"\xc2\xd8\xf9\x63\x8c\xf7\xc6\x9b\xb0\x3c\x39\xfa\x08\x8e\x42\x8f" +
"\x1c\x7c\xaf\x54\x22\x87\xc3\xc5\x68\x9b\xe1\xbd\xbc\xc3\xe0\xda" +
"\xcc\xe3\x96\xda\xc2\xaf\xbb\x75\x79\x64\x86\x60\x8a\x43\x9e\x07" +
@@ -331,7 +331,7 @@ var tests = []Test{
"Gy(*Pb;D3Ms\n" +
"\n",
},
- Test{
+ {
"\xc2\xd8\xf9\x63\x8c\xf7\xc6\x9b\xb0\x3c\x39\xfa\x08\x8e\x42\x8f" +
"\x1c\x7c\xaf\x54\x22\x87\xc3\xc5\x68\x9b\xe1\xbd\xbc\xc3\xe0\xda" +
"\xcc\xe3\x96\xda\xc2\xaf\xbb\x75\x79\x64\x86\x60\x8a\x43\x9e\x07" +
@@ -379,7 +379,7 @@ var tests = []Test{
"G1edVN^?m&S\n" +
"\n",
},
- Test{
+ {
"",
"",
"Index: hello\n" +
diff --git a/src/pkg/path/match_test.go b/src/pkg/path/match_test.go
index 97bfc57332..f377f1083b 100644
--- a/src/pkg/path/match_test.go
+++ b/src/pkg/path/match_test.go
@@ -16,55 +16,55 @@ type MatchTest struct {
}
var matchTests = []MatchTest{
- MatchTest{"abc", "abc", true, nil},
- MatchTest{"*", "abc", true, nil},
- MatchTest{"*c", "abc", true, nil},
- MatchTest{"a*", "a", true, nil},
- MatchTest{"a*", "abc", true, nil},
- MatchTest{"a*", "ab/c", false, nil},
- MatchTest{"a*/b", "abc/b", true, nil},
- MatchTest{"a*/b", "a/c/b", false, nil},
- MatchTest{"a*b*c*d*e*/f", "axbxcxdxe/f", true, nil},
- MatchTest{"a*b*c*d*e*/f", "axbxcxdxexxx/f", true, nil},
- MatchTest{"a*b*c*d*e*/f", "axbxcxdxe/xxx/f", false, nil},
- MatchTest{"a*b*c*d*e*/f", "axbxcxdxexxx/fff", false, nil},
- MatchTest{"a*b?c*x", "abxbbxdbxebxczzx", true, nil},
- MatchTest{"a*b?c*x", "abxbbxdbxebxczzy", false, nil},
- MatchTest{"ab[c]", "abc", true, nil},
- MatchTest{"ab[b-d]", "abc", true, nil},
- MatchTest{"ab[e-g]", "abc", false, nil},
- MatchTest{"ab[^c]", "abc", false, nil},
- MatchTest{"ab[^b-d]", "abc", false, nil},
- MatchTest{"ab[^e-g]", "abc", true, nil},
- MatchTest{"a\\*b", "a*b", true, nil},
- MatchTest{"a\\*b", "ab", false, nil},
- MatchTest{"a?b", "a☺b", true, nil},
- MatchTest{"a[^a]b", "a☺b", true, nil},
- MatchTest{"a???b", "a☺b", false, nil},
- MatchTest{"a[^a][^a][^a]b", "a☺b", false, nil},
- MatchTest{"[a-ζ]*", "α", true, nil},
- MatchTest{"*[a-ζ]", "A", false, nil},
- MatchTest{"a?b", "a/b", false, nil},
- MatchTest{"a*b", "a/b", false, nil},
- MatchTest{"[\\]a]", "]", true, nil},
- MatchTest{"[\\-]", "-", true, nil},
- MatchTest{"[x\\-]", "x", true, nil},
- MatchTest{"[x\\-]", "-", true, nil},
- MatchTest{"[x\\-]", "z", false, nil},
- MatchTest{"[\\-x]", "x", true, nil},
- MatchTest{"[\\-x]", "-", true, nil},
- MatchTest{"[\\-x]", "a", false, nil},
- MatchTest{"[]a]", "]", false, ErrBadPattern},
- MatchTest{"[-]", "-", false, ErrBadPattern},
- MatchTest{"[x-]", "x", false, ErrBadPattern},
- MatchTest{"[x-]", "-", false, ErrBadPattern},
- MatchTest{"[x-]", "z", false, ErrBadPattern},
- MatchTest{"[-x]", "x", false, ErrBadPattern},
- MatchTest{"[-x]", "-", false, ErrBadPattern},
- MatchTest{"[-x]", "a", false, ErrBadPattern},
- MatchTest{"\\", "a", false, ErrBadPattern},
- MatchTest{"[a-b-c]", "a", false, ErrBadPattern},
- MatchTest{"*x", "xxx", true, nil},
+ {"abc", "abc", true, nil},
+ {"*", "abc", true, nil},
+ {"*c", "abc", true, nil},
+ {"a*", "a", true, nil},
+ {"a*", "abc", true, nil},
+ {"a*", "ab/c", false, nil},
+ {"a*/b", "abc/b", true, nil},
+ {"a*/b", "a/c/b", false, nil},
+ {"a*b*c*d*e*/f", "axbxcxdxe/f", true, nil},
+ {"a*b*c*d*e*/f", "axbxcxdxexxx/f", true, nil},
+ {"a*b*c*d*e*/f", "axbxcxdxe/xxx/f", false, nil},
+ {"a*b*c*d*e*/f", "axbxcxdxexxx/fff", false, nil},
+ {"a*b?c*x", "abxbbxdbxebxczzx", true, nil},
+ {"a*b?c*x", "abxbbxdbxebxczzy", false, nil},
+ {"ab[c]", "abc", true, nil},
+ {"ab[b-d]", "abc", true, nil},
+ {"ab[e-g]", "abc", false, nil},
+ {"ab[^c]", "abc", false, nil},
+ {"ab[^b-d]", "abc", false, nil},
+ {"ab[^e-g]", "abc", true, nil},
+ {"a\\*b", "a*b", true, nil},
+ {"a\\*b", "ab", false, nil},
+ {"a?b", "a☺b", true, nil},
+ {"a[^a]b", "a☺b", true, nil},
+ {"a???b", "a☺b", false, nil},
+ {"a[^a][^a][^a]b", "a☺b", false, nil},
+ {"[a-ζ]*", "α", true, nil},
+ {"*[a-ζ]", "A", false, nil},
+ {"a?b", "a/b", false, nil},
+ {"a*b", "a/b", false, nil},
+ {"[\\]a]", "]", true, nil},
+ {"[\\-]", "-", true, nil},
+ {"[x\\-]", "x", true, nil},
+ {"[x\\-]", "-", true, nil},
+ {"[x\\-]", "z", false, nil},
+ {"[\\-x]", "x", true, nil},
+ {"[\\-x]", "-", true, nil},
+ {"[\\-x]", "a", false, nil},
+ {"[]a]", "]", false, ErrBadPattern},
+ {"[-]", "-", false, ErrBadPattern},
+ {"[x-]", "x", false, ErrBadPattern},
+ {"[x-]", "-", false, ErrBadPattern},
+ {"[x-]", "z", false, ErrBadPattern},
+ {"[-x]", "x", false, ErrBadPattern},
+ {"[-x]", "-", false, ErrBadPattern},
+ {"[-x]", "a", false, ErrBadPattern},
+ {"\\", "a", false, ErrBadPattern},
+ {"[a-b-c]", "a", false, ErrBadPattern},
+ {"*x", "xxx", true, nil},
}
func TestMatch(t *testing.T) {
diff --git a/src/pkg/path/path_test.go b/src/pkg/path/path_test.go
index 592e696b52..2bbb9244aa 100644
--- a/src/pkg/path/path_test.go
+++ b/src/pkg/path/path_test.go
@@ -15,52 +15,52 @@ type CleanTest struct {
var cleantests = []CleanTest{
// Already clean
- CleanTest{"", "."},
- CleanTest{"abc", "abc"},
- CleanTest{"abc/def", "abc/def"},
- CleanTest{"a/b/c", "a/b/c"},
- CleanTest{".", "."},
- CleanTest{"..", ".."},
- CleanTest{"../..", "../.."},
- CleanTest{"../../abc", "../../abc"},
- CleanTest{"/abc", "/abc"},
- CleanTest{"/", "/"},
+ {"", "."},
+ {"abc", "abc"},
+ {"abc/def", "abc/def"},
+ {"a/b/c", "a/b/c"},
+ {".", "."},
+ {"..", ".."},
+ {"../..", "../.."},
+ {"../../abc", "../../abc"},
+ {"/abc", "/abc"},
+ {"/", "/"},
// Remove trailing slash
- CleanTest{"abc/", "abc"},
- CleanTest{"abc/def/", "abc/def"},
- CleanTest{"a/b/c/", "a/b/c"},
- CleanTest{"./", "."},
- CleanTest{"../", ".."},
- CleanTest{"../../", "../.."},
- CleanTest{"/abc/", "/abc"},
+ {"abc/", "abc"},
+ {"abc/def/", "abc/def"},
+ {"a/b/c/", "a/b/c"},
+ {"./", "."},
+ {"../", ".."},
+ {"../../", "../.."},
+ {"/abc/", "/abc"},
// Remove doubled slash
- CleanTest{"abc//def//ghi", "abc/def/ghi"},
- CleanTest{"//abc", "/abc"},
- CleanTest{"///abc", "/abc"},
- CleanTest{"//abc//", "/abc"},
- CleanTest{"abc//", "abc"},
+ {"abc//def//ghi", "abc/def/ghi"},
+ {"//abc", "/abc"},
+ {"///abc", "/abc"},
+ {"//abc//", "/abc"},
+ {"abc//", "abc"},
// Remove . elements
- CleanTest{"abc/./def", "abc/def"},
- CleanTest{"/./abc/def", "/abc/def"},
- CleanTest{"abc/.", "abc"},
+ {"abc/./def", "abc/def"},
+ {"/./abc/def", "/abc/def"},
+ {"abc/.", "abc"},
// Remove .. elements
- CleanTest{"abc/def/ghi/../jkl", "abc/def/jkl"},
- CleanTest{"abc/def/../ghi/../jkl", "abc/jkl"},
- CleanTest{"abc/def/..", "abc"},
- CleanTest{"abc/def/../..", "."},
- CleanTest{"/abc/def/../..", "/"},
- CleanTest{"abc/def/../../..", ".."},
- CleanTest{"/abc/def/../../..", "/"},
- CleanTest{"abc/def/../../../ghi/jkl/../../../mno", "../../mno"},
+ {"abc/def/ghi/../jkl", "abc/def/jkl"},
+ {"abc/def/../ghi/../jkl", "abc/jkl"},
+ {"abc/def/..", "abc"},
+ {"abc/def/../..", "."},
+ {"/abc/def/../..", "/"},
+ {"abc/def/../../..", ".."},
+ {"/abc/def/../../..", "/"},
+ {"abc/def/../../../ghi/jkl/../../../mno", "../../mno"},
// Combinations
- CleanTest{"abc/./../def", "def"},
- CleanTest{"abc//./../def", "def"},
- CleanTest{"abc/../../././../def", "../../def"},
+ {"abc/./../def", "def"},
+ {"abc//./../def", "def"},
+ {"abc/../../././../def", "../../def"},
}
func TestClean(t *testing.T) {
@@ -76,11 +76,11 @@ type SplitTest struct {
}
var splittests = []SplitTest{
- SplitTest{"a/b", "a/", "b"},
- SplitTest{"a/b/", "a/b/", ""},
- SplitTest{"a/", "a/", ""},
- SplitTest{"a", "", "a"},
- SplitTest{"/", "/", ""},
+ {"a/b", "a/", "b"},
+ {"a/b/", "a/b/", ""},
+ {"a/", "a/", ""},
+ {"a", "", "a"},
+ {"/", "/", ""},
}
func TestSplit(t *testing.T) {
@@ -98,21 +98,21 @@ type JoinTest struct {
var jointests = []JoinTest{
// zero parameters
- JoinTest{[]string{}, ""},
+ {[]string{}, ""},
// one parameter
- JoinTest{[]string{""}, ""},
- JoinTest{[]string{"a"}, "a"},
+ {[]string{""}, ""},
+ {[]string{"a"}, "a"},
// two parameters
- JoinTest{[]string{"a", "b"}, "a/b"},
- JoinTest{[]string{"a", ""}, "a"},
- JoinTest{[]string{"", "b"}, "b"},
- JoinTest{[]string{"/", "a"}, "/a"},
- JoinTest{[]string{"/", ""}, "/"},
- JoinTest{[]string{"a/", "b"}, "a/b"},
- JoinTest{[]string{"a/", ""}, "a"},
- JoinTest{[]string{"", ""}, ""},
+ {[]string{"a", "b"}, "a/b"},
+ {[]string{"a", ""}, "a"},
+ {[]string{"", "b"}, "b"},
+ {[]string{"/", "a"}, "/a"},
+ {[]string{"/", ""}, "/"},
+ {[]string{"a/", "b"}, "a/b"},
+ {[]string{"a/", ""}, "a"},
+ {[]string{"", ""}, ""},
}
// join takes a []string and passes it to Join.
@@ -134,11 +134,11 @@ type ExtTest struct {
}
var exttests = []ExtTest{
- ExtTest{"path.go", ".go"},
- ExtTest{"path.pb.go", ".go"},
- ExtTest{"a.dir/b", ""},
- ExtTest{"a.dir/b.go", ".go"},
- ExtTest{"a.dir/", ""},
+ {"path.go", ".go"},
+ {"path.pb.go", ".go"},
+ {"a.dir/b", ""},
+ {"a.dir/b.go", ".go"},
+ {"a.dir/", ""},
}
func TestExt(t *testing.T) {
@@ -287,17 +287,17 @@ func TestWalk(t *testing.T) {
var basetests = []CleanTest{
// Already clean
- CleanTest{"", "."},
- CleanTest{".", "."},
- CleanTest{"/.", "."},
- CleanTest{"/", "/"},
- CleanTest{"////", "/"},
- CleanTest{"x/", "x"},
- CleanTest{"abc", "abc"},
- CleanTest{"abc/def", "def"},
- CleanTest{"a/b/.x", ".x"},
- CleanTest{"a/b/c.", "c."},
- CleanTest{"a/b/c.x", "c.x"},
+ {"", "."},
+ {".", "."},
+ {"/.", "."},
+ {"/", "/"},
+ {"////", "/"},
+ {"x/", "x"},
+ {"abc", "abc"},
+ {"abc/def", "def"},
+ {"a/b/.x", ".x"},
+ {"a/b/c.", "c."},
+ {"a/b/c.x", "c.x"},
}
func TestBase(t *testing.T) {
@@ -314,14 +314,14 @@ type IsAbsTest struct {
}
var isAbsTests = []IsAbsTest{
- IsAbsTest{"", false},
- IsAbsTest{"/", true},
- IsAbsTest{"/usr/bin/gcc", true},
- IsAbsTest{"..", false},
- IsAbsTest{"/a/../bb", true},
- IsAbsTest{".", false},
- IsAbsTest{"./", false},
- IsAbsTest{"lala", false},
+ {"", false},
+ {"/", true},
+ {"/usr/bin/gcc", true},
+ {"..", false},
+ {"/a/../bb", true},
+ {".", false},
+ {"./", false},
+ {"lala", false},
}
func TestIsAbs(t *testing.T) {
diff --git a/src/pkg/reflect/all_test.go b/src/pkg/reflect/all_test.go
index 39d43d17a6..25e429a9d4 100644
--- a/src/pkg/reflect/all_test.go
+++ b/src/pkg/reflect/all_test.go
@@ -38,27 +38,27 @@ func assert(t *testing.T, s, want string) {
func typestring(i interface{}) string { return Typeof(i).String() }
var typeTests = []pair{
- pair{struct{ x int }{}, "int"},
- pair{struct{ x int8 }{}, "int8"},
- pair{struct{ x int16 }{}, "int16"},
- pair{struct{ x int32 }{}, "int32"},
- pair{struct{ x int64 }{}, "int64"},
- pair{struct{ x uint }{}, "uint"},
- pair{struct{ x uint8 }{}, "uint8"},
- pair{struct{ x uint16 }{}, "uint16"},
- pair{struct{ x uint32 }{}, "uint32"},
- pair{struct{ x uint64 }{}, "uint64"},
- pair{struct{ x float }{}, "float"},
- pair{struct{ x float32 }{}, "float32"},
- pair{struct{ x float64 }{}, "float64"},
- pair{struct{ x int8 }{}, "int8"},
- pair{struct{ x (**int8) }{}, "**int8"},
- pair{struct{ x (**integer) }{}, "**reflect_test.integer"},
- pair{struct{ x ([32]int32) }{}, "[32]int32"},
- pair{struct{ x ([]int8) }{}, "[]int8"},
- pair{struct{ x (map[string]int32) }{}, "map[string] int32"},
- pair{struct{ x (chan<- string) }{}, "chan<- string"},
- pair{struct {
+ {struct{ x int }{}, "int"},
+ {struct{ x int8 }{}, "int8"},
+ {struct{ x int16 }{}, "int16"},
+ {struct{ x int32 }{}, "int32"},
+ {struct{ x int64 }{}, "int64"},
+ {struct{ x uint }{}, "uint"},
+ {struct{ x uint8 }{}, "uint8"},
+ {struct{ x uint16 }{}, "uint16"},
+ {struct{ x uint32 }{}, "uint32"},
+ {struct{ x uint64 }{}, "uint64"},
+ {struct{ x float }{}, "float"},
+ {struct{ x float32 }{}, "float32"},
+ {struct{ x float64 }{}, "float64"},
+ {struct{ x int8 }{}, "int8"},
+ {struct{ x (**int8) }{}, "**int8"},
+ {struct{ x (**integer) }{}, "**reflect_test.integer"},
+ {struct{ x ([32]int32) }{}, "[32]int32"},
+ {struct{ x ([]int8) }{}, "[]int8"},
+ {struct{ x (map[string]int32) }{}, "map[string] int32"},
+ {struct{ x (chan<- string) }{}, "chan<- string"},
+ {struct {
x struct {
c chan *int32
d float32
@@ -66,15 +66,15 @@ var typeTests = []pair{
}{},
"struct { c chan *int32; d float32 }",
},
- pair{struct{ x (func(a int8, b int32)) }{}, "func(int8, int32)"},
- pair{struct {
+ {struct{ x (func(a int8, b int32)) }{}, "func(int8, int32)"},
+ {struct {
x struct {
c func(chan *integer, *int8)
}
}{},
"struct { c func(chan *reflect_test.integer, *int8) }",
},
- pair{struct {
+ {struct {
x struct {
a int8
b int32
@@ -82,7 +82,7 @@ var typeTests = []pair{
}{},
"struct { a int8; b int32 }",
},
- pair{struct {
+ {struct {
x struct {
a int8
b int8
@@ -91,7 +91,7 @@ var typeTests = []pair{
}{},
"struct { a int8; b int8; c int32 }",
},
- pair{struct {
+ {struct {
x struct {
a int8
b int8
@@ -101,7 +101,7 @@ var typeTests = []pair{
}{},
"struct { a int8; b int8; c int8; d int32 }",
},
- pair{struct {
+ {struct {
x struct {
a int8
b int8
@@ -112,7 +112,7 @@ var typeTests = []pair{
}{},
"struct { a int8; b int8; c int8; d int8; e int32 }",
},
- pair{struct {
+ {struct {
x struct {
a int8
b int8
@@ -124,28 +124,28 @@ var typeTests = []pair{
}{},
"struct { a int8; b int8; c int8; d int8; e int8; f int32 }",
},
- pair{struct {
+ {struct {
x struct {
a int8 "hi there"
}
}{},
`struct { a int8 "hi there" }`,
},
- pair{struct {
+ {struct {
x struct {
a int8 "hi \x00there\t\n\"\\"
}
}{},
`struct { a int8 "hi \x00there\t\n\"\\" }`,
},
- pair{struct {
+ {struct {
x struct {
f func(args ...int)
}
}{},
"struct { f func(...int) }",
},
- pair{struct {
+ {struct {
x (interface {
a(func(func(int) int) func(func(int)) int)
b()
@@ -156,41 +156,41 @@ var typeTests = []pair{
}
var valueTests = []pair{
- pair{(int8)(0), "8"},
- pair{(int16)(0), "16"},
- pair{(int32)(0), "32"},
- pair{(int64)(0), "64"},
- pair{(uint8)(0), "8"},
- pair{(uint16)(0), "16"},
- pair{(uint32)(0), "32"},
- pair{(uint64)(0), "64"},
- pair{(float32)(0), "256.25"},
- pair{(float64)(0), "512.125"},
- pair{(string)(""), "stringy cheese"},
- pair{(bool)(false), "true"},
- pair{(*int8)(nil), "*int8(0)"},
- pair{(**int8)(nil), "**int8(0)"},
- pair{[5]int32{}, "[5]int32{0, 0, 0, 0, 0}"},
- pair{(**integer)(nil), "**reflect_test.integer(0)"},
- pair{(map[string]int32)(nil), "map[string] int32{<can't iterate on maps>}"},
- pair{(chan<- string)(nil), "chan<- string"},
- pair{struct {
+ {(int8)(0), "8"},
+ {(int16)(0), "16"},
+ {(int32)(0), "32"},
+ {(int64)(0), "64"},
+ {(uint8)(0), "8"},
+ {(uint16)(0), "16"},
+ {(uint32)(0), "32"},
+ {(uint64)(0), "64"},
+ {(float32)(0), "256.25"},
+ {(float64)(0), "512.125"},
+ {(string)(""), "stringy cheese"},
+ {(bool)(false), "true"},
+ {(*int8)(nil), "*int8(0)"},
+ {(**int8)(nil), "**int8(0)"},
+ {[5]int32{}, "[5]int32{0, 0, 0, 0, 0}"},
+ {(**integer)(nil), "**reflect_test.integer(0)"},
+ {(map[string]int32)(nil), "map[string] int32{<can't iterate on maps>}"},
+ {(chan<- string)(nil), "chan<- string"},
+ {struct {
c chan *int32
d float32
}{},
"struct { c chan *int32; d float32 }{chan *int32, 0}",
},
- pair{(func(a int8, b int32))(nil), "func(int8, int32)(0)"},
- pair{struct{ c func(chan *integer, *int8) }{},
+ {(func(a int8, b int32))(nil), "func(int8, int32)(0)"},
+ {struct{ c func(chan *integer, *int8) }{},
"struct { c func(chan *reflect_test.integer, *int8) }{func(chan *reflect_test.integer, *int8)(0)}",
},
- pair{struct {
+ {struct {
a int8
b int32
}{},
"struct { a int8; b int32 }{0, 0}",
},
- pair{struct {
+ {struct {
a int8
b int8
c int32
@@ -336,16 +336,16 @@ func TestSetValue(t *testing.T) {
var _i = 7
var valueToStringTests = []pair{
- pair{123, "123"},
- pair{123.5, "123.5"},
- pair{byte(123), "123"},
- pair{"abc", "abc"},
- pair{T{123, 456.75, "hello", &_i}, "reflect_test.T{123, 456.75, hello, *int(&7)}"},
- pair{new(chan *T), "*chan *reflect_test.T(&chan *reflect_test.T)"},
- pair{[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}"},
- pair{&[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "*[10]int(&[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})"},
- pair{[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}"},
- pair{&[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "*[]int(&[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})"},
+ {123, "123"},
+ {123.5, "123.5"},
+ {byte(123), "123"},
+ {"abc", "abc"},
+ {T{123, 456.75, "hello", &_i}, "reflect_test.T{123, 456.75, hello, *int(&7)}"},
+ {new(chan *T), "*chan *reflect_test.T(&chan *reflect_test.T)"},
+ {[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}"},
+ {&[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "*[10]int(&[10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})"},
+ {[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}"},
+ {&[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "*[]int(&[]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})"},
}
func TestValueToString(t *testing.T) {
@@ -575,42 +575,42 @@ type DeepEqualTest struct {
var deepEqualTests = []DeepEqualTest{
// Equalities
- DeepEqualTest{1, 1, true},
- DeepEqualTest{int32(1), int32(1), true},
- DeepEqualTest{0.5, 0.5, true},
- DeepEqualTest{float32(0.5), float32(0.5), true},
- DeepEqualTest{"hello", "hello", true},
- DeepEqualTest{make([]int, 10), make([]int, 10), true},
- DeepEqualTest{&[3]int{1, 2, 3}, &[3]int{1, 2, 3}, true},
- DeepEqualTest{Basic{1, 0.5}, Basic{1, 0.5}, true},
- DeepEqualTest{os.Error(nil), os.Error(nil), true},
- DeepEqualTest{map[int]string{1: "one", 2: "two"}, map[int]string{2: "two", 1: "one"}, true},
+ {1, 1, true},
+ {int32(1), int32(1), true},
+ {0.5, 0.5, true},
+ {float32(0.5), float32(0.5), true},
+ {"hello", "hello", true},
+ {make([]int, 10), make([]int, 10), true},
+ {&[3]int{1, 2, 3}, &[3]int{1, 2, 3}, true},
+ {Basic{1, 0.5}, Basic{1, 0.5}, true},
+ {os.Error(nil), os.Error(nil), true},
+ {map[int]string{1: "one", 2: "two"}, map[int]string{2: "two", 1: "one"}, true},
// Inequalities
- DeepEqualTest{1, 2, false},
- DeepEqualTest{int32(1), int32(2), false},
- DeepEqualTest{0.5, 0.6, false},
- DeepEqualTest{float32(0.5), float32(0.6), false},
- DeepEqualTest{"hello", "hey", false},
- DeepEqualTest{make([]int, 10), make([]int, 11), false},
- DeepEqualTest{&[3]int{1, 2, 3}, &[3]int{1, 2, 4}, false},
- DeepEqualTest{Basic{1, 0.5}, Basic{1, 0.6}, false},
- DeepEqualTest{Basic{1, 0}, Basic{2, 0}, false},
- DeepEqualTest{map[int]string{1: "one", 3: "two"}, map[int]string{2: "two", 1: "one"}, false},
- DeepEqualTest{map[int]string{1: "one", 2: "txo"}, map[int]string{2: "two", 1: "one"}, false},
- DeepEqualTest{map[int]string{1: "one"}, map[int]string{2: "two", 1: "one"}, false},
- DeepEqualTest{map[int]string{2: "two", 1: "one"}, map[int]string{1: "one"}, false},
- DeepEqualTest{nil, 1, false},
- DeepEqualTest{1, nil, false},
+ {1, 2, false},
+ {int32(1), int32(2), false},
+ {0.5, 0.6, false},
+ {float32(0.5), float32(0.6), false},
+ {"hello", "hey", false},
+ {make([]int, 10), make([]int, 11), false},
+ {&[3]int{1, 2, 3}, &[3]int{1, 2, 4}, false},
+ {Basic{1, 0.5}, Basic{1, 0.6}, false},
+ {Basic{1, 0}, Basic{2, 0}, false},
+ {map[int]string{1: "one", 3: "two"}, map[int]string{2: "two", 1: "one"}, false},
+ {map[int]string{1: "one", 2: "txo"}, map[int]string{2: "two", 1: "one"}, false},
+ {map[int]string{1: "one"}, map[int]string{2: "two", 1: "one"}, false},
+ {map[int]string{2: "two", 1: "one"}, map[int]string{1: "one"}, false},
+ {nil, 1, false},
+ {1, nil, false},
// Mismatched types
- DeepEqualTest{1, 1.0, false},
- DeepEqualTest{int32(1), int64(1), false},
- DeepEqualTest{0.5, "hello", false},
- DeepEqualTest{[]int{1, 2, 3}, [3]int{1, 2, 3}, false},
- DeepEqualTest{&[3]interface{}{1, 2, 4}, &[3]interface{}{1, 2, "s"}, false},
- DeepEqualTest{Basic{1, 0.5}, NotBasic{1, 0.5}, false},
- DeepEqualTest{map[uint]string{1: "one", 2: "two"}, map[int]string{2: "two", 1: "one"}, false},
+ {1, 1.0, false},
+ {int32(1), int64(1), false},
+ {0.5, "hello", false},
+ {[]int{1, 2, 3}, [3]int{1, 2, 3}, false},
+ {&[3]interface{}{1, 2, 4}, &[3]interface{}{1, 2, "s"}, false},
+ {Basic{1, 0.5}, NotBasic{1, 0.5}, false},
+ {map[uint]string{1: "one", 2: "two"}, map[int]string{2: "two", 1: "one"}, false},
}
func TestDeepEqual(t *testing.T) {
@@ -1169,26 +1169,26 @@ type S4 struct {
}
var fieldTests = []FTest{
- FTest{struct{}{}, "", nil, 0},
- FTest{struct{}{}, "foo", nil, 0},
- FTest{S0{a: 'a'}, "a", []int{0}, 'a'},
- FTest{S0{}, "d", nil, 0},
- FTest{S1{S0: S0{a: 'a'}}, "a", []int{1, 0}, 'a'},
- FTest{S1{b: 'b'}, "b", []int{0}, 'b'},
- FTest{S1{}, "S0", []int{1}, 0},
- FTest{S1{S0: S0{c: 'c'}}, "c", []int{1, 2}, 'c'},
- FTest{S2{a: 'a'}, "a", []int{0}, 'a'},
- FTest{S2{}, "S1", []int{1}, 0},
- FTest{S2{S1: &S1{b: 'b'}}, "b", []int{1, 0}, 'b'},
- FTest{S2{S1: &S1{S0: S0{c: 'c'}}}, "c", []int{1, 1, 2}, 'c'},
- FTest{S2{}, "d", nil, 0},
- FTest{S3{}, "S1", nil, 0},
- FTest{S3{S2: S2{a: 'a'}}, "a", []int{1, 0}, 'a'},
- FTest{S3{}, "b", nil, 0},
- FTest{S3{d: 'd'}, "d", []int{2}, 0},
- FTest{S3{e: 'e'}, "e", []int{3}, 'e'},
- FTest{S4{a: 'a'}, "a", []int{1}, 'a'},
- FTest{S4{}, "b", nil, 0},
+ {struct{}{}, "", nil, 0},
+ {struct{}{}, "foo", nil, 0},
+ {S0{a: 'a'}, "a", []int{0}, 'a'},
+ {S0{}, "d", nil, 0},
+ {S1{S0: S0{a: 'a'}}, "a", []int{1, 0}, 'a'},
+ {S1{b: 'b'}, "b", []int{0}, 'b'},
+ {S1{}, "S0", []int{1}, 0},
+ {S1{S0: S0{c: 'c'}}, "c", []int{1, 2}, 'c'},
+ {S2{a: 'a'}, "a", []int{0}, 'a'},
+ {S2{}, "S1", []int{1}, 0},
+ {S2{S1: &S1{b: 'b'}}, "b", []int{1, 0}, 'b'},
+ {S2{S1: &S1{S0: S0{c: 'c'}}}, "c", []int{1, 1, 2}, 'c'},
+ {S2{}, "d", nil, 0},
+ {S3{}, "S1", nil, 0},
+ {S3{S2: S2{a: 'a'}}, "a", []int{1, 0}, 'a'},
+ {S3{}, "b", nil, 0},
+ {S3{d: 'd'}, "d", []int{2}, 0},
+ {S3{e: 'e'}, "e", []int{3}, 'e'},
+ {S4{a: 'a'}, "a", []int{1}, 'a'},
+ {S4{}, "b", nil, 0},
}
func TestFieldByIndex(t *testing.T) {
diff --git a/src/pkg/regexp/all_test.go b/src/pkg/regexp/all_test.go
index 13a3d3ce51..d5a0e7da6a 100644
--- a/src/pkg/regexp/all_test.go
+++ b/src/pkg/regexp/all_test.go
@@ -37,18 +37,18 @@ type stringError struct {
}
var bad_re = []stringError{
- stringError{`*`, ErrBareClosure},
- stringError{`(abc`, ErrUnmatchedLpar},
- stringError{`abc)`, ErrUnmatchedRpar},
- stringError{`x[a-z`, ErrUnmatchedLbkt},
- stringError{`abc]`, ErrUnmatchedRbkt},
- stringError{`[z-a]`, ErrBadRange},
- stringError{`abc\`, ErrExtraneousBackslash},
- stringError{`a**`, ErrBadClosure},
- stringError{`a*+`, ErrBadClosure},
- stringError{`a??`, ErrBadClosure},
- stringError{`*`, ErrBareClosure},
- stringError{`\x`, ErrBadBackslash},
+ {`*`, ErrBareClosure},
+ {`(abc`, ErrUnmatchedLpar},
+ {`abc)`, ErrUnmatchedRpar},
+ {`x[a-z`, ErrUnmatchedLbkt},
+ {`abc]`, ErrUnmatchedRbkt},
+ {`[z-a]`, ErrBadRange},
+ {`abc\`, ErrExtraneousBackslash},
+ {`a**`, ErrBadClosure},
+ {`a*+`, ErrBadClosure},
+ {`a??`, ErrBadClosure},
+ {`*`, ErrBareClosure},
+ {`\x`, ErrBadBackslash},
}
func compileTest(t *testing.T, expr string, error os.Error) *Regexp {
@@ -115,64 +115,64 @@ type ReplaceTest struct {
var replaceTests = []ReplaceTest{
// Test empty input and/or replacement, with pattern that matches the empty string.
- ReplaceTest{"", "", "", ""},
- ReplaceTest{"", "x", "", "x"},
- ReplaceTest{"", "", "abc", "abc"},
- ReplaceTest{"", "x", "abc", "xaxbxcx"},
+ {"", "", "", ""},
+ {"", "x", "", "x"},
+ {"", "", "abc", "abc"},
+ {"", "x", "abc", "xaxbxcx"},
// Test empty input and/or replacement, with pattern that does not match the empty string.
- ReplaceTest{"b", "", "", ""},
- ReplaceTest{"b", "x", "", ""},
- ReplaceTest{"b", "", "abc", "ac"},
- ReplaceTest{"b", "x", "abc", "axc"},
- ReplaceTest{"y", "", "", ""},
- ReplaceTest{"y", "x", "", ""},
- ReplaceTest{"y", "", "abc", "abc"},
- ReplaceTest{"y", "x", "abc", "abc"},
+ {"b", "", "", ""},
+ {"b", "x", "", ""},
+ {"b", "", "abc", "ac"},
+ {"b", "x", "abc", "axc"},
+ {"y", "", "", ""},
+ {"y", "x", "", ""},
+ {"y", "", "abc", "abc"},
+ {"y", "x", "abc", "abc"},
// Multibyte characters -- verify that we don't try to match in the middle
// of a character.
- ReplaceTest{"[a-c]*", "x", "\u65e5", "x\u65e5x"},
- ReplaceTest{"[^\u65e5]", "x", "abc\u65e5def", "xxx\u65e5xxx"},
+ {"[a-c]*", "x", "\u65e5", "x\u65e5x"},
+ {"[^\u65e5]", "x", "abc\u65e5def", "xxx\u65e5xxx"},
// Start and end of a string.
- ReplaceTest{"^[a-c]*", "x", "abcdabc", "xdabc"},
- ReplaceTest{"[a-c]*$", "x", "abcdabc", "abcdx"},
- ReplaceTest{"^[a-c]*$", "x", "abcdabc", "abcdabc"},
- ReplaceTest{"^[a-c]*", "x", "abc", "x"},
- ReplaceTest{"[a-c]*$", "x", "abc", "x"},
- ReplaceTest{"^[a-c]*$", "x", "abc", "x"},
- ReplaceTest{"^[a-c]*", "x", "dabce", "xdabce"},
- ReplaceTest{"[a-c]*$", "x", "dabce", "dabcex"},
- ReplaceTest{"^[a-c]*$", "x", "dabce", "dabce"},
- ReplaceTest{"^[a-c]*", "x", "", "x"},
- ReplaceTest{"[a-c]*$", "x", "", "x"},
- ReplaceTest{"^[a-c]*$", "x", "", "x"},
-
- ReplaceTest{"^[a-c]+", "x", "abcdabc", "xdabc"},
- ReplaceTest{"[a-c]+$", "x", "abcdabc", "abcdx"},
- ReplaceTest{"^[a-c]+$", "x", "abcdabc", "abcdabc"},
- ReplaceTest{"^[a-c]+", "x", "abc", "x"},
- ReplaceTest{"[a-c]+$", "x", "abc", "x"},
- ReplaceTest{"^[a-c]+$", "x", "abc", "x"},
- ReplaceTest{"^[a-c]+", "x", "dabce", "dabce"},
- ReplaceTest{"[a-c]+$", "x", "dabce", "dabce"},
- ReplaceTest{"^[a-c]+$", "x", "dabce", "dabce"},
- ReplaceTest{"^[a-c]+", "x", "", ""},
- ReplaceTest{"[a-c]+$", "x", "", ""},
- ReplaceTest{"^[a-c]+$", "x", "", ""},
+ {"^[a-c]*", "x", "abcdabc", "xdabc"},
+ {"[a-c]*$", "x", "abcdabc", "abcdx"},
+ {"^[a-c]*$", "x", "abcdabc", "abcdabc"},
+ {"^[a-c]*", "x", "abc", "x"},
+ {"[a-c]*$", "x", "abc", "x"},
+ {"^[a-c]*$", "x", "abc", "x"},
+ {"^[a-c]*", "x", "dabce", "xdabce"},
+ {"[a-c]*$", "x", "dabce", "dabcex"},
+ {"^[a-c]*$", "x", "dabce", "dabce"},
+ {"^[a-c]*", "x", "", "x"},
+ {"[a-c]*$", "x", "", "x"},
+ {"^[a-c]*$", "x", "", "x"},
+
+ {"^[a-c]+", "x", "abcdabc", "xdabc"},
+ {"[a-c]+$", "x", "abcdabc", "abcdx"},
+ {"^[a-c]+$", "x", "abcdabc", "abcdabc"},
+ {"^[a-c]+", "x", "abc", "x"},
+ {"[a-c]+$", "x", "abc", "x"},
+ {"^[a-c]+$", "x", "abc", "x"},
+ {"^[a-c]+", "x", "dabce", "dabce"},
+ {"[a-c]+$", "x", "dabce", "dabce"},
+ {"^[a-c]+$", "x", "dabce", "dabce"},
+ {"^[a-c]+", "x", "", ""},
+ {"[a-c]+$", "x", "", ""},
+ {"^[a-c]+$", "x", "", ""},
// Other cases.
- ReplaceTest{"abc", "def", "abcdefg", "defdefg"},
- ReplaceTest{"bc", "BC", "abcbcdcdedef", "aBCBCdcdedef"},
- ReplaceTest{"abc", "", "abcdabc", "d"},
- ReplaceTest{"x", "xXx", "xxxXxxx", "xXxxXxxXxXxXxxXxxXx"},
- ReplaceTest{"abc", "d", "", ""},
- ReplaceTest{"abc", "d", "abc", "d"},
- ReplaceTest{".+", "x", "abc", "x"},
- ReplaceTest{"[a-c]*", "x", "def", "xdxexfx"},
- ReplaceTest{"[a-c]+", "x", "abcbcdcdedef", "xdxdedef"},
- ReplaceTest{"[a-c]*", "x", "abcbcdcdedef", "xdxdxexdxexfx"},
+ {"abc", "def", "abcdefg", "defdefg"},
+ {"bc", "BC", "abcbcdcdedef", "aBCBCdcdedef"},
+ {"abc", "", "abcdabc", "d"},
+ {"x", "xXx", "xxxXxxx", "xXxxXxxXxXxXxxXxxXx"},
+ {"abc", "d", "", ""},
+ {"abc", "d", "abc", "d"},
+ {".+", "x", "abc", "x"},
+ {"[a-c]*", "x", "def", "xdxexfx"},
+ {"[a-c]+", "x", "abcbcdcdedef", "xdxdedef"},
+ {"[a-c]*", "x", "abcbcdcdedef", "xdxdxexdxexfx"},
}
type ReplaceFuncTest struct {
@@ -182,9 +182,9 @@ type ReplaceFuncTest struct {
}
var replaceFuncTests = []ReplaceFuncTest{
- ReplaceFuncTest{"[a-c]", func(s string) string { return "x" + s + "y" }, "defabcdef", "defxayxbyxcydef"},
- ReplaceFuncTest{"[a-c]+", func(s string) string { return "x" + s + "y" }, "defabcdef", "defxabcydef"},
- ReplaceFuncTest{"[a-c]*", func(s string) string { return "x" + s + "y" }, "defabcdef", "xydxyexyfxabcydxyexyfxy"},
+ {"[a-c]", func(s string) string { return "x" + s + "y" }, "defabcdef", "defxayxbyxcydef"},
+ {"[a-c]+", func(s string) string { return "x" + s + "y" }, "defabcdef", "defxabcydef"},
+ {"[a-c]*", func(s string) string { return "x" + s + "y" }, "defabcdef", "xydxyexyfxabcydxyexyfxy"},
}
func TestReplaceAll(t *testing.T) {
@@ -234,9 +234,9 @@ type QuoteMetaTest struct {
}
var quoteMetaTests = []QuoteMetaTest{
- QuoteMetaTest{``, ``},
- QuoteMetaTest{`foo`, `foo`},
- QuoteMetaTest{`!@#$%^&*()_+-=[{]}\|,<.>/?~`, `!@#\$%\^&\*\(\)_\+-=\[{\]}\\\|,<\.>/\?~`},
+ {``, ``},
+ {`foo`, `foo`},
+ {`!@#$%^&*()_+-=[{]}\|,<.>/?~`, `!@#\$%\^&\*\(\)_\+-=\[{\]}\\\|,<\.>/\?~`},
}
func TestQuoteMeta(t *testing.T) {
@@ -275,16 +275,16 @@ type numSubexpCase struct {
}
var numSubexpCases = []numSubexpCase{
- numSubexpCase{``, 0},
- numSubexpCase{`.*`, 0},
- numSubexpCase{`abba`, 0},
- numSubexpCase{`ab(b)a`, 1},
- numSubexpCase{`ab(.*)a`, 1},
- numSubexpCase{`(.*)ab(.*)a`, 2},
- numSubexpCase{`(.*)(ab)(.*)a`, 3},
- numSubexpCase{`(.*)((a)b)(.*)a`, 4},
- numSubexpCase{`(.*)(\(ab)(.*)a`, 3},
- numSubexpCase{`(.*)(\(a\)b)(.*)a`, 3},
+ {``, 0},
+ {`.*`, 0},
+ {`abba`, 0},
+ {`ab(b)a`, 1},
+ {`ab(.*)a`, 1},
+ {`(.*)ab(.*)a`, 2},
+ {`(.*)(ab)(.*)a`, 3},
+ {`(.*)((a)b)(.*)a`, 4},
+ {`(.*)(\(ab)(.*)a`, 3},
+ {`(.*)(\(a\)b)(.*)a`, 3},
}
func TestNumSubexp(t *testing.T) {
diff --git a/src/pkg/regexp/find_test.go b/src/pkg/regexp/find_test.go
index 6a34cabf5b..07f5586f2b 100644
--- a/src/pkg/regexp/find_test.go
+++ b/src/pkg/regexp/find_test.go
@@ -25,70 +25,70 @@ func (t FindTest) String() string {
}
var findTests = []FindTest{
- FindTest{``, ``, build(1, 0, 0)},
- FindTest{`^abcdefg`, "abcdefg", build(1, 0, 7)},
- FindTest{`a+`, "baaab", build(1, 1, 4)},
- FindTest{"abcd..", "abcdef", build(1, 0, 6)},
- FindTest{`a`, "a", build(1, 0, 1)},
- FindTest{`x`, "y", nil},
- FindTest{`b`, "abc", build(1, 1, 2)},
- FindTest{`.`, "a", build(1, 0, 1)},
- FindTest{`.*`, "abcdef", build(1, 0, 6)},
- FindTest{`^`, "abcde", build(1, 0, 0)},
- FindTest{`$`, "abcde", build(1, 5, 5)},
- FindTest{`^abcd$`, "abcd", build(1, 0, 4)},
- FindTest{`^bcd'`, "abcdef", nil},
- FindTest{`^abcd$`, "abcde", nil},
- FindTest{`a+`, "baaab", build(1, 1, 4)},
- FindTest{`a*`, "baaab", build(3, 0, 0, 1, 4, 5, 5)},
- FindTest{`[a-z]+`, "abcd", build(1, 0, 4)},
- FindTest{`[^a-z]+`, "ab1234cd", build(1, 2, 6)},
- FindTest{`[a\-\]z]+`, "az]-bcz", build(2, 0, 4, 6, 7)},
- FindTest{`[^\n]+`, "abcd\n", build(1, 0, 4)},
- FindTest{`[日本語]+`, "日本語日本語", build(1, 0, 18)},
- FindTest{`日本語+`, "日本語", build(1, 0, 9)},
- FindTest{`日本語+`, "日本語語語語", build(1, 0, 18)},
- FindTest{`()`, "", build(1, 0, 0, 0, 0)},
- FindTest{`(a)`, "a", build(1, 0, 1, 0, 1)},
- FindTest{`(.)(.)`, "日a", build(1, 0, 4, 0, 3, 3, 4)},
- FindTest{`(.*)`, "", build(1, 0, 0, 0, 0)},
- FindTest{`(.*)`, "abcd", build(1, 0, 4, 0, 4)},
- FindTest{`(..)(..)`, "abcd", build(1, 0, 4, 0, 2, 2, 4)},
- FindTest{`(([^xyz]*)(d))`, "abcd", build(1, 0, 4, 0, 4, 0, 3, 3, 4)},
- FindTest{`((a|b|c)*(d))`, "abcd", build(1, 0, 4, 0, 4, 2, 3, 3, 4)},
- FindTest{`(((a|b|c)*)(d))`, "abcd", build(1, 0, 4, 0, 4, 0, 3, 2, 3, 3, 4)},
- FindTest{`\a\b\f\n\r\t\v`, "\a\b\f\n\r\t\v", build(1, 0, 7)},
- FindTest{`[\a\b\f\n\r\t\v]+`, "\a\b\f\n\r\t\v", build(1, 0, 7)},
-
- FindTest{`a*(|(b))c*`, "aacc", build(1, 0, 4, 2, 2, -1, -1)},
- FindTest{`(.*).*`, "ab", build(1, 0, 2, 0, 2)},
- FindTest{`[.]`, ".", build(1, 0, 1)},
- FindTest{`/$`, "/abc/", build(1, 4, 5)},
- FindTest{`/$`, "/abc", nil},
+ {``, ``, build(1, 0, 0)},
+ {`^abcdefg`, "abcdefg", build(1, 0, 7)},
+ {`a+`, "baaab", build(1, 1, 4)},
+ {"abcd..", "abcdef", build(1, 0, 6)},
+ {`a`, "a", build(1, 0, 1)},
+ {`x`, "y", nil},
+ {`b`, "abc", build(1, 1, 2)},
+ {`.`, "a", build(1, 0, 1)},
+ {`.*`, "abcdef", build(1, 0, 6)},
+ {`^`, "abcde", build(1, 0, 0)},
+ {`$`, "abcde", build(1, 5, 5)},
+ {`^abcd$`, "abcd", build(1, 0, 4)},
+ {`^bcd'`, "abcdef", nil},
+ {`^abcd$`, "abcde", nil},
+ {`a+`, "baaab", build(1, 1, 4)},
+ {`a*`, "baaab", build(3, 0, 0, 1, 4, 5, 5)},
+ {`[a-z]+`, "abcd", build(1, 0, 4)},
+ {`[^a-z]+`, "ab1234cd", build(1, 2, 6)},
+ {`[a\-\]z]+`, "az]-bcz", build(2, 0, 4, 6, 7)},
+ {`[^\n]+`, "abcd\n", build(1, 0, 4)},
+ {`[日本語]+`, "日本語日本語", build(1, 0, 18)},
+ {`日本語+`, "日本語", build(1, 0, 9)},
+ {`日本語+`, "日本語語語語", build(1, 0, 18)},
+ {`()`, "", build(1, 0, 0, 0, 0)},
+ {`(a)`, "a", build(1, 0, 1, 0, 1)},
+ {`(.)(.)`, "日a", build(1, 0, 4, 0, 3, 3, 4)},
+ {`(.*)`, "", build(1, 0, 0, 0, 0)},
+ {`(.*)`, "abcd", build(1, 0, 4, 0, 4)},
+ {`(..)(..)`, "abcd", build(1, 0, 4, 0, 2, 2, 4)},
+ {`(([^xyz]*)(d))`, "abcd", build(1, 0, 4, 0, 4, 0, 3, 3, 4)},
+ {`((a|b|c)*(d))`, "abcd", build(1, 0, 4, 0, 4, 2, 3, 3, 4)},
+ {`(((a|b|c)*)(d))`, "abcd", build(1, 0, 4, 0, 4, 0, 3, 2, 3, 3, 4)},
+ {`\a\b\f\n\r\t\v`, "\a\b\f\n\r\t\v", build(1, 0, 7)},
+ {`[\a\b\f\n\r\t\v]+`, "\a\b\f\n\r\t\v", build(1, 0, 7)},
+
+ {`a*(|(b))c*`, "aacc", build(1, 0, 4, 2, 2, -1, -1)},
+ {`(.*).*`, "ab", build(1, 0, 2, 0, 2)},
+ {`[.]`, ".", build(1, 0, 1)},
+ {`/$`, "/abc/", build(1, 4, 5)},
+ {`/$`, "/abc", nil},
// multiple matches
- FindTest{`.`, "abc", build(3, 0, 1, 1, 2, 2, 3)},
- FindTest{`(.)`, "abc", build(3, 0, 1, 0, 1, 1, 2, 1, 2, 2, 3, 2, 3)},
- FindTest{`.(.)`, "abcd", build(2, 0, 2, 1, 2, 2, 4, 3, 4)},
- FindTest{`ab*`, "abbaab", build(3, 0, 3, 3, 4, 4, 6)},
- FindTest{`a(b*)`, "abbaab", build(3, 0, 3, 1, 3, 3, 4, 4, 4, 4, 6, 5, 6)},
+ {`.`, "abc", build(3, 0, 1, 1, 2, 2, 3)},
+ {`(.)`, "abc", build(3, 0, 1, 0, 1, 1, 2, 1, 2, 2, 3, 2, 3)},
+ {`.(.)`, "abcd", build(2, 0, 2, 1, 2, 2, 4, 3, 4)},
+ {`ab*`, "abbaab", build(3, 0, 3, 3, 4, 4, 6)},
+ {`a(b*)`, "abbaab", build(3, 0, 3, 1, 3, 3, 4, 4, 4, 4, 6, 5, 6)},
// fixed bugs
- FindTest{`ab$`, "cab", build(1, 1, 3)},
- FindTest{`axxb$`, "axxcb", nil},
- FindTest{`data`, "daXY data", build(1, 5, 9)},
- FindTest{`da(.)a$`, "daXY data", build(1, 5, 9, 7, 8)},
+ {`ab$`, "cab", build(1, 1, 3)},
+ {`axxb$`, "axxcb", nil},
+ {`data`, "daXY data", build(1, 5, 9)},
+ {`da(.)a$`, "daXY data", build(1, 5, 9, 7, 8)},
// can backslash-escape any punctuation
- FindTest{`\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\{\|\}\~`,
+ {`\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\{\|\}\~`,
`!"#$%&'()*+,-./:;<=>?@[\]^_{|}~`, build(1, 0, 31)},
- FindTest{`[\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\{\|\}\~]+`,
+ {`[\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\{\|\}\~]+`,
`!"#$%&'()*+,-./:;<=>?@[\]^_{|}~`, build(1, 0, 31)},
- FindTest{"\\`", "`", build(1, 0, 1)},
- FindTest{"[\\`]+", "`", build(1, 0, 1)},
+ {"\\`", "`", build(1, 0, 1)},
+ {"[\\`]+", "`", build(1, 0, 1)},
// long set of matches (longer than startSize)
- FindTest{
+ {
".",
"qwertyuiopasdfghjklzxcvbnm1234567890",
build(36, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10,
diff --git a/src/pkg/scanner/scanner_test.go b/src/pkg/scanner/scanner_test.go
index 563ceea0cc..a9d46dd1bc 100644
--- a/src/pkg/scanner/scanner_test.go
+++ b/src/pkg/scanner/scanner_test.go
@@ -53,14 +53,14 @@ func readRuneSegments(t *testing.T, segments []string) {
var segmentList = [][]string{
- []string{},
- []string{""},
- []string{"日", "本語"},
- []string{"\u65e5", "\u672c", "\u8a9e"},
- []string{"\U000065e5", " ", "\U0000672c", "\U00008a9e"},
- []string{"\xe6", "\x97\xa5\xe6", "\x9c\xac\xe8\xaa\x9e"},
- []string{"Hello", ", ", "World", "!"},
- []string{"Hello", ", ", "", "World", "!"},
+ {},
+ {""},
+ {"日", "本語"},
+ {"\u65e5", "\u672c", "\u8a9e"},
+ {"\U000065e5", " ", "\U0000672c", "\U00008a9e"},
+ {"\xe6", "\x97\xa5\xe6", "\x9c\xac\xe8\xaa\x9e"},
+ {"Hello", ", ", "World", "!"},
+ {"Hello", ", ", "", "World", "!"},
}
@@ -79,161 +79,161 @@ type token struct {
var f100 = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
var tokenList = []token{
- token{Comment, "// line comments\n"},
- token{Comment, "//\n"},
- token{Comment, "////\n"},
- token{Comment, "// comment\n"},
- token{Comment, "// /* comment */\n"},
- token{Comment, "// // comment //\n"},
- token{Comment, "//" + f100 + "\n"},
-
- token{Comment, "// general comments\n"},
- token{Comment, "/**/"},
- token{Comment, "/***/"},
- token{Comment, "/* comment */"},
- token{Comment, "/* // comment */"},
- token{Comment, "/* /* comment */"},
- token{Comment, "/*\n comment\n*/"},
- token{Comment, "/*" + f100 + "*/"},
-
- token{Comment, "// identifiers\n"},
- token{Ident, "a"},
- token{Ident, "a0"},
- token{Ident, "foobar"},
- token{Ident, "abc123"},
- token{Ident, "LGTM"},
- token{Ident, "_"},
- token{Ident, "_abc123"},
- token{Ident, "abc123_"},
- token{Ident, "_abc_123_"},
- token{Ident, "_äöü"},
- token{Ident, "_本"},
+ {Comment, "// line comments\n"},
+ {Comment, "//\n"},
+ {Comment, "////\n"},
+ {Comment, "// comment\n"},
+ {Comment, "// /* comment */\n"},
+ {Comment, "// // comment //\n"},
+ {Comment, "//" + f100 + "\n"},
+
+ {Comment, "// general comments\n"},
+ {Comment, "/**/"},
+ {Comment, "/***/"},
+ {Comment, "/* comment */"},
+ {Comment, "/* // comment */"},
+ {Comment, "/* /* comment */"},
+ {Comment, "/*\n comment\n*/"},
+ {Comment, "/*" + f100 + "*/"},
+
+ {Comment, "// identifiers\n"},
+ {Ident, "a"},
+ {Ident, "a0"},
+ {Ident, "foobar"},
+ {Ident, "abc123"},
+ {Ident, "LGTM"},
+ {Ident, "_"},
+ {Ident, "_abc123"},
+ {Ident, "abc123_"},
+ {Ident, "_abc_123_"},
+ {Ident, "_äöü"},
+ {Ident, "_本"},
// TODO for unknown reasons these fail when checking the literals
/*
token{Ident, "äöü"},
token{Ident, "本"},
*/
- token{Ident, "a۰۱۸"},
- token{Ident, "foo६४"},
- token{Ident, "bar9876"},
- token{Ident, f100},
-
- token{Comment, "// decimal ints\n"},
- token{Int, "0"},
- token{Int, "1"},
- token{Int, "9"},
- token{Int, "42"},
- token{Int, "1234567890"},
-
- token{Comment, "// octal ints\n"},
- token{Int, "00"},
- token{Int, "01"},
- token{Int, "07"},
- token{Int, "042"},
- token{Int, "01234567"},
-
- token{Comment, "// hexadecimal ints\n"},
- token{Int, "0x0"},
- token{Int, "0x1"},
- token{Int, "0xf"},
- token{Int, "0x42"},
- token{Int, "0x123456789abcDEF"},
- token{Int, "0x" + f100},
- token{Int, "0X0"},
- token{Int, "0X1"},
- token{Int, "0XF"},
- token{Int, "0X42"},
- token{Int, "0X123456789abcDEF"},
- token{Int, "0X" + f100},
-
- token{Comment, "// floats\n"},
- token{Float, "0."},
- token{Float, "1."},
- token{Float, "42."},
- token{Float, "01234567890."},
- token{Float, ".0"},
- token{Float, ".1"},
- token{Float, ".42"},
- token{Float, ".0123456789"},
- token{Float, "0.0"},
- token{Float, "1.0"},
- token{Float, "42.0"},
- token{Float, "01234567890.0"},
- token{Float, "0e0"},
- token{Float, "1e0"},
- token{Float, "42e0"},
- token{Float, "01234567890e0"},
- token{Float, "0E0"},
- token{Float, "1E0"},
- token{Float, "42E0"},
- token{Float, "01234567890E0"},
- token{Float, "0e+10"},
- token{Float, "1e-10"},
- token{Float, "42e+10"},
- token{Float, "01234567890e-10"},
- token{Float, "0E+10"},
- token{Float, "1E-10"},
- token{Float, "42E+10"},
- token{Float, "01234567890E-10"},
-
- token{Comment, "// chars\n"},
- token{Char, `' '`},
- token{Char, `'a'`},
- token{Char, `'本'`},
- token{Char, `'\a'`},
- token{Char, `'\b'`},
- token{Char, `'\f'`},
- token{Char, `'\n'`},
- token{Char, `'\r'`},
- token{Char, `'\t'`},
- token{Char, `'\v'`},
- token{Char, `'\''`},
- token{Char, `'\000'`},
- token{Char, `'\777'`},
- token{Char, `'\x00'`},
- token{Char, `'\xff'`},
- token{Char, `'\u0000'`},
- token{Char, `'\ufA16'`},
- token{Char, `'\U00000000'`},
- token{Char, `'\U0000ffAB'`},
-
- token{Comment, "// strings\n"},
- token{String, `" "`},
- token{String, `"a"`},
- token{String, `"本"`},
- token{String, `"\a"`},
- token{String, `"\b"`},
- token{String, `"\f"`},
- token{String, `"\n"`},
- token{String, `"\r"`},
- token{String, `"\t"`},
- token{String, `"\v"`},
- token{String, `"\""`},
- token{String, `"\000"`},
- token{String, `"\777"`},
- token{String, `"\x00"`},
- token{String, `"\xff"`},
- token{String, `"\u0000"`},
- token{String, `"\ufA16"`},
- token{String, `"\U00000000"`},
- token{String, `"\U0000ffAB"`},
- token{String, `"` + f100 + `"`},
-
- token{Comment, "// raw strings\n"},
- token{String, "``"},
- token{String, "`\\`"},
- token{String, "`" + "\n\n/* foobar */\n\n" + "`"},
- token{String, "`" + f100 + "`"},
-
- token{Comment, "// individual characters\n"},
+ {Ident, "a۰۱۸"},
+ {Ident, "foo६४"},
+ {Ident, "bar9876"},
+ {Ident, f100},
+
+ {Comment, "// decimal ints\n"},
+ {Int, "0"},
+ {Int, "1"},
+ {Int, "9"},
+ {Int, "42"},
+ {Int, "1234567890"},
+
+ {Comment, "// octal ints\n"},
+ {Int, "00"},
+ {Int, "01"},
+ {Int, "07"},
+ {Int, "042"},
+ {Int, "01234567"},
+
+ {Comment, "// hexadecimal ints\n"},
+ {Int, "0x0"},
+ {Int, "0x1"},
+ {Int, "0xf"},
+ {Int, "0x42"},
+ {Int, "0x123456789abcDEF"},
+ {Int, "0x" + f100},
+ {Int, "0X0"},
+ {Int, "0X1"},
+ {Int, "0XF"},
+ {Int, "0X42"},
+ {Int, "0X123456789abcDEF"},
+ {Int, "0X" + f100},
+
+ {Comment, "// floats\n"},
+ {Float, "0."},
+ {Float, "1."},
+ {Float, "42."},
+ {Float, "01234567890."},
+ {Float, ".0"},
+ {Float, ".1"},
+ {Float, ".42"},
+ {Float, ".0123456789"},
+ {Float, "0.0"},
+ {Float, "1.0"},
+ {Float, "42.0"},
+ {Float, "01234567890.0"},
+ {Float, "0e0"},
+ {Float, "1e0"},
+ {Float, "42e0"},
+ {Float, "01234567890e0"},
+ {Float, "0E0"},
+ {Float, "1E0"},
+ {Float, "42E0"},
+ {Float, "01234567890E0"},
+ {Float, "0e+10"},
+ {Float, "1e-10"},
+ {Float, "42e+10"},
+ {Float, "01234567890e-10"},
+ {Float, "0E+10"},
+ {Float, "1E-10"},
+ {Float, "42E+10"},
+ {Float, "01234567890E-10"},
+
+ {Comment, "// chars\n"},
+ {Char, `' '`},
+ {Char, `'a'`},
+ {Char, `'本'`},
+ {Char, `'\a'`},
+ {Char, `'\b'`},
+ {Char, `'\f'`},
+ {Char, `'\n'`},
+ {Char, `'\r'`},
+ {Char, `'\t'`},
+ {Char, `'\v'`},
+ {Char, `'\''`},
+ {Char, `'\000'`},
+ {Char, `'\777'`},
+ {Char, `'\x00'`},
+ {Char, `'\xff'`},
+ {Char, `'\u0000'`},
+ {Char, `'\ufA16'`},
+ {Char, `'\U00000000'`},
+ {Char, `'\U0000ffAB'`},
+
+ {Comment, "// strings\n"},
+ {String, `" "`},
+ {String, `"a"`},
+ {String, `"本"`},
+ {String, `"\a"`},
+ {String, `"\b"`},
+ {String, `"\f"`},
+ {String, `"\n"`},
+ {String, `"\r"`},
+ {String, `"\t"`},
+ {String, `"\v"`},
+ {String, `"\""`},
+ {String, `"\000"`},
+ {String, `"\777"`},
+ {String, `"\x00"`},
+ {String, `"\xff"`},
+ {String, `"\u0000"`},
+ {String, `"\ufA16"`},
+ {String, `"\U00000000"`},
+ {String, `"\U0000ffAB"`},
+ {String, `"` + f100 + `"`},
+
+ {Comment, "// raw strings\n"},
+ {String, "``"},
+ {String, "`\\`"},
+ {String, "`" + "\n\n/* foobar */\n\n" + "`"},
+ {String, "`" + f100 + "`"},
+
+ {Comment, "// individual characters\n"},
// NUL character is not allowed
- token{'\x01', "\x01"},
- token{' ' - 1, string(' ' - 1)},
- token{'+', "+"},
- token{'/', "/"},
- token{'.', "."},
- token{'~', "~"},
- token{'(', "("},
+ {'\x01', "\x01"},
+ {' ' - 1, string(' ' - 1)},
+ {'+', "+"},
+ {'/', "/"},
+ {'.', "."},
+ {'~', "~"},
+ {'(', "("},
}
diff --git a/src/pkg/smtp/smtp_test.go b/src/pkg/smtp/smtp_test.go
index 2e96813967..49363adf0a 100644
--- a/src/pkg/smtp/smtp_test.go
+++ b/src/pkg/smtp/smtp_test.go
@@ -22,8 +22,8 @@ type authTest struct {
}
var authTests = []authTest{
- authTest{PlainAuth("", "user", "pass", "testserver"), []string{}, "PLAIN", []string{"\x00user\x00pass"}},
- authTest{PlainAuth("foo", "bar", "baz", "testserver"), []string{}, "PLAIN", []string{"foo\x00bar\x00baz"}},
+ {PlainAuth("", "user", "pass", "testserver"), []string{}, "PLAIN", []string{"\x00user\x00pass"}},
+ {PlainAuth("foo", "bar", "baz", "testserver"), []string{}, "PLAIN", []string{"foo\x00bar\x00baz"}},
}
func TestAuth(t *testing.T) {
diff --git a/src/pkg/strconv/atob_test.go b/src/pkg/strconv/atob_test.go
index ffad4b21b1..7a95456214 100644
--- a/src/pkg/strconv/atob_test.go
+++ b/src/pkg/strconv/atob_test.go
@@ -17,18 +17,18 @@ type atobTest struct {
}
var atobtests = []atobTest{
- atobTest{"", false, os.EINVAL},
- atobTest{"asdf", false, os.EINVAL},
- atobTest{"0", false, nil},
- atobTest{"f", false, nil},
- atobTest{"F", false, nil},
- atobTest{"FALSE", false, nil},
- atobTest{"false", false, nil},
- atobTest{"1", true, nil},
- atobTest{"t", true, nil},
- atobTest{"T", true, nil},
- atobTest{"TRUE", true, nil},
- atobTest{"true", true, nil},
+ {"", false, os.EINVAL},
+ {"asdf", false, os.EINVAL},
+ {"0", false, nil},
+ {"f", false, nil},
+ {"F", false, nil},
+ {"FALSE", false, nil},
+ {"false", false, nil},
+ {"1", true, nil},
+ {"t", true, nil},
+ {"T", true, nil},
+ {"TRUE", true, nil},
+ {"true", true, nil},
}
func TestAtob(t *testing.T) {
diff --git a/src/pkg/strconv/atof_test.go b/src/pkg/strconv/atof_test.go
index d59fc0d7b9..1f7543891f 100644
--- a/src/pkg/strconv/atof_test.go
+++ b/src/pkg/strconv/atof_test.go
@@ -18,80 +18,80 @@ type atofTest struct {
}
var atoftests = []atofTest{
- atofTest{"", "0", os.EINVAL},
- atofTest{"1", "1", nil},
- atofTest{"+1", "1", nil},
- atofTest{"1x", "0", os.EINVAL},
- atofTest{"1.1.", "0", os.EINVAL},
- atofTest{"1e23", "1e+23", nil},
- atofTest{"100000000000000000000000", "1e+23", nil},
- atofTest{"1e-100", "1e-100", nil},
- atofTest{"123456700", "1.234567e+08", nil},
- atofTest{"99999999999999974834176", "9.999999999999997e+22", nil},
- atofTest{"100000000000000000000001", "1.0000000000000001e+23", nil},
- atofTest{"100000000000000008388608", "1.0000000000000001e+23", nil},
- atofTest{"100000000000000016777215", "1.0000000000000001e+23", nil},
- atofTest{"100000000000000016777216", "1.0000000000000003e+23", nil},
- atofTest{"-1", "-1", nil},
- atofTest{"-0", "-0", nil},
- atofTest{"1e-20", "1e-20", nil},
- atofTest{"625e-3", "0.625", nil},
+ {"", "0", os.EINVAL},
+ {"1", "1", nil},
+ {"+1", "1", nil},
+ {"1x", "0", os.EINVAL},
+ {"1.1.", "0", os.EINVAL},
+ {"1e23", "1e+23", nil},
+ {"100000000000000000000000", "1e+23", nil},
+ {"1e-100", "1e-100", nil},
+ {"123456700", "1.234567e+08", nil},
+ {"99999999999999974834176", "9.999999999999997e+22", nil},
+ {"100000000000000000000001", "1.0000000000000001e+23", nil},
+ {"100000000000000008388608", "1.0000000000000001e+23", nil},
+ {"100000000000000016777215", "1.0000000000000001e+23", nil},
+ {"100000000000000016777216", "1.0000000000000003e+23", nil},
+ {"-1", "-1", nil},
+ {"-0", "-0", nil},
+ {"1e-20", "1e-20", nil},
+ {"625e-3", "0.625", nil},
// largest float64
- atofTest{"1.7976931348623157e308", "1.7976931348623157e+308", nil},
- atofTest{"-1.7976931348623157e308", "-1.7976931348623157e+308", nil},
+ {"1.7976931348623157e308", "1.7976931348623157e+308", nil},
+ {"-1.7976931348623157e308", "-1.7976931348623157e+308", nil},
// next float64 - too large
- atofTest{"1.7976931348623159e308", "+Inf", os.ERANGE},
- atofTest{"-1.7976931348623159e308", "-Inf", os.ERANGE},
+ {"1.7976931348623159e308", "+Inf", os.ERANGE},
+ {"-1.7976931348623159e308", "-Inf", os.ERANGE},
// the border is ...158079
// borderline - okay
- atofTest{"1.7976931348623158e308", "1.7976931348623157e+308", nil},
- atofTest{"-1.7976931348623158e308", "-1.7976931348623157e+308", nil},
+ {"1.7976931348623158e308", "1.7976931348623157e+308", nil},
+ {"-1.7976931348623158e308", "-1.7976931348623157e+308", nil},
// borderline - too large
- atofTest{"1.797693134862315808e308", "+Inf", os.ERANGE},
- atofTest{"-1.797693134862315808e308", "-Inf", os.ERANGE},
+ {"1.797693134862315808e308", "+Inf", os.ERANGE},
+ {"-1.797693134862315808e308", "-Inf", os.ERANGE},
// a little too large
- atofTest{"1e308", "1e+308", nil},
- atofTest{"2e308", "+Inf", os.ERANGE},
- atofTest{"1e309", "+Inf", os.ERANGE},
+ {"1e308", "1e+308", nil},
+ {"2e308", "+Inf", os.ERANGE},
+ {"1e309", "+Inf", os.ERANGE},
// way too large
- atofTest{"1e310", "+Inf", os.ERANGE},
- atofTest{"-1e310", "-Inf", os.ERANGE},
- atofTest{"1e400", "+Inf", os.ERANGE},
- atofTest{"-1e400", "-Inf", os.ERANGE},
- atofTest{"1e400000", "+Inf", os.ERANGE},
- atofTest{"-1e400000", "-Inf", os.ERANGE},
+ {"1e310", "+Inf", os.ERANGE},
+ {"-1e310", "-Inf", os.ERANGE},
+ {"1e400", "+Inf", os.ERANGE},
+ {"-1e400", "-Inf", os.ERANGE},
+ {"1e400000", "+Inf", os.ERANGE},
+ {"-1e400000", "-Inf", os.ERANGE},
// denormalized
- atofTest{"1e-305", "1e-305", nil},
- atofTest{"1e-306", "1e-306", nil},
- atofTest{"1e-307", "1e-307", nil},
- atofTest{"1e-308", "1e-308", nil},
- atofTest{"1e-309", "1e-309", nil},
- atofTest{"1e-310", "1e-310", nil},
- atofTest{"1e-322", "1e-322", nil},
+ {"1e-305", "1e-305", nil},
+ {"1e-306", "1e-306", nil},
+ {"1e-307", "1e-307", nil},
+ {"1e-308", "1e-308", nil},
+ {"1e-309", "1e-309", nil},
+ {"1e-310", "1e-310", nil},
+ {"1e-322", "1e-322", nil},
// smallest denormal
- atofTest{"5e-324", "5e-324", nil},
- atofTest{"4e-324", "5e-324", nil},
- atofTest{"3e-324", "5e-324", nil},
+ {"5e-324", "5e-324", nil},
+ {"4e-324", "5e-324", nil},
+ {"3e-324", "5e-324", nil},
// too small
- atofTest{"2e-324", "0", nil},
+ {"2e-324", "0", nil},
// way too small
- atofTest{"1e-350", "0", nil},
- atofTest{"1e-400000", "0", nil},
+ {"1e-350", "0", nil},
+ {"1e-400000", "0", nil},
// try to overflow exponent
- atofTest{"1e-4294967296", "0", nil},
- atofTest{"1e+4294967296", "+Inf", os.ERANGE},
- atofTest{"1e-18446744073709551616", "0", nil},
- atofTest{"1e+18446744073709551616", "+Inf", os.ERANGE},
+ {"1e-4294967296", "0", nil},
+ {"1e+4294967296", "+Inf", os.ERANGE},
+ {"1e-18446744073709551616", "0", nil},
+ {"1e+18446744073709551616", "+Inf", os.ERANGE},
// Parse errors
- atofTest{"1e", "0", os.EINVAL},
- atofTest{"1e-", "0", os.EINVAL},
- atofTest{".e-1", "0", os.EINVAL},
+ {"1e", "0", os.EINVAL},
+ {"1e-", "0", os.EINVAL},
+ {".e-1", "0", os.EINVAL},
}
func init() {
diff --git a/src/pkg/strconv/atoi_test.go b/src/pkg/strconv/atoi_test.go
index a914d70ddf..0b9f295537 100644
--- a/src/pkg/strconv/atoi_test.go
+++ b/src/pkg/strconv/atoi_test.go
@@ -18,37 +18,37 @@ type atoui64Test struct {
}
var atoui64tests = []atoui64Test{
- atoui64Test{"", 0, os.EINVAL},
- atoui64Test{"0", 0, nil},
- atoui64Test{"1", 1, nil},
- atoui64Test{"12345", 12345, nil},
- atoui64Test{"012345", 12345, nil},
- atoui64Test{"12345x", 0, os.EINVAL},
- atoui64Test{"98765432100", 98765432100, nil},
- atoui64Test{"18446744073709551615", 1<<64 - 1, nil},
- atoui64Test{"18446744073709551616", 1<<64 - 1, os.ERANGE},
- atoui64Test{"18446744073709551620", 1<<64 - 1, os.ERANGE},
+ {"", 0, os.EINVAL},
+ {"0", 0, nil},
+ {"1", 1, nil},
+ {"12345", 12345, nil},
+ {"012345", 12345, nil},
+ {"12345x", 0, os.EINVAL},
+ {"98765432100", 98765432100, nil},
+ {"18446744073709551615", 1<<64 - 1, nil},
+ {"18446744073709551616", 1<<64 - 1, os.ERANGE},
+ {"18446744073709551620", 1<<64 - 1, os.ERANGE},
}
var btoui64tests = []atoui64Test{
- atoui64Test{"", 0, os.EINVAL},
- atoui64Test{"0", 0, nil},
- atoui64Test{"1", 1, nil},
- atoui64Test{"12345", 12345, nil},
- atoui64Test{"012345", 012345, nil},
- atoui64Test{"0x12345", 0x12345, nil},
- atoui64Test{"0X12345", 0x12345, nil},
- atoui64Test{"12345x", 0, os.EINVAL},
- atoui64Test{"98765432100", 98765432100, nil},
- atoui64Test{"18446744073709551615", 1<<64 - 1, nil},
- atoui64Test{"18446744073709551616", 1<<64 - 1, os.ERANGE},
- atoui64Test{"18446744073709551620", 1<<64 - 1, os.ERANGE},
- atoui64Test{"0xFFFFFFFFFFFFFFFF", 1<<64 - 1, nil},
- atoui64Test{"0x10000000000000000", 1<<64 - 1, os.ERANGE},
- atoui64Test{"01777777777777777777777", 1<<64 - 1, nil},
- atoui64Test{"01777777777777777777778", 0, os.EINVAL},
- atoui64Test{"02000000000000000000000", 1<<64 - 1, os.ERANGE},
- atoui64Test{"0200000000000000000000", 1 << 61, nil},
+ {"", 0, os.EINVAL},
+ {"0", 0, nil},
+ {"1", 1, nil},
+ {"12345", 12345, nil},
+ {"012345", 012345, nil},
+ {"0x12345", 0x12345, nil},
+ {"0X12345", 0x12345, nil},
+ {"12345x", 0, os.EINVAL},
+ {"98765432100", 98765432100, nil},
+ {"18446744073709551615", 1<<64 - 1, nil},
+ {"18446744073709551616", 1<<64 - 1, os.ERANGE},
+ {"18446744073709551620", 1<<64 - 1, os.ERANGE},
+ {"0xFFFFFFFFFFFFFFFF", 1<<64 - 1, nil},
+ {"0x10000000000000000", 1<<64 - 1, os.ERANGE},
+ {"01777777777777777777777", 1<<64 - 1, nil},
+ {"01777777777777777777778", 0, os.EINVAL},
+ {"02000000000000000000000", 1<<64 - 1, os.ERANGE},
+ {"0200000000000000000000", 1 << 61, nil},
}
type atoi64Test struct {
@@ -58,47 +58,47 @@ type atoi64Test struct {
}
var atoi64tests = []atoi64Test{
- atoi64Test{"", 0, os.EINVAL},
- atoi64Test{"0", 0, nil},
- atoi64Test{"-0", 0, nil},
- atoi64Test{"1", 1, nil},
- atoi64Test{"-1", -1, nil},
- atoi64Test{"12345", 12345, nil},
- atoi64Test{"-12345", -12345, nil},
- atoi64Test{"012345", 12345, nil},
- atoi64Test{"-012345", -12345, nil},
- atoi64Test{"98765432100", 98765432100, nil},
- atoi64Test{"-98765432100", -98765432100, nil},
- atoi64Test{"9223372036854775807", 1<<63 - 1, nil},
- atoi64Test{"-9223372036854775807", -(1<<63 - 1), nil},
- atoi64Test{"9223372036854775808", 1<<63 - 1, os.ERANGE},
- atoi64Test{"-9223372036854775808", -1 << 63, nil},
- atoi64Test{"9223372036854775809", 1<<63 - 1, os.ERANGE},
- atoi64Test{"-9223372036854775809", -1 << 63, os.ERANGE},
+ {"", 0, os.EINVAL},
+ {"0", 0, nil},
+ {"-0", 0, nil},
+ {"1", 1, nil},
+ {"-1", -1, nil},
+ {"12345", 12345, nil},
+ {"-12345", -12345, nil},
+ {"012345", 12345, nil},
+ {"-012345", -12345, nil},
+ {"98765432100", 98765432100, nil},
+ {"-98765432100", -98765432100, nil},
+ {"9223372036854775807", 1<<63 - 1, nil},
+ {"-9223372036854775807", -(1<<63 - 1), nil},
+ {"9223372036854775808", 1<<63 - 1, os.ERANGE},
+ {"-9223372036854775808", -1 << 63, nil},
+ {"9223372036854775809", 1<<63 - 1, os.ERANGE},
+ {"-9223372036854775809", -1 << 63, os.ERANGE},
}
var btoi64tests = []atoi64Test{
- atoi64Test{"", 0, os.EINVAL},
- atoi64Test{"0", 0, nil},
- atoi64Test{"-0", 0, nil},
- atoi64Test{"1", 1, nil},
- atoi64Test{"-1", -1, nil},
- atoi64Test{"12345", 12345, nil},
- atoi64Test{"-12345", -12345, nil},
- atoi64Test{"012345", 012345, nil},
- atoi64Test{"-012345", -012345, nil},
- atoi64Test{"0x12345", 0x12345, nil},
- atoi64Test{"-0X12345", -0x12345, nil},
- atoi64Test{"12345x", 0, os.EINVAL},
- atoi64Test{"-12345x", 0, os.EINVAL},
- atoi64Test{"98765432100", 98765432100, nil},
- atoi64Test{"-98765432100", -98765432100, nil},
- atoi64Test{"9223372036854775807", 1<<63 - 1, nil},
- atoi64Test{"-9223372036854775807", -(1<<63 - 1), nil},
- atoi64Test{"9223372036854775808", 1<<63 - 1, os.ERANGE},
- atoi64Test{"-9223372036854775808", -1 << 63, nil},
- atoi64Test{"9223372036854775809", 1<<63 - 1, os.ERANGE},
- atoi64Test{"-9223372036854775809", -1 << 63, os.ERANGE},
+ {"", 0, os.EINVAL},
+ {"0", 0, nil},
+ {"-0", 0, nil},
+ {"1", 1, nil},
+ {"-1", -1, nil},
+ {"12345", 12345, nil},
+ {"-12345", -12345, nil},
+ {"012345", 012345, nil},
+ {"-012345", -012345, nil},
+ {"0x12345", 0x12345, nil},
+ {"-0X12345", -0x12345, nil},
+ {"12345x", 0, os.EINVAL},
+ {"-12345x", 0, os.EINVAL},
+ {"98765432100", 98765432100, nil},
+ {"-98765432100", -98765432100, nil},
+ {"9223372036854775807", 1<<63 - 1, nil},
+ {"-9223372036854775807", -(1<<63 - 1), nil},
+ {"9223372036854775808", 1<<63 - 1, os.ERANGE},
+ {"-9223372036854775808", -1 << 63, nil},
+ {"9223372036854775809", 1<<63 - 1, os.ERANGE},
+ {"-9223372036854775809", -1 << 63, os.ERANGE},
}
type atoui32Test struct {
@@ -108,15 +108,15 @@ type atoui32Test struct {
}
var atoui32tests = []atoui32Test{
- atoui32Test{"", 0, os.EINVAL},
- atoui32Test{"0", 0, nil},
- atoui32Test{"1", 1, nil},
- atoui32Test{"12345", 12345, nil},
- atoui32Test{"012345", 12345, nil},
- atoui32Test{"12345x", 0, os.EINVAL},
- atoui32Test{"987654321", 987654321, nil},
- atoui32Test{"4294967295", 1<<32 - 1, nil},
- atoui32Test{"4294967296", 1<<32 - 1, os.ERANGE},
+ {"", 0, os.EINVAL},
+ {"0", 0, nil},
+ {"1", 1, nil},
+ {"12345", 12345, nil},
+ {"012345", 12345, nil},
+ {"12345x", 0, os.EINVAL},
+ {"987654321", 987654321, nil},
+ {"4294967295", 1<<32 - 1, nil},
+ {"4294967296", 1<<32 - 1, os.ERANGE},
}
type atoi32Test struct {
@@ -126,25 +126,25 @@ type atoi32Test struct {
}
var atoi32tests = []atoi32Test{
- atoi32Test{"", 0, os.EINVAL},
- atoi32Test{"0", 0, nil},
- atoi32Test{"-0", 0, nil},
- atoi32Test{"1", 1, nil},
- atoi32Test{"-1", -1, nil},
- atoi32Test{"12345", 12345, nil},
- atoi32Test{"-12345", -12345, nil},
- atoi32Test{"012345", 12345, nil},
- atoi32Test{"-012345", -12345, nil},
- atoi32Test{"12345x", 0, os.EINVAL},
- atoi32Test{"-12345x", 0, os.EINVAL},
- atoi32Test{"987654321", 987654321, nil},
- atoi32Test{"-987654321", -987654321, nil},
- atoi32Test{"2147483647", 1<<31 - 1, nil},
- atoi32Test{"-2147483647", -(1<<31 - 1), nil},
- atoi32Test{"2147483648", 1<<31 - 1, os.ERANGE},
- atoi32Test{"-2147483648", -1 << 31, nil},
- atoi32Test{"2147483649", 1<<31 - 1, os.ERANGE},
- atoi32Test{"-2147483649", -1 << 31, os.ERANGE},
+ {"", 0, os.EINVAL},
+ {"0", 0, nil},
+ {"-0", 0, nil},
+ {"1", 1, nil},
+ {"-1", -1, nil},
+ {"12345", 12345, nil},
+ {"-12345", -12345, nil},
+ {"012345", 12345, nil},
+ {"-012345", -12345, nil},
+ {"12345x", 0, os.EINVAL},
+ {"-12345x", 0, os.EINVAL},
+ {"987654321", 987654321, nil},
+ {"-987654321", -987654321, nil},
+ {"2147483647", 1<<31 - 1, nil},
+ {"-2147483647", -(1<<31 - 1), nil},
+ {"2147483648", 1<<31 - 1, os.ERANGE},
+ {"-2147483648", -1 << 31, nil},
+ {"2147483649", 1<<31 - 1, os.ERANGE},
+ {"-2147483649", -1 << 31, os.ERANGE},
}
func init() {
diff --git a/src/pkg/strconv/decimal.go b/src/pkg/strconv/decimal.go
index 3be61d7bc7..3a5cf1ba68 100644
--- a/src/pkg/strconv/decimal.go
+++ b/src/pkg/strconv/decimal.go
@@ -187,34 +187,34 @@ var leftcheats = []leftCheat{
int(log2*NR+1), $0, 2**NR)
}'
*/
- leftCheat{0, ""},
- leftCheat{1, "5"}, // * 2
- leftCheat{1, "25"}, // * 4
- leftCheat{1, "125"}, // * 8
- leftCheat{2, "625"}, // * 16
- leftCheat{2, "3125"}, // * 32
- leftCheat{2, "15625"}, // * 64
- leftCheat{3, "78125"}, // * 128
- leftCheat{3, "390625"}, // * 256
- leftCheat{3, "1953125"}, // * 512
- leftCheat{4, "9765625"}, // * 1024
- leftCheat{4, "48828125"}, // * 2048
- leftCheat{4, "244140625"}, // * 4096
- leftCheat{4, "1220703125"}, // * 8192
- leftCheat{5, "6103515625"}, // * 16384
- leftCheat{5, "30517578125"}, // * 32768
- leftCheat{5, "152587890625"}, // * 65536
- leftCheat{6, "762939453125"}, // * 131072
- leftCheat{6, "3814697265625"}, // * 262144
- leftCheat{6, "19073486328125"}, // * 524288
- leftCheat{7, "95367431640625"}, // * 1048576
- leftCheat{7, "476837158203125"}, // * 2097152
- leftCheat{7, "2384185791015625"}, // * 4194304
- leftCheat{7, "11920928955078125"}, // * 8388608
- leftCheat{8, "59604644775390625"}, // * 16777216
- leftCheat{8, "298023223876953125"}, // * 33554432
- leftCheat{8, "1490116119384765625"}, // * 67108864
- leftCheat{9, "7450580596923828125"}, // * 134217728
+ {0, ""},
+ {1, "5"}, // * 2
+ {1, "25"}, // * 4
+ {1, "125"}, // * 8
+ {2, "625"}, // * 16
+ {2, "3125"}, // * 32
+ {2, "15625"}, // * 64
+ {3, "78125"}, // * 128
+ {3, "390625"}, // * 256
+ {3, "1953125"}, // * 512
+ {4, "9765625"}, // * 1024
+ {4, "48828125"}, // * 2048
+ {4, "244140625"}, // * 4096
+ {4, "1220703125"}, // * 8192
+ {5, "6103515625"}, // * 16384
+ {5, "30517578125"}, // * 32768
+ {5, "152587890625"}, // * 65536
+ {6, "762939453125"}, // * 131072
+ {6, "3814697265625"}, // * 262144
+ {6, "19073486328125"}, // * 524288
+ {7, "95367431640625"}, // * 1048576
+ {7, "476837158203125"}, // * 2097152
+ {7, "2384185791015625"}, // * 4194304
+ {7, "11920928955078125"}, // * 8388608
+ {8, "59604644775390625"}, // * 16777216
+ {8, "298023223876953125"}, // * 33554432
+ {8, "1490116119384765625"}, // * 67108864
+ {9, "7450580596923828125"}, // * 134217728
}
// Is the leading prefix of b lexicographically less than s?
diff --git a/src/pkg/strconv/decimal_test.go b/src/pkg/strconv/decimal_test.go
index 41d33f5950..9b79035167 100644
--- a/src/pkg/strconv/decimal_test.go
+++ b/src/pkg/strconv/decimal_test.go
@@ -16,17 +16,17 @@ type shiftTest struct {
}
var shifttests = []shiftTest{
- shiftTest{0, -100, "0"},
- shiftTest{0, 100, "0"},
- shiftTest{1, 100, "1267650600228229401496703205376"},
- shiftTest{1, -100,
+ {0, -100, "0"},
+ {0, 100, "0"},
+ {1, 100, "1267650600228229401496703205376"},
+ {1, -100,
"0.00000000000000000000000000000078886090522101180541" +
"17285652827862296732064351090230047702789306640625",
},
- shiftTest{12345678, 8, "3160493568"},
- shiftTest{12345678, -8, "48225.3046875"},
- shiftTest{195312, 9, "99999744"},
- shiftTest{1953125, 9, "1000000000"},
+ {12345678, 8, "3160493568"},
+ {12345678, -8, "48225.3046875"},
+ {195312, 9, "99999744"},
+ {1953125, 9, "1000000000"},
}
func TestDecimalShift(t *testing.T) {
@@ -48,21 +48,21 @@ type roundTest struct {
}
var roundtests = []roundTest{
- roundTest{0, 4, "0", "0", "0", 0},
- roundTest{12344999, 4, "12340000", "12340000", "12350000", 12340000},
- roundTest{12345000, 4, "12340000", "12340000", "12350000", 12340000},
- roundTest{12345001, 4, "12340000", "12350000", "12350000", 12350000},
- roundTest{23454999, 4, "23450000", "23450000", "23460000", 23450000},
- roundTest{23455000, 4, "23450000", "23460000", "23460000", 23460000},
- roundTest{23455001, 4, "23450000", "23460000", "23460000", 23460000},
+ {0, 4, "0", "0", "0", 0},
+ {12344999, 4, "12340000", "12340000", "12350000", 12340000},
+ {12345000, 4, "12340000", "12340000", "12350000", 12340000},
+ {12345001, 4, "12340000", "12350000", "12350000", 12350000},
+ {23454999, 4, "23450000", "23450000", "23460000", 23450000},
+ {23455000, 4, "23450000", "23460000", "23460000", 23460000},
+ {23455001, 4, "23450000", "23460000", "23460000", 23460000},
- roundTest{99994999, 4, "99990000", "99990000", "100000000", 99990000},
- roundTest{99995000, 4, "99990000", "100000000", "100000000", 100000000},
- roundTest{99999999, 4, "99990000", "100000000", "100000000", 100000000},
+ {99994999, 4, "99990000", "99990000", "100000000", 99990000},
+ {99995000, 4, "99990000", "100000000", "100000000", 100000000},
+ {99999999, 4, "99990000", "100000000", "100000000", 100000000},
- roundTest{12994999, 4, "12990000", "12990000", "13000000", 12990000},
- roundTest{12995000, 4, "12990000", "13000000", "13000000", 13000000},
- roundTest{12999999, 4, "12990000", "13000000", "13000000", 13000000},
+ {12994999, 4, "12990000", "12990000", "13000000", 12990000},
+ {12995000, 4, "12990000", "13000000", "13000000", 13000000},
+ {12999999, 4, "12990000", "13000000", "13000000", 13000000},
}
func TestDecimalRound(t *testing.T) {
@@ -93,16 +93,16 @@ type roundIntTest struct {
}
var roundinttests = []roundIntTest{
- roundIntTest{0, 100, 0},
- roundIntTest{512, -8, 2},
- roundIntTest{513, -8, 2},
- roundIntTest{640, -8, 2},
- roundIntTest{641, -8, 3},
- roundIntTest{384, -8, 2},
- roundIntTest{385, -8, 2},
- roundIntTest{383, -8, 1},
- roundIntTest{1, 100, 1<<64 - 1},
- roundIntTest{1000, 0, 1000},
+ {0, 100, 0},
+ {512, -8, 2},
+ {513, -8, 2},
+ {640, -8, 2},
+ {641, -8, 3},
+ {384, -8, 2},
+ {385, -8, 2},
+ {383, -8, 1},
+ {1, 100, 1<<64 - 1},
+ {1000, 0, 1000},
}
func TestDecimalRoundedInteger(t *testing.T) {
diff --git a/src/pkg/strconv/ftoa_test.go b/src/pkg/strconv/ftoa_test.go
index 49832b6266..6044afdae6 100644
--- a/src/pkg/strconv/ftoa_test.go
+++ b/src/pkg/strconv/ftoa_test.go
@@ -25,99 +25,99 @@ const (
)
var ftoatests = []ftoaTest{
- ftoaTest{1, 'e', 5, "1.00000e+00"},
- ftoaTest{1, 'f', 5, "1.00000"},
- ftoaTest{1, 'g', 5, "1"},
- ftoaTest{1, 'g', -1, "1"},
- ftoaTest{20, 'g', -1, "20"},
- ftoaTest{1234567.8, 'g', -1, "1.2345678e+06"},
- ftoaTest{200000, 'g', -1, "200000"},
- ftoaTest{2000000, 'g', -1, "2e+06"},
+ {1, 'e', 5, "1.00000e+00"},
+ {1, 'f', 5, "1.00000"},
+ {1, 'g', 5, "1"},
+ {1, 'g', -1, "1"},
+ {20, 'g', -1, "20"},
+ {1234567.8, 'g', -1, "1.2345678e+06"},
+ {200000, 'g', -1, "200000"},
+ {2000000, 'g', -1, "2e+06"},
// g conversion and zero suppression
- ftoaTest{400, 'g', 2, "4e+02"},
- ftoaTest{40, 'g', 2, "40"},
- ftoaTest{4, 'g', 2, "4"},
- ftoaTest{.4, 'g', 2, "0.4"},
- ftoaTest{.04, 'g', 2, "0.04"},
- ftoaTest{.004, 'g', 2, "0.004"},
- ftoaTest{.0004, 'g', 2, "0.0004"},
- ftoaTest{.00004, 'g', 2, "4e-05"},
- ftoaTest{.000004, 'g', 2, "4e-06"},
-
- ftoaTest{0, 'e', 5, "0.00000e+00"},
- ftoaTest{0, 'f', 5, "0.00000"},
- ftoaTest{0, 'g', 5, "0"},
- ftoaTest{0, 'g', -1, "0"},
-
- ftoaTest{-1, 'e', 5, "-1.00000e+00"},
- ftoaTest{-1, 'f', 5, "-1.00000"},
- ftoaTest{-1, 'g', 5, "-1"},
- ftoaTest{-1, 'g', -1, "-1"},
-
- ftoaTest{12, 'e', 5, "1.20000e+01"},
- ftoaTest{12, 'f', 5, "12.00000"},
- ftoaTest{12, 'g', 5, "12"},
- ftoaTest{12, 'g', -1, "12"},
-
- ftoaTest{123456700, 'e', 5, "1.23457e+08"},
- ftoaTest{123456700, 'f', 5, "123456700.00000"},
- ftoaTest{123456700, 'g', 5, "1.2346e+08"},
- ftoaTest{123456700, 'g', -1, "1.234567e+08"},
-
- ftoaTest{1.2345e6, 'e', 5, "1.23450e+06"},
- ftoaTest{1.2345e6, 'f', 5, "1234500.00000"},
- ftoaTest{1.2345e6, 'g', 5, "1.2345e+06"},
-
- ftoaTest{1e23, 'e', 17, "9.99999999999999916e+22"},
- ftoaTest{1e23, 'f', 17, "99999999999999991611392.00000000000000000"},
- ftoaTest{1e23, 'g', 17, "9.9999999999999992e+22"},
-
- ftoaTest{1e23, 'e', -1, "1e+23"},
- ftoaTest{1e23, 'f', -1, "100000000000000000000000"},
- ftoaTest{1e23, 'g', -1, "1e+23"},
-
- ftoaTest{below1e23, 'e', 17, "9.99999999999999748e+22"},
- ftoaTest{below1e23, 'f', 17, "99999999999999974834176.00000000000000000"},
- ftoaTest{below1e23, 'g', 17, "9.9999999999999975e+22"},
-
- ftoaTest{below1e23, 'e', -1, "9.999999999999997e+22"},
- ftoaTest{below1e23, 'f', -1, "99999999999999970000000"},
- ftoaTest{below1e23, 'g', -1, "9.999999999999997e+22"},
-
- ftoaTest{above1e23, 'e', 17, "1.00000000000000008e+23"},
- ftoaTest{above1e23, 'f', 17, "100000000000000008388608.00000000000000000"},
- ftoaTest{above1e23, 'g', 17, "1.0000000000000001e+23"},
-
- ftoaTest{above1e23, 'e', -1, "1.0000000000000001e+23"},
- ftoaTest{above1e23, 'f', -1, "100000000000000010000000"},
- ftoaTest{above1e23, 'g', -1, "1.0000000000000001e+23"},
-
- ftoaTest{fdiv(5e-304, 1e20), 'g', -1, "5e-324"},
- ftoaTest{fdiv(-5e-304, 1e20), 'g', -1, "-5e-324"},
-
- ftoaTest{32, 'g', -1, "32"},
- ftoaTest{32, 'g', 0, "3e+01"},
-
- ftoaTest{100, 'x', -1, "%x"},
-
- ftoaTest{math.NaN(), 'g', -1, "NaN"},
- ftoaTest{-math.NaN(), 'g', -1, "NaN"},
- ftoaTest{math.Inf(0), 'g', -1, "+Inf"},
- ftoaTest{math.Inf(-1), 'g', -1, "-Inf"},
- ftoaTest{-math.Inf(0), 'g', -1, "-Inf"},
-
- ftoaTest{-1, 'b', -1, "-4503599627370496p-52"},
+ {400, 'g', 2, "4e+02"},
+ {40, 'g', 2, "40"},
+ {4, 'g', 2, "4"},
+ {.4, 'g', 2, "0.4"},
+ {.04, 'g', 2, "0.04"},
+ {.004, 'g', 2, "0.004"},
+ {.0004, 'g', 2, "0.0004"},
+ {.00004, 'g', 2, "4e-05"},
+ {.000004, 'g', 2, "4e-06"},
+
+ {0, 'e', 5, "0.00000e+00"},
+ {0, 'f', 5, "0.00000"},
+ {0, 'g', 5, "0"},
+ {0, 'g', -1, "0"},
+
+ {-1, 'e', 5, "-1.00000e+00"},
+ {-1, 'f', 5, "-1.00000"},
+ {-1, 'g', 5, "-1"},
+ {-1, 'g', -1, "-1"},
+
+ {12, 'e', 5, "1.20000e+01"},
+ {12, 'f', 5, "12.00000"},
+ {12, 'g', 5, "12"},
+ {12, 'g', -1, "12"},
+
+ {123456700, 'e', 5, "1.23457e+08"},
+ {123456700, 'f', 5, "123456700.00000"},
+ {123456700, 'g', 5, "1.2346e+08"},
+ {123456700, 'g', -1, "1.234567e+08"},
+
+ {1.2345e6, 'e', 5, "1.23450e+06"},
+ {1.2345e6, 'f', 5, "1234500.00000"},
+ {1.2345e6, 'g', 5, "1.2345e+06"},
+
+ {1e23, 'e', 17, "9.99999999999999916e+22"},
+ {1e23, 'f', 17, "99999999999999991611392.00000000000000000"},
+ {1e23, 'g', 17, "9.9999999999999992e+22"},
+
+ {1e23, 'e', -1, "1e+23"},
+ {1e23, 'f', -1, "100000000000000000000000"},
+ {1e23, 'g', -1, "1e+23"},
+
+ {below1e23, 'e', 17, "9.99999999999999748e+22"},
+ {below1e23, 'f', 17, "99999999999999974834176.00000000000000000"},
+ {below1e23, 'g', 17, "9.9999999999999975e+22"},
+
+ {below1e23, 'e', -1, "9.999999999999997e+22"},
+ {below1e23, 'f', -1, "99999999999999970000000"},
+ {below1e23, 'g', -1, "9.999999999999997e+22"},
+
+ {above1e23, 'e', 17, "1.00000000000000008e+23"},
+ {above1e23, 'f', 17, "100000000000000008388608.00000000000000000"},
+ {above1e23, 'g', 17, "1.0000000000000001e+23"},
+
+ {above1e23, 'e', -1, "1.0000000000000001e+23"},
+ {above1e23, 'f', -1, "100000000000000010000000"},
+ {above1e23, 'g', -1, "1.0000000000000001e+23"},
+
+ {fdiv(5e-304, 1e20), 'g', -1, "5e-324"},
+ {fdiv(-5e-304, 1e20), 'g', -1, "-5e-324"},
+
+ {32, 'g', -1, "32"},
+ {32, 'g', 0, "3e+01"},
+
+ {100, 'x', -1, "%x"},
+
+ {math.NaN(), 'g', -1, "NaN"},
+ {-math.NaN(), 'g', -1, "NaN"},
+ {math.Inf(0), 'g', -1, "+Inf"},
+ {math.Inf(-1), 'g', -1, "-Inf"},
+ {-math.Inf(0), 'g', -1, "-Inf"},
+
+ {-1, 'b', -1, "-4503599627370496p-52"},
// fixed bugs
- ftoaTest{0.9, 'f', 1, "0.9"},
- ftoaTest{0.09, 'f', 1, "0.1"},
- ftoaTest{0.0999, 'f', 1, "0.1"},
- ftoaTest{0.05, 'f', 1, "0.1"},
- ftoaTest{0.05, 'f', 0, "0"},
- ftoaTest{0.5, 'f', 1, "0.5"},
- ftoaTest{0.5, 'f', 0, "0"},
- ftoaTest{1.5, 'f', 0, "2"},
+ {0.9, 'f', 1, "0.9"},
+ {0.09, 'f', 1, "0.1"},
+ {0.0999, 'f', 1, "0.1"},
+ {0.05, 'f', 1, "0.1"},
+ {0.05, 'f', 0, "0"},
+ {0.5, 'f', 1, "0.5"},
+ {0.5, 'f', 0, "0"},
+ {1.5, 'f', 0, "2"},
}
func TestFtoa(t *testing.T) {
diff --git a/src/pkg/strconv/itoa_test.go b/src/pkg/strconv/itoa_test.go
index 8333e6c00d..8514b21e47 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) {
diff --git a/src/pkg/strconv/quote_test.go b/src/pkg/strconv/quote_test.go
index 31784879ae..1235fcb9ae 100644
--- a/src/pkg/strconv/quote_test.go
+++ b/src/pkg/strconv/quote_test.go
@@ -16,12 +16,12 @@ type quoteTest struct {
}
var quotetests = []quoteTest{
- quoteTest{"\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"`},
- quoteTest{"\\", `"\\"`},
- quoteTest{"abc\xffdef", `"abc\xffdef"`},
- quoteTest{"\u263a", `"\u263a"`},
- quoteTest{"\U0010ffff", `"\U0010ffff"`},
- quoteTest{"\x04", `"\x04"`},
+ {"\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"`},
+ {"\\", `"\\"`},
+ {"abc\xffdef", `"abc\xffdef"`},
+ {"\u263a", `"\u263a"`},
+ {"\U0010ffff", `"\U0010ffff"`},
+ {"\x04", `"\x04"`},
}
func TestQuote(t *testing.T) {
@@ -39,44 +39,44 @@ type canBackquoteTest struct {
}
var canbackquotetests = []canBackquoteTest{
- canBackquoteTest{"`", false},
- canBackquoteTest{string(0), false},
- canBackquoteTest{string(1), false},
- canBackquoteTest{string(2), false},
- canBackquoteTest{string(3), false},
- canBackquoteTest{string(4), false},
- canBackquoteTest{string(5), false},
- canBackquoteTest{string(6), false},
- canBackquoteTest{string(7), false},
- canBackquoteTest{string(8), false},
- canBackquoteTest{string(9), true}, // \t
- canBackquoteTest{string(10), false},
- canBackquoteTest{string(11), false},
- canBackquoteTest{string(12), false},
- canBackquoteTest{string(13), false},
- canBackquoteTest{string(14), false},
- canBackquoteTest{string(15), false},
- canBackquoteTest{string(16), false},
- canBackquoteTest{string(17), false},
- canBackquoteTest{string(18), false},
- canBackquoteTest{string(19), false},
- canBackquoteTest{string(20), false},
- canBackquoteTest{string(21), false},
- canBackquoteTest{string(22), false},
- canBackquoteTest{string(23), false},
- canBackquoteTest{string(24), false},
- canBackquoteTest{string(25), false},
- canBackquoteTest{string(26), false},
- canBackquoteTest{string(27), false},
- canBackquoteTest{string(28), false},
- canBackquoteTest{string(29), false},
- canBackquoteTest{string(30), false},
- canBackquoteTest{string(31), false},
- canBackquoteTest{`' !"#$%&'()*+,-./:;<=>?@[\]^_{|}~`, true},
- canBackquoteTest{`0123456789`, true},
- canBackquoteTest{`ABCDEFGHIJKLMNOPQRSTUVWXYZ`, true},
- canBackquoteTest{`abcdefghijklmnopqrstuvwxyz`, true},
- canBackquoteTest{`☺`, true},
+ {"`", false},
+ {string(0), false},
+ {string(1), false},
+ {string(2), false},
+ {string(3), false},
+ {string(4), false},
+ {string(5), false},
+ {string(6), false},
+ {string(7), false},
+ {string(8), false},
+ {string(9), true}, // \t
+ {string(10), false},
+ {string(11), false},
+ {string(12), false},
+ {string(13), false},
+ {string(14), false},
+ {string(15), false},
+ {string(16), false},
+ {string(17), false},
+ {string(18), false},
+ {string(19), false},
+ {string(20), false},
+ {string(21), false},
+ {string(22), false},
+ {string(23), false},
+ {string(24), false},
+ {string(25), false},
+ {string(26), false},
+ {string(27), false},
+ {string(28), false},
+ {string(29), false},
+ {string(30), false},
+ {string(31), false},
+ {`' !"#$%&'()*+,-./:;<=>?@[\]^_{|}~`, true},
+ {`0123456789`, true},
+ {`ABCDEFGHIJKLMNOPQRSTUVWXYZ`, true},
+ {`abcdefghijklmnopqrstuvwxyz`, true},
+ {`☺`, true},
}
func TestCanBackquote(t *testing.T) {
@@ -89,41 +89,41 @@ func TestCanBackquote(t *testing.T) {
}
var unquotetests = []quoteTest{
- quoteTest{`""`, ""},
- quoteTest{`"a"`, "a"},
- quoteTest{`"abc"`, "abc"},
- quoteTest{`"☺"`, "☺"},
- quoteTest{`"hello world"`, "hello world"},
- quoteTest{`"\xFF"`, "\xFF"},
- quoteTest{`"\377"`, "\377"},
- quoteTest{`"\u1234"`, "\u1234"},
- quoteTest{`"\U00010111"`, "\U00010111"},
- quoteTest{`"\U0001011111"`, "\U0001011111"},
- quoteTest{`"\a\b\f\n\r\t\v\\\""`, "\a\b\f\n\r\t\v\\\""},
- quoteTest{`"'"`, "'"},
+ {`""`, ""},
+ {`"a"`, "a"},
+ {`"abc"`, "abc"},
+ {`"☺"`, "☺"},
+ {`"hello world"`, "hello world"},
+ {`"\xFF"`, "\xFF"},
+ {`"\377"`, "\377"},
+ {`"\u1234"`, "\u1234"},
+ {`"\U00010111"`, "\U00010111"},
+ {`"\U0001011111"`, "\U0001011111"},
+ {`"\a\b\f\n\r\t\v\\\""`, "\a\b\f\n\r\t\v\\\""},
+ {`"'"`, "'"},
- quoteTest{`'a'`, "a"},
- quoteTest{`'☹'`, "☹"},
- quoteTest{`'\a'`, "\a"},
- quoteTest{`'\x10'`, "\x10"},
- quoteTest{`'\377'`, "\377"},
- quoteTest{`'\u1234'`, "\u1234"},
- quoteTest{`'\U00010111'`, "\U00010111"},
- quoteTest{`'\t'`, "\t"},
- quoteTest{`' '`, " "},
- quoteTest{`'\''`, "'"},
- quoteTest{`'"'`, "\""},
+ {`'a'`, "a"},
+ {`'☹'`, "☹"},
+ {`'\a'`, "\a"},
+ {`'\x10'`, "\x10"},
+ {`'\377'`, "\377"},
+ {`'\u1234'`, "\u1234"},
+ {`'\U00010111'`, "\U00010111"},
+ {`'\t'`, "\t"},
+ {`' '`, " "},
+ {`'\''`, "'"},
+ {`'"'`, "\""},
- quoteTest{"``", ``},
- quoteTest{"`a`", `a`},
- quoteTest{"`abc`", `abc`},
- quoteTest{"`☺`", `☺`},
- quoteTest{"`hello world`", `hello world`},
- quoteTest{"`\\xFF`", `\xFF`},
- quoteTest{"`\\377`", `\377`},
- quoteTest{"`\\`", `\`},
- quoteTest{"` `", ` `},
- quoteTest{"` `", ` `},
+ {"``", ``},
+ {"`a`", `a`},
+ {"`abc`", `abc`},
+ {"`☺`", `☺`},
+ {"`hello world`", `hello world`},
+ {"`\\xFF`", `\xFF`},
+ {"`\\377`", `\377`},
+ {"`\\`", `\`},
+ {"` `", ` `},
+ {"` `", ` `},
}
var misquoted = []string{
diff --git a/src/pkg/strings/strings_test.go b/src/pkg/strings/strings_test.go
index 57bc7a3b37..13c21bf77a 100644
--- a/src/pkg/strings/strings_test.go
+++ b/src/pkg/strings/strings_test.go
@@ -36,55 +36,55 @@ type IndexTest struct {
}
var indexTests = []IndexTest{
- IndexTest{"", "", 0},
- IndexTest{"", "a", -1},
- IndexTest{"", "foo", -1},
- IndexTest{"fo", "foo", -1},
- IndexTest{"foo", "foo", 0},
- IndexTest{"oofofoofooo", "f", 2},
- IndexTest{"oofofoofooo", "foo", 4},
- IndexTest{"barfoobarfoo", "foo", 3},
- IndexTest{"foo", "", 0},
- IndexTest{"foo", "o", 1},
- IndexTest{"abcABCabc", "A", 3},
+ {"", "", 0},
+ {"", "a", -1},
+ {"", "foo", -1},
+ {"fo", "foo", -1},
+ {"foo", "foo", 0},
+ {"oofofoofooo", "f", 2},
+ {"oofofoofooo", "foo", 4},
+ {"barfoobarfoo", "foo", 3},
+ {"foo", "", 0},
+ {"foo", "o", 1},
+ {"abcABCabc", "A", 3},
// cases with one byte strings - test special case in Index()
- IndexTest{"", "a", -1},
- IndexTest{"x", "a", -1},
- IndexTest{"x", "x", 0},
- IndexTest{"abc", "a", 0},
- IndexTest{"abc", "b", 1},
- IndexTest{"abc", "c", 2},
- IndexTest{"abc", "x", -1},
+ {"", "a", -1},
+ {"x", "a", -1},
+ {"x", "x", 0},
+ {"abc", "a", 0},
+ {"abc", "b", 1},
+ {"abc", "c", 2},
+ {"abc", "x", -1},
}
var lastIndexTests = []IndexTest{
- IndexTest{"", "", 0},
- IndexTest{"", "a", -1},
- IndexTest{"", "foo", -1},
- IndexTest{"fo", "foo", -1},
- IndexTest{"foo", "foo", 0},
- IndexTest{"foo", "f", 0},
- IndexTest{"oofofoofooo", "f", 7},
- IndexTest{"oofofoofooo", "foo", 7},
- IndexTest{"barfoobarfoo", "foo", 9},
- IndexTest{"foo", "", 3},
- IndexTest{"foo", "o", 2},
- IndexTest{"abcABCabc", "A", 3},
- IndexTest{"abcABCabc", "a", 6},
+ {"", "", 0},
+ {"", "a", -1},
+ {"", "foo", -1},
+ {"fo", "foo", -1},
+ {"foo", "foo", 0},
+ {"foo", "f", 0},
+ {"oofofoofooo", "f", 7},
+ {"oofofoofooo", "foo", 7},
+ {"barfoobarfoo", "foo", 9},
+ {"foo", "", 3},
+ {"foo", "o", 2},
+ {"abcABCabc", "A", 3},
+ {"abcABCabc", "a", 6},
}
var indexAnyTests = []IndexTest{
- IndexTest{"", "", -1},
- IndexTest{"", "a", -1},
- IndexTest{"", "abc", -1},
- IndexTest{"a", "", -1},
- IndexTest{"a", "a", 0},
- IndexTest{"aaa", "a", 0},
- IndexTest{"abc", "xyz", -1},
- IndexTest{"abc", "xcz", 2},
- IndexTest{"a☺b☻c☹d", "uvw☻xyz", 2 + len("☺")},
- IndexTest{"aRegExp*", ".(|)*+?^$[]", 7},
- IndexTest{dots + dots + dots, " ", -1},
+ {"", "", -1},
+ {"", "a", -1},
+ {"", "abc", -1},
+ {"a", "", -1},
+ {"a", "a", 0},
+ {"aaa", "a", 0},
+ {"abc", "xyz", -1},
+ {"abc", "xcz", 2},
+ {"a☺b☻c☹d", "uvw☻xyz", 2 + len("☺")},
+ {"aRegExp*", ".(|)*+?^$[]", 7},
+ {dots + dots + dots, " ", -1},
}
// Execute f on each test case. funcName should be the name of f; it's used
@@ -109,10 +109,10 @@ type ExplodeTest struct {
}
var explodetests = []ExplodeTest{
- ExplodeTest{"", -1, []string{}},
- ExplodeTest{abcd, 4, []string{"a", "b", "c", "d"}},
- ExplodeTest{faces, 3, []string{"☺", "☻", "☹"}},
- ExplodeTest{abcd, 2, []string{"a", "bcd"}},
+ {"", -1, []string{}},
+ {abcd, 4, []string{"a", "b", "c", "d"}},
+ {faces, 3, []string{"☺", "☻", "☹"}},
+ {abcd, 2, []string{"a", "bcd"}},
}
func TestExplode(t *testing.T) {
@@ -137,19 +137,19 @@ type SplitTest struct {
}
var splittests = []SplitTest{
- SplitTest{abcd, "a", 0, nil},
- SplitTest{abcd, "a", -1, []string{"", "bcd"}},
- SplitTest{abcd, "z", -1, []string{"abcd"}},
- SplitTest{abcd, "", -1, []string{"a", "b", "c", "d"}},
- SplitTest{commas, ",", -1, []string{"1", "2", "3", "4"}},
- SplitTest{dots, "...", -1, []string{"1", ".2", ".3", ".4"}},
- SplitTest{faces, "☹", -1, []string{"☺☻", ""}},
- SplitTest{faces, "~", -1, []string{faces}},
- SplitTest{faces, "", -1, []string{"☺", "☻", "☹"}},
- SplitTest{"1 2 3 4", " ", 3, []string{"1", "2", "3 4"}},
- SplitTest{"1 2", " ", 3, []string{"1", "2"}},
- SplitTest{"123", "", 2, []string{"1", "23"}},
- SplitTest{"123", "", 17, []string{"1", "2", "3"}},
+ {abcd, "a", 0, nil},
+ {abcd, "a", -1, []string{"", "bcd"}},
+ {abcd, "z", -1, []string{"abcd"}},
+ {abcd, "", -1, []string{"a", "b", "c", "d"}},
+ {commas, ",", -1, []string{"1", "2", "3", "4"}},
+ {dots, "...", -1, []string{"1", ".2", ".3", ".4"}},
+ {faces, "☹", -1, []string{"☺☻", ""}},
+ {faces, "~", -1, []string{faces}},
+ {faces, "", -1, []string{"☺", "☻", "☹"}},
+ {"1 2 3 4", " ", 3, []string{"1", "2", "3 4"}},
+ {"1 2", " ", 3, []string{"1", "2"}},
+ {"123", "", 2, []string{"1", "23"}},
+ {"123", "", 17, []string{"1", "2", "3"}},
}
func TestSplit(t *testing.T) {
@@ -170,19 +170,19 @@ func TestSplit(t *testing.T) {
}
var splitaftertests = []SplitTest{
- SplitTest{abcd, "a", -1, []string{"a", "bcd"}},
- SplitTest{abcd, "z", -1, []string{"abcd"}},
- SplitTest{abcd, "", -1, []string{"a", "b", "c", "d"}},
- SplitTest{commas, ",", -1, []string{"1,", "2,", "3,", "4"}},
- SplitTest{dots, "...", -1, []string{"1...", ".2...", ".3...", ".4"}},
- SplitTest{faces, "☹", -1, []string{"☺☻☹", ""}},
- SplitTest{faces, "~", -1, []string{faces}},
- SplitTest{faces, "", -1, []string{"☺", "☻", "☹"}},
- SplitTest{"1 2 3 4", " ", 3, []string{"1 ", "2 ", "3 4"}},
- SplitTest{"1 2 3", " ", 3, []string{"1 ", "2 ", "3"}},
- SplitTest{"1 2", " ", 3, []string{"1 ", "2"}},
- SplitTest{"123", "", 2, []string{"1", "23"}},
- SplitTest{"123", "", 17, []string{"1", "2", "3"}},
+ {abcd, "a", -1, []string{"a", "bcd"}},
+ {abcd, "z", -1, []string{"abcd"}},
+ {abcd, "", -1, []string{"a", "b", "c", "d"}},
+ {commas, ",", -1, []string{"1,", "2,", "3,", "4"}},
+ {dots, "...", -1, []string{"1...", ".2...", ".3...", ".4"}},
+ {faces, "☹", -1, []string{"☺☻☹", ""}},
+ {faces, "~", -1, []string{faces}},
+ {faces, "", -1, []string{"☺", "☻", "☹"}},
+ {"1 2 3 4", " ", 3, []string{"1 ", "2 ", "3 4"}},
+ {"1 2 3", " ", 3, []string{"1 ", "2 ", "3"}},
+ {"1 2", " ", 3, []string{"1 ", "2"}},
+ {"123", "", 2, []string{"1", "23"}},
+ {"123", "", 17, []string{"1", "2", "3"}},
}
func TestSplitAfter(t *testing.T) {
@@ -205,17 +205,17 @@ type FieldsTest struct {
}
var fieldstests = []FieldsTest{
- FieldsTest{"", []string{}},
- FieldsTest{" ", []string{}},
- FieldsTest{" \t ", []string{}},
- FieldsTest{" abc ", []string{"abc"}},
- FieldsTest{"1 2 3 4", []string{"1", "2", "3", "4"}},
- FieldsTest{"1 2 3 4", []string{"1", "2", "3", "4"}},
- FieldsTest{"1\t\t2\t\t3\t4", []string{"1", "2", "3", "4"}},
- FieldsTest{"1\u20002\u20013\u20024", []string{"1", "2", "3", "4"}},
- FieldsTest{"\u2000\u2001\u2002", []string{}},
- FieldsTest{"\n™\t™\n", []string{"™", "™"}},
- FieldsTest{faces, []string{faces}},
+ {"", []string{}},
+ {" ", []string{}},
+ {" \t ", []string{}},
+ {" abc ", []string{"abc"}},
+ {"1 2 3 4", []string{"1", "2", "3", "4"}},
+ {"1 2 3 4", []string{"1", "2", "3", "4"}},
+ {"1\t\t2\t\t3\t4", []string{"1", "2", "3", "4"}},
+ {"1\u20002\u20013\u20024", []string{"1", "2", "3", "4"}},
+ {"\u2000\u2001\u2002", []string{}},
+ {"\n™\t™\n", []string{"™", "™"}},
+ {faces, []string{faces}},
}
func TestFields(t *testing.T) {
@@ -231,10 +231,10 @@ func TestFields(t *testing.T) {
func TestFieldsFunc(t *testing.T) {
pred := func(c int) bool { return c == 'X' }
var fieldsFuncTests = []FieldsTest{
- FieldsTest{"", []string{}},
- FieldsTest{"XX", []string{}},
- FieldsTest{"XXhiXXX", []string{"hi"}},
- FieldsTest{"aXXbXXXcX", []string{"a", "b", "c"}},
+ {"", []string{}},
+ {"XX", []string{}},
+ {"XXhiXXX", []string{"hi"}},
+ {"aXXbXXXcX", []string{"a", "b", "c"}},
}
for _, tt := range fieldsFuncTests {
a := FieldsFunc(tt.s, pred)
@@ -262,40 +262,40 @@ func runStringTests(t *testing.T, f func(string) string, funcName string, testCa
}
var upperTests = []StringTest{
- StringTest{"", ""},
- StringTest{"abc", "ABC"},
- StringTest{"AbC123", "ABC123"},
- StringTest{"azAZ09_", "AZAZ09_"},
- StringTest{"\u0250\u0250\u0250\u0250\u0250", "\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F"}, // grows one byte per char
+ {"", ""},
+ {"abc", "ABC"},
+ {"AbC123", "ABC123"},
+ {"azAZ09_", "AZAZ09_"},
+ {"\u0250\u0250\u0250\u0250\u0250", "\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F"}, // grows one byte per char
}
var lowerTests = []StringTest{
- StringTest{"", ""},
- StringTest{"abc", "abc"},
- StringTest{"AbC123", "abc123"},
- StringTest{"azAZ09_", "azaz09_"},
- StringTest{"\u2C6D\u2C6D\u2C6D\u2C6D\u2C6D", "\u0251\u0251\u0251\u0251\u0251"}, // shrinks one byte per char
+ {"", ""},
+ {"abc", "abc"},
+ {"AbC123", "abc123"},
+ {"azAZ09_", "azaz09_"},
+ {"\u2C6D\u2C6D\u2C6D\u2C6D\u2C6D", "\u0251\u0251\u0251\u0251\u0251"}, // shrinks one byte per char
}
const space = "\t\v\r\f\n\u0085\u00a0\u2000\u3000"
var trimSpaceTests = []StringTest{
- StringTest{"", ""},
- StringTest{"abc", "abc"},
- StringTest{space + "abc" + space, "abc"},
- StringTest{" ", ""},
- StringTest{" \t\r\n \t\t\r\r\n\n ", ""},
- StringTest{" \t\r\n x\t\t\r\r\n\n ", "x"},
- StringTest{" \u2000\t\r\n x\t\t\r\r\ny\n \u3000", "x\t\t\r\r\ny"},
- StringTest{"1 \t\r\n2", "1 \t\r\n2"},
- StringTest{" x\x80", "x\x80"},
- StringTest{" x\xc0", "x\xc0"},
- StringTest{"x \xc0\xc0 ", "x \xc0\xc0"},
- StringTest{"x \xc0", "x \xc0"},
- StringTest{"x \xc0 ", "x \xc0"},
- StringTest{"x \xc0\xc0 ", "x \xc0\xc0"},
- StringTest{"x ☺\xc0\xc0 ", "x ☺\xc0\xc0"},
- StringTest{"x ☺ ", "x ☺"},
+ {"", ""},
+ {"abc", "abc"},
+ {space + "abc" + space, "abc"},
+ {" ", ""},
+ {" \t\r\n \t\t\r\r\n\n ", ""},
+ {" \t\r\n x\t\t\r\r\n\n ", "x"},
+ {" \u2000\t\r\n x\t\t\r\r\ny\n \u3000", "x\t\t\r\r\ny"},
+ {"1 \t\r\n2", "1 \t\r\n2"},
+ {" x\x80", "x\x80"},
+ {" x\xc0", "x\xc0"},
+ {"x \xc0\xc0 ", "x \xc0\xc0"},
+ {"x \xc0", "x \xc0"},
+ {"x \xc0 ", "x \xc0"},
+ {"x \xc0\xc0 ", "x \xc0\xc0"},
+ {"x ☺\xc0\xc0 ", "x ☺\xc0\xc0"},
+ {"x ☺ ", "x ☺"},
}
func tenRunes(rune int) string {
@@ -398,27 +398,27 @@ type TrimTest struct {
}
var trimTests = []TrimTest{
- TrimTest{Trim, "abba", "a", "bb"},
- TrimTest{Trim, "abba", "ab", ""},
- TrimTest{TrimLeft, "abba", "ab", ""},
- TrimTest{TrimRight, "abba", "ab", ""},
- TrimTest{TrimLeft, "abba", "a", "bba"},
- TrimTest{TrimRight, "abba", "a", "abb"},
- TrimTest{Trim, "<tag>", "<>", "tag"},
- TrimTest{Trim, "* listitem", " *", "listitem"},
- TrimTest{Trim, `"quote"`, `"`, "quote"},
- TrimTest{Trim, "\u2C6F\u2C6F\u0250\u0250\u2C6F\u2C6F", "\u2C6F", "\u0250\u0250"},
+ {Trim, "abba", "a", "bb"},
+ {Trim, "abba", "ab", ""},
+ {TrimLeft, "abba", "ab", ""},
+ {TrimRight, "abba", "ab", ""},
+ {TrimLeft, "abba", "a", "bba"},
+ {TrimRight, "abba", "a", "abb"},
+ {Trim, "<tag>", "<>", "tag"},
+ {Trim, "* listitem", " *", "listitem"},
+ {Trim, `"quote"`, `"`, "quote"},
+ {Trim, "\u2C6F\u2C6F\u0250\u0250\u2C6F\u2C6F", "\u2C6F", "\u0250\u0250"},
//empty string tests
- TrimTest{Trim, "abba", "", "abba"},
- TrimTest{Trim, "", "123", ""},
- TrimTest{Trim, "", "", ""},
- TrimTest{TrimLeft, "abba", "", "abba"},
- TrimTest{TrimLeft, "", "123", ""},
- TrimTest{TrimLeft, "", "", ""},
- TrimTest{TrimRight, "abba", "", "abba"},
- TrimTest{TrimRight, "", "123", ""},
- TrimTest{TrimRight, "", "", ""},
- TrimTest{TrimRight, "☺\xc0", "☺", "☺\xc0"},
+ {Trim, "abba", "", "abba"},
+ {Trim, "", "123", ""},
+ {Trim, "", "", ""},
+ {TrimLeft, "abba", "", "abba"},
+ {TrimLeft, "", "123", ""},
+ {TrimLeft, "", "", ""},
+ {TrimRight, "abba", "", "abba"},
+ {TrimRight, "", "123", ""},
+ {TrimRight, "", "", ""},
+ {TrimRight, "☺\xc0", "☺", "☺\xc0"},
}
func TestTrim(t *testing.T) {
@@ -471,13 +471,13 @@ func not(p predicate) predicate {
}
var trimFuncTests = []TrimFuncTest{
- TrimFuncTest{isSpace, space + " hello " + space, "hello"},
- TrimFuncTest{isDigit, "\u0e50\u0e5212hello34\u0e50\u0e51", "hello"},
- TrimFuncTest{isUpper, "\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", "hello"},
- TrimFuncTest{not(isSpace), "hello" + space + "hello", space},
- TrimFuncTest{not(isDigit), "hello\u0e50\u0e521234\u0e50\u0e51helo", "\u0e50\u0e521234\u0e50\u0e51"},
- TrimFuncTest{isValidRune, "ab\xc0a\xc0cd", "\xc0a\xc0"},
- TrimFuncTest{not(isValidRune), "\xc0a\xc0", "a"},
+ {isSpace, space + " hello " + space, "hello"},
+ {isDigit, "\u0e50\u0e5212hello34\u0e50\u0e51", "hello"},
+ {isUpper, "\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", "hello"},
+ {not(isSpace), "hello" + space + "hello", space},
+ {not(isDigit), "hello\u0e50\u0e521234\u0e50\u0e51helo", "\u0e50\u0e521234\u0e50\u0e51"},
+ {isValidRune, "ab\xc0a\xc0cd", "\xc0a\xc0"},
+ {not(isValidRune), "\xc0a\xc0", "a"},
}
func TestTrimFunc(t *testing.T) {
@@ -496,25 +496,25 @@ type IndexFuncTest struct {
}
var indexFuncTests = []IndexFuncTest{
- IndexFuncTest{"", isValidRune, -1, -1},
- IndexFuncTest{"abc", isDigit, -1, -1},
- IndexFuncTest{"0123", isDigit, 0, 3},
- IndexFuncTest{"a1b", isDigit, 1, 1},
- IndexFuncTest{space, isSpace, 0, len(space) - 3}, // last rune in space is 3 bytes
- IndexFuncTest{"\u0e50\u0e5212hello34\u0e50\u0e51", isDigit, 0, 18},
- IndexFuncTest{"\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", isUpper, 0, 34},
- IndexFuncTest{"12\u0e50\u0e52hello34\u0e50\u0e51", not(isDigit), 8, 12},
+ {"", isValidRune, -1, -1},
+ {"abc", isDigit, -1, -1},
+ {"0123", isDigit, 0, 3},
+ {"a1b", isDigit, 1, 1},
+ {space, isSpace, 0, len(space) - 3}, // last rune in space is 3 bytes
+ {"\u0e50\u0e5212hello34\u0e50\u0e51", isDigit, 0, 18},
+ {"\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", isUpper, 0, 34},
+ {"12\u0e50\u0e52hello34\u0e50\u0e51", not(isDigit), 8, 12},
// tests of invalid UTF-8
- IndexFuncTest{"\x801", isDigit, 1, 1},
- IndexFuncTest{"\x80abc", isDigit, -1, -1},
- IndexFuncTest{"\xc0a\xc0", isValidRune, 1, 1},
- IndexFuncTest{"\xc0a\xc0", not(isValidRune), 0, 2},
- IndexFuncTest{"\xc0☺\xc0", not(isValidRune), 0, 4},
- IndexFuncTest{"\xc0☺\xc0\xc0", not(isValidRune), 0, 5},
- IndexFuncTest{"ab\xc0a\xc0cd", not(isValidRune), 2, 4},
- IndexFuncTest{"a\xe0\x80cd", not(isValidRune), 1, 2},
- IndexFuncTest{"\x80\x80\x80\x80", not(isValidRune), 0, 3},
+ {"\x801", isDigit, 1, 1},
+ {"\x80abc", isDigit, -1, -1},
+ {"\xc0a\xc0", isValidRune, 1, 1},
+ {"\xc0a\xc0", not(isValidRune), 0, 2},
+ {"\xc0☺\xc0", not(isValidRune), 0, 4},
+ {"\xc0☺\xc0\xc0", not(isValidRune), 0, 5},
+ {"ab\xc0a\xc0cd", not(isValidRune), 2, 4},
+ {"a\xe0\x80cd", not(isValidRune), 1, 2},
+ {"\x80\x80\x80\x80", not(isValidRune), 0, 3},
}
func TestIndexFunc(t *testing.T) {
@@ -595,13 +595,13 @@ type RepeatTest struct {
}
var RepeatTests = []RepeatTest{
- RepeatTest{"", "", 0},
- RepeatTest{"", "", 1},
- RepeatTest{"", "", 2},
- RepeatTest{"-", "", 0},
- RepeatTest{"-", "-", 1},
- RepeatTest{"-", "----------", 10},
- RepeatTest{"abc ", "abc abc abc ", 3},
+ {"", "", 0},
+ {"", "", 1},
+ {"", "", 2},
+ {"-", "", 0},
+ {"-", "-", 1},
+ {"-", "----------", 10},
+ {"abc ", "abc abc abc ", 3},
}
func TestRepeat(t *testing.T) {
@@ -633,13 +633,13 @@ type RunesTest struct {
}
var RunesTests = []RunesTest{
- RunesTest{"", []int{}, false},
- RunesTest{" ", []int{32}, false},
- RunesTest{"ABC", []int{65, 66, 67}, false},
- RunesTest{"abc", []int{97, 98, 99}, false},
- RunesTest{"\u65e5\u672c\u8a9e", []int{26085, 26412, 35486}, false},
- RunesTest{"ab\x80c", []int{97, 98, 0xFFFD, 99}, true},
- RunesTest{"ab\xc0c", []int{97, 98, 0xFFFD, 99}, true},
+ {"", []int{}, false},
+ {" ", []int{32}, false},
+ {"ABC", []int{65, 66, 67}, false},
+ {"abc", []int{97, 98, 99}, false},
+ {"\u65e5\u672c\u8a9e", []int{26085, 26412, 35486}, false},
+ {"ab\x80c", []int{97, 98, 0xFFFD, 99}, true},
+ {"ab\xc0c", []int{97, 98, 0xFFFD, 99}, true},
}
func TestRunes(t *testing.T) {
@@ -689,25 +689,25 @@ type ReplaceTest struct {
}
var ReplaceTests = []ReplaceTest{
- ReplaceTest{"hello", "l", "L", 0, "hello"},
- ReplaceTest{"hello", "l", "L", -1, "heLLo"},
- ReplaceTest{"hello", "x", "X", -1, "hello"},
- ReplaceTest{"", "x", "X", -1, ""},
- ReplaceTest{"radar", "r", "<r>", -1, "<r>ada<r>"},
- ReplaceTest{"", "", "<>", -1, "<>"},
- ReplaceTest{"banana", "a", "<>", -1, "b<>n<>n<>"},
- ReplaceTest{"banana", "a", "<>", 1, "b<>nana"},
- ReplaceTest{"banana", "a", "<>", 1000, "b<>n<>n<>"},
- ReplaceTest{"banana", "an", "<>", -1, "b<><>a"},
- ReplaceTest{"banana", "ana", "<>", -1, "b<>na"},
- ReplaceTest{"banana", "", "<>", -1, "<>b<>a<>n<>a<>n<>a<>"},
- ReplaceTest{"banana", "", "<>", 10, "<>b<>a<>n<>a<>n<>a<>"},
- ReplaceTest{"banana", "", "<>", 6, "<>b<>a<>n<>a<>n<>a"},
- ReplaceTest{"banana", "", "<>", 5, "<>b<>a<>n<>a<>na"},
- ReplaceTest{"banana", "", "<>", 1, "<>banana"},
- ReplaceTest{"banana", "a", "a", -1, "banana"},
- ReplaceTest{"banana", "a", "a", 1, "banana"},
- ReplaceTest{"☺☻☹", "", "<>", -1, "<>☺<>☻<>☹<>"},
+ {"hello", "l", "L", 0, "hello"},
+ {"hello", "l", "L", -1, "heLLo"},
+ {"hello", "x", "X", -1, "hello"},
+ {"", "x", "X", -1, ""},
+ {"radar", "r", "<r>", -1, "<r>ada<r>"},
+ {"", "", "<>", -1, "<>"},
+ {"banana", "a", "<>", -1, "b<>n<>n<>"},
+ {"banana", "a", "<>", 1, "b<>nana"},
+ {"banana", "a", "<>", 1000, "b<>n<>n<>"},
+ {"banana", "an", "<>", -1, "b<><>a"},
+ {"banana", "ana", "<>", -1, "b<>na"},
+ {"banana", "", "<>", -1, "<>b<>a<>n<>a<>n<>a<>"},
+ {"banana", "", "<>", 10, "<>b<>a<>n<>a<>n<>a<>"},
+ {"banana", "", "<>", 6, "<>b<>a<>n<>a<>n<>a"},
+ {"banana", "", "<>", 5, "<>b<>a<>n<>a<>na"},
+ {"banana", "", "<>", 1, "<>banana"},
+ {"banana", "a", "a", -1, "banana"},
+ {"banana", "a", "a", 1, "banana"},
+ {"☺☻☹", "", "<>", -1, "<>☺<>☻<>☹<>"},
}
func TestReplace(t *testing.T) {
@@ -723,13 +723,13 @@ type TitleTest struct {
}
var TitleTests = []TitleTest{
- TitleTest{"", ""},
- TitleTest{"a", "A"},
- TitleTest{" aaa aaa aaa ", " Aaa Aaa Aaa "},
- TitleTest{" Aaa Aaa Aaa ", " Aaa Aaa Aaa "},
- TitleTest{"123a456", "123a456"},
- TitleTest{"double-blind", "Double-Blind"},
- TitleTest{"ÿøû", "Ÿøû"},
+ {"", ""},
+ {"a", "A"},
+ {" aaa aaa aaa ", " Aaa Aaa Aaa "},
+ {" Aaa Aaa Aaa ", " Aaa Aaa Aaa "},
+ {"123a456", "123a456"},
+ {"double-blind", "Double-Blind"},
+ {"ÿøû", "Ÿøû"},
}
func TestTitle(t *testing.T) {
diff --git a/src/pkg/tabwriter/tabwriter_test.go b/src/pkg/tabwriter/tabwriter_test.go
index b842bd0451..1c1eecf31b 100644
--- a/src/pkg/tabwriter/tabwriter_test.go
+++ b/src/pkg/tabwriter/tabwriter_test.go
@@ -109,210 +109,210 @@ type entry struct {
var tests = []entry{
- entry{
+ {
"1a",
8, 0, 1, '.', 0,
"",
"",
},
- entry{
+ {
"1a debug",
8, 0, 1, '.', Debug,
"",
"",
},
- entry{
+ {
"1b esc stripped",
8, 0, 1, '.', StripEscape,
"\xff\xff",
"",
},
- entry{
+ {
"1b esc",
8, 0, 1, '.', 0,
"\xff\xff",
"\xff\xff",
},
- entry{
+ {
"1c esc stripped",
8, 0, 1, '.', StripEscape,
"\xff\t\xff",
"\t",
},
- entry{
+ {
"1c esc",
8, 0, 1, '.', 0,
"\xff\t\xff",
"\xff\t\xff",
},
- entry{
+ {
"1d esc stripped",
8, 0, 1, '.', StripEscape,
"\xff\"foo\t\n\tbar\"\xff",
"\"foo\t\n\tbar\"",
},
- entry{
+ {
"1d esc",
8, 0, 1, '.', 0,
"\xff\"foo\t\n\tbar\"\xff",
"\xff\"foo\t\n\tbar\"\xff",
},
- entry{
+ {
"1e esc stripped",
8, 0, 1, '.', StripEscape,
"abc\xff\tdef", // unterminated escape
"abc\tdef",
},
- entry{
+ {
"1e esc",
8, 0, 1, '.', 0,
"abc\xff\tdef", // unterminated escape
"abc\xff\tdef",
},
- entry{
+ {
"2",
8, 0, 1, '.', 0,
"\n\n\n",
"\n\n\n",
},
- entry{
+ {
"3",
8, 0, 1, '.', 0,
"a\nb\nc",
"a\nb\nc",
},
- entry{
+ {
"4a",
8, 0, 1, '.', 0,
"\t", // '\t' terminates an empty cell on last line - nothing to print
"",
},
- entry{
+ {
"4b",
8, 0, 1, '.', AlignRight,
"\t", // '\t' terminates an empty cell on last line - nothing to print
"",
},
- entry{
+ {
"5",
8, 0, 1, '.', 0,
"*\t*",
"*.......*",
},
- entry{
+ {
"5b",
8, 0, 1, '.', 0,
"*\t*\n",
"*.......*\n",
},
- entry{
+ {
"5c",
8, 0, 1, '.', 0,
"*\t*\t",
"*.......*",
},
- entry{
+ {
"5c debug",
8, 0, 1, '.', Debug,
"*\t*\t",
"*.......|*",
},
- entry{
+ {
"5d",
8, 0, 1, '.', AlignRight,
"*\t*\t",
".......**",
},
- entry{
+ {
"6",
8, 0, 1, '.', 0,
"\t\n",
"........\n",
},
- entry{
+ {
"7a",
8, 0, 1, '.', 0,
"a) foo",
"a) foo",
},
- entry{
+ {
"7b",
8, 0, 1, ' ', 0,
"b) foo\tbar",
"b) foo bar",
},
- entry{
+ {
"7c",
8, 0, 1, '.', 0,
"c) foo\tbar\t",
"c) foo..bar",
},
- entry{
+ {
"7d",
8, 0, 1, '.', 0,
"d) foo\tbar\n",
"d) foo..bar\n",
},
- entry{
+ {
"7e",
8, 0, 1, '.', 0,
"e) foo\tbar\t\n",
"e) foo..bar.....\n",
},
- entry{
+ {
"7f",
8, 0, 1, '.', FilterHTML,
"f) f&lt;o\t<b>bar</b>\t\n",
"f) f&lt;o..<b>bar</b>.....\n",
},
- entry{
+ {
"7g",
8, 0, 1, '.', FilterHTML,
"g) f&lt;o\t<b>bar</b>\t non-terminated entity &amp",
"g) f&lt;o..<b>bar</b>..... non-terminated entity &amp",
},
- entry{
+ {
"7g debug",
8, 0, 1, '.', FilterHTML | Debug,
"g) f&lt;o\t<b>bar</b>\t non-terminated entity &amp",
"g) f&lt;o..|<b>bar</b>.....| non-terminated entity &amp",
},
- entry{
+ {
"8",
8, 0, 1, '*', 0,
"Hello, world!\n",
"Hello, world!\n",
},
- entry{
+ {
"9a",
1, 0, 0, '.', 0,
"1\t2\t3\t4\n" +
@@ -322,7 +322,7 @@ var tests = []entry{
"11222333344444\n",
},
- entry{
+ {
"9b",
1, 0, 0, '.', FilterHTML,
"1\t2<!---\f--->\t3\t4\n" + // \f inside HTML is ignored
@@ -332,7 +332,7 @@ var tests = []entry{
"11222333344444\n",
},
- entry{
+ {
"9c",
1, 0, 0, '.', 0,
"1\t2\t3\t4\f" + // \f causes a newline and flush
@@ -342,7 +342,7 @@ var tests = []entry{
"11222333344444\n",
},
- entry{
+ {
"9c debug",
1, 0, 0, '.', Debug,
"1\t2\t3\t4\f" + // \f causes a newline and flush
@@ -353,21 +353,21 @@ var tests = []entry{
"11|222|3333|44444\n",
},
- entry{
+ {
"10a",
5, 0, 0, '.', 0,
"1\t2\t3\t4\n",
"1....2....3....4\n",
},
- entry{
+ {
"10b",
5, 0, 0, '.', 0,
"1\t2\t3\t4\t\n",
"1....2....3....4....\n",
},
- entry{
+ {
"11",
8, 0, 1, '.', 0,
"本\tb\tc\n" +
@@ -379,7 +379,7 @@ var tests = []entry{
"aaa.....bbbb\n",
},
- entry{
+ {
"12a",
8, 0, 1, ' ', AlignRight,
"a\tè\tc\t\n" +
@@ -391,7 +391,7 @@ var tests = []entry{
" aaa èèèè\n",
},
- entry{
+ {
"12b",
2, 0, 0, ' ', 0,
"a\tb\tc\n" +
@@ -403,7 +403,7 @@ var tests = []entry{
"aaabbbb\n",
},
- entry{
+ {
"12c",
8, 0, 1, '_', 0,
"a\tb\tc\n" +
@@ -415,7 +415,7 @@ var tests = []entry{
"aaa_____bbbb\n",
},
- entry{
+ {
"13a",
4, 0, 1, '-', 0,
"4444\t日本語\t22\t1\t333\n" +
@@ -435,7 +435,7 @@ var tests = []entry{
"1------1------999999999-0000000000\n",
},
- entry{
+ {
"13b",
4, 0, 3, '.', 0,
"4444\t333\t22\t1\t333\n" +
@@ -455,7 +455,7 @@ var tests = []entry{
"1........1........999999999...0000000000\n",
},
- entry{
+ {
"13c",
8, 8, 1, '\t', FilterHTML,
"4444\t333\t22\t1\t333\n" +
@@ -475,7 +475,7 @@ var tests = []entry{
"1\t1\t<font color=red attr=日本語>999999999</font>\t0000000000\n",
},
- entry{
+ {
"14",
1, 0, 2, ' ', AlignRight,
".0\t.3\t2.4\t-5.1\t\n" +
@@ -493,7 +493,7 @@ var tests = []entry{
" .0 1.2 44.4 -13.3",
},
- entry{
+ {
"14 debug",
1, 0, 2, ' ', AlignRight | Debug,
".0\t.3\t2.4\t-5.1\t\n" +
@@ -511,35 +511,35 @@ var tests = []entry{
" .0| 1.2| 44.4| -13.3|",
},
- entry{
+ {
"15a",
4, 0, 0, '.', 0,
"a\t\tb",
"a.......b",
},
- entry{
+ {
"15b",
4, 0, 0, '.', DiscardEmptyColumns,
"a\t\tb", // htabs - do not discard column
"a.......b",
},
- entry{
+ {
"15c",
4, 0, 0, '.', DiscardEmptyColumns,
"a\v\vb",
"a...b",
},
- entry{
+ {
"15d",
4, 0, 0, '.', AlignRight | DiscardEmptyColumns,
"a\v\vb",
"...ab",
},
- entry{
+ {
"16a",
100, 100, 0, '\t', 0,
"a\tb\t\td\n" +
@@ -555,7 +555,7 @@ var tests = []entry{
"a\tb\tc\td\te\n",
},
- entry{
+ {
"16b",
100, 100, 0, '\t', DiscardEmptyColumns,
"a\vb\v\vd\n" +
@@ -571,7 +571,7 @@ var tests = []entry{
"a\tb\tc\td\te\n",
},
- entry{
+ {
"16b debug",
100, 100, 0, '\t', DiscardEmptyColumns | Debug,
"a\vb\v\vd\n" +
@@ -587,7 +587,7 @@ var tests = []entry{
"a\t|b\t|c\t|d\t|e\n",
},
- entry{
+ {
"16c",
100, 100, 0, '\t', DiscardEmptyColumns,
"a\tb\t\td\n" + // hard tabs - do not discard column
@@ -603,7 +603,7 @@ var tests = []entry{
"a\tb\tc\td\te\n",
},
- entry{
+ {
"16c debug",
100, 100, 0, '\t', DiscardEmptyColumns | Debug,
"a\tb\t\td\n" + // hard tabs - do not discard column
diff --git a/src/pkg/testing/regexp_test.go b/src/pkg/testing/regexp_test.go
index de75733db2..1e11399a80 100644
--- a/src/pkg/testing/regexp_test.go
+++ b/src/pkg/testing/regexp_test.go
@@ -31,18 +31,18 @@ type stringError struct {
}
var bad_re = []stringError{
- stringError{`*`, ErrBareClosure},
- stringError{`(abc`, ErrUnmatchedLpar},
- stringError{`abc)`, ErrUnmatchedRpar},
- stringError{`x[a-z`, ErrUnmatchedLbkt},
- stringError{`abc]`, ErrUnmatchedRbkt},
- stringError{`[z-a]`, ErrBadRange},
- stringError{`abc\`, ErrExtraneousBackslash},
- stringError{`a**`, ErrBadClosure},
- stringError{`a*+`, ErrBadClosure},
- stringError{`a??`, ErrBadClosure},
- stringError{`*`, ErrBareClosure},
- stringError{`\x`, ErrBadBackslash},
+ {`*`, ErrBareClosure},
+ {`(abc`, ErrUnmatchedLpar},
+ {`abc)`, ErrUnmatchedRpar},
+ {`x[a-z`, ErrUnmatchedLbkt},
+ {`abc]`, ErrUnmatchedRbkt},
+ {`[z-a]`, ErrBadRange},
+ {`abc\`, ErrExtraneousBackslash},
+ {`a**`, ErrBadClosure},
+ {`a*+`, ErrBadClosure},
+ {`a??`, ErrBadClosure},
+ {`*`, ErrBareClosure},
+ {`\x`, ErrBadBackslash},
}
type vec []int
@@ -54,32 +54,32 @@ type tester struct {
}
var matches = []tester{
- tester{``, "", vec{0, 0}},
- tester{`a`, "a", vec{0, 1}},
- tester{`x`, "y", vec{}},
- tester{`b`, "abc", vec{1, 2}},
- tester{`.`, "a", vec{0, 1}},
- tester{`.*`, "abcdef", vec{0, 6}},
- tester{`^abcd$`, "abcd", vec{0, 4}},
- tester{`^bcd'`, "abcdef", vec{}},
- tester{`^abcd$`, "abcde", vec{}},
- tester{`a+`, "baaab", vec{1, 4}},
- tester{`a*`, "baaab", vec{0, 0}},
- tester{`[a-z]+`, "abcd", vec{0, 4}},
- tester{`[^a-z]+`, "ab1234cd", vec{2, 6}},
- tester{`[a\-\]z]+`, "az]-bcz", vec{0, 4}},
- tester{`[^\n]+`, "abcd\n", vec{0, 4}},
- tester{`[日本語]+`, "日本語日本語", vec{0, 18}},
- tester{`()`, "", vec{0, 0, 0, 0}},
- tester{`(a)`, "a", vec{0, 1, 0, 1}},
- tester{`(.)(.)`, "日a", vec{0, 4, 0, 3, 3, 4}},
- tester{`(.*)`, "", vec{0, 0, 0, 0}},
- tester{`(.*)`, "abcd", vec{0, 4, 0, 4}},
- tester{`(..)(..)`, "abcd", vec{0, 4, 0, 2, 2, 4}},
- tester{`(([^xyz]*)(d))`, "abcd", vec{0, 4, 0, 4, 0, 3, 3, 4}},
- tester{`((a|b|c)*(d))`, "abcd", vec{0, 4, 0, 4, 2, 3, 3, 4}},
- tester{`(((a|b|c)*)(d))`, "abcd", vec{0, 4, 0, 4, 0, 3, 2, 3, 3, 4}},
- tester{`a*(|(b))c*`, "aacc", vec{0, 4, 2, 2, -1, -1}},
+ {``, "", vec{0, 0}},
+ {`a`, "a", vec{0, 1}},
+ {`x`, "y", vec{}},
+ {`b`, "abc", vec{1, 2}},
+ {`.`, "a", vec{0, 1}},
+ {`.*`, "abcdef", vec{0, 6}},
+ {`^abcd$`, "abcd", vec{0, 4}},
+ {`^bcd'`, "abcdef", vec{}},
+ {`^abcd$`, "abcde", vec{}},
+ {`a+`, "baaab", vec{1, 4}},
+ {`a*`, "baaab", vec{0, 0}},
+ {`[a-z]+`, "abcd", vec{0, 4}},
+ {`[^a-z]+`, "ab1234cd", vec{2, 6}},
+ {`[a\-\]z]+`, "az]-bcz", vec{0, 4}},
+ {`[^\n]+`, "abcd\n", vec{0, 4}},
+ {`[日本語]+`, "日本語日本語", vec{0, 18}},
+ {`()`, "", vec{0, 0, 0, 0}},
+ {`(a)`, "a", vec{0, 1, 0, 1}},
+ {`(.)(.)`, "日a", vec{0, 4, 0, 3, 3, 4}},
+ {`(.*)`, "", vec{0, 0, 0, 0}},
+ {`(.*)`, "abcd", vec{0, 4, 0, 4}},
+ {`(..)(..)`, "abcd", vec{0, 4, 0, 2, 2, 4}},
+ {`(([^xyz]*)(d))`, "abcd", vec{0, 4, 0, 4, 0, 3, 3, 4}},
+ {`((a|b|c)*(d))`, "abcd", vec{0, 4, 0, 4, 2, 3, 3, 4}},
+ {`(((a|b|c)*)(d))`, "abcd", vec{0, 4, 0, 4, 0, 3, 2, 3, 3, 4}},
+ {`a*(|(b))c*`, "aacc", vec{0, 4, 2, 2, -1, -1}},
}
func compileTest(t *T, expr string, error string) *Regexp {
diff --git a/src/pkg/time/time_test.go b/src/pkg/time/time_test.go
index a3e4fac948..c86bca1b49 100644
--- a/src/pkg/time/time_test.go
+++ b/src/pkg/time/time_test.go
@@ -25,21 +25,21 @@ type TimeTest struct {
}
var utctests = []TimeTest{
- TimeTest{0, Time{1970, 1, 1, 0, 0, 0, Thursday, 0, "UTC"}},
- TimeTest{1221681866, Time{2008, 9, 17, 20, 4, 26, Wednesday, 0, "UTC"}},
- TimeTest{-1221681866, Time{1931, 4, 16, 3, 55, 34, Thursday, 0, "UTC"}},
- TimeTest{-11644473600, Time{1601, 1, 1, 0, 0, 0, Monday, 0, "UTC"}},
- TimeTest{599529660, Time{1988, 12, 31, 0, 1, 0, Saturday, 0, "UTC"}},
- TimeTest{978220860, Time{2000, 12, 31, 0, 1, 0, Sunday, 0, "UTC"}},
- TimeTest{1e18, Time{31688740476, 10, 23, 1, 46, 40, Friday, 0, "UTC"}},
- TimeTest{-1e18, Time{-31688736537, 3, 10, 22, 13, 20, Tuesday, 0, "UTC"}},
- TimeTest{0x7fffffffffffffff, Time{292277026596, 12, 4, 15, 30, 7, Sunday, 0, "UTC"}},
- TimeTest{-0x8000000000000000, Time{-292277022657, 1, 27, 8, 29, 52, Sunday, 0, "UTC"}},
+ {0, Time{1970, 1, 1, 0, 0, 0, Thursday, 0, "UTC"}},
+ {1221681866, Time{2008, 9, 17, 20, 4, 26, Wednesday, 0, "UTC"}},
+ {-1221681866, Time{1931, 4, 16, 3, 55, 34, Thursday, 0, "UTC"}},
+ {-11644473600, Time{1601, 1, 1, 0, 0, 0, Monday, 0, "UTC"}},
+ {599529660, Time{1988, 12, 31, 0, 1, 0, Saturday, 0, "UTC"}},
+ {978220860, Time{2000, 12, 31, 0, 1, 0, Sunday, 0, "UTC"}},
+ {1e18, Time{31688740476, 10, 23, 1, 46, 40, Friday, 0, "UTC"}},
+ {-1e18, Time{-31688736537, 3, 10, 22, 13, 20, Tuesday, 0, "UTC"}},
+ {0x7fffffffffffffff, Time{292277026596, 12, 4, 15, 30, 7, Sunday, 0, "UTC"}},
+ {-0x8000000000000000, Time{-292277022657, 1, 27, 8, 29, 52, Sunday, 0, "UTC"}},
}
var localtests = []TimeTest{
- TimeTest{0, Time{1969, 12, 31, 16, 0, 0, Wednesday, -8 * 60 * 60, "PST"}},
- TimeTest{1221681866, Time{2008, 9, 17, 13, 4, 26, Wednesday, -7 * 60 * 60, "PDT"}},
+ {0, Time{1969, 12, 31, 16, 0, 0, Wednesday, -8 * 60 * 60, "PST"}},
+ {1221681866, Time{2008, 9, 17, 13, 4, 26, Wednesday, -7 * 60 * 60, "PDT"}},
}
func same(t, u *Time) bool {
@@ -108,9 +108,9 @@ type TimeFormatTest struct {
}
var rfc3339Formats = []TimeFormatTest{
- TimeFormatTest{Time{2008, 9, 17, 20, 4, 26, Wednesday, 0, "UTC"}, "2008-09-17T20:04:26Z"},
- TimeFormatTest{Time{1994, 9, 17, 20, 4, 26, Wednesday, -18000, "EST"}, "1994-09-17T20:04:26-05:00"},
- TimeFormatTest{Time{2000, 12, 26, 1, 15, 6, Wednesday, 15600, "OTO"}, "2000-12-26T01:15:06+04:20"},
+ {Time{2008, 9, 17, 20, 4, 26, Wednesday, 0, "UTC"}, "2008-09-17T20:04:26Z"},
+ {Time{1994, 9, 17, 20, 4, 26, Wednesday, -18000, "EST"}, "1994-09-17T20:04:26-05:00"},
+ {Time{2000, 12, 26, 1, 15, 6, Wednesday, 15600, "OTO"}, "2000-12-26T01:15:06+04:20"},
}
func TestRFC3339Conversion(t *testing.T) {
@@ -130,16 +130,16 @@ type FormatTest struct {
}
var formatTests = []FormatTest{
- FormatTest{"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010"},
- FormatTest{"UnixDate", UnixDate, "Thu Feb 4 21:00:57 PST 2010"},
- FormatTest{"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0800 2010"},
- FormatTest{"RFC822", RFC822, "04 Feb 10 2100 PST"},
- FormatTest{"RFC850", RFC850, "Thursday, 04-Feb-10 21:00:57 PST"},
- FormatTest{"RFC1123", RFC1123, "Thu, 04 Feb 2010 21:00:57 PST"},
- FormatTest{"RFC3339", RFC3339, "2010-02-04T21:00:57-08:00"},
- FormatTest{"Kitchen", Kitchen, "9:00PM"},
- FormatTest{"am/pm", "3pm", "9pm"},
- FormatTest{"AM/PM", "3PM", "9PM"},
+ {"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010"},
+ {"UnixDate", UnixDate, "Thu Feb 4 21:00:57 PST 2010"},
+ {"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0800 2010"},
+ {"RFC822", RFC822, "04 Feb 10 2100 PST"},
+ {"RFC850", RFC850, "Thursday, 04-Feb-10 21:00:57 PST"},
+ {"RFC1123", RFC1123, "Thu, 04 Feb 2010 21:00:57 PST"},
+ {"RFC3339", RFC3339, "2010-02-04T21:00:57-08:00"},
+ {"Kitchen", Kitchen, "9:00PM"},
+ {"am/pm", "3pm", "9pm"},
+ {"AM/PM", "3PM", "9PM"},
}
func TestFormat(t *testing.T) {
@@ -163,16 +163,16 @@ type ParseTest struct {
}
var parseTests = []ParseTest{
- ParseTest{"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true, 1},
- ParseTest{"UnixDate", UnixDate, "Thu Feb 4 21:00:57 PST 2010", true, true, 1},
- ParseTest{"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0800 2010", true, true, 1},
- ParseTest{"RFC850", RFC850, "Thursday, 04-Feb-10 21:00:57 PST", true, true, 1},
- ParseTest{"RFC1123", RFC1123, "Thu, 04 Feb 2010 21:00:57 PST", true, true, 1},
- ParseTest{"RFC3339", RFC3339, "2010-02-04T21:00:57-08:00", true, false, 1},
- ParseTest{"custom: \"2006-01-02 15:04:05-07\"", "2006-01-02 15:04:05-07", "2010-02-04 21:00:57-08", true, false, 1},
+ {"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true, 1},
+ {"UnixDate", UnixDate, "Thu Feb 4 21:00:57 PST 2010", true, true, 1},
+ {"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0800 2010", true, true, 1},
+ {"RFC850", RFC850, "Thursday, 04-Feb-10 21:00:57 PST", true, true, 1},
+ {"RFC1123", RFC1123, "Thu, 04 Feb 2010 21:00:57 PST", true, true, 1},
+ {"RFC3339", RFC3339, "2010-02-04T21:00:57-08:00", true, false, 1},
+ {"custom: \"2006-01-02 15:04:05-07\"", "2006-01-02 15:04:05-07", "2010-02-04 21:00:57-08", true, false, 1},
// Amount of white space should not matter.
- ParseTest{"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true, 1},
- ParseTest{"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true, 1},
+ {"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true, 1},
+ {"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true, 1},
}
func TestParse(t *testing.T) {
@@ -187,11 +187,11 @@ func TestParse(t *testing.T) {
}
var rubyTests = []ParseTest{
- ParseTest{"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0800 2010", true, true, 1},
+ {"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0800 2010", true, true, 1},
// Ignore the time zone in the test. If it parses, it'll be OK.
- ParseTest{"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0000 2010", false, true, 1},
- ParseTest{"RubyDate", RubyDate, "Thu Feb 04 21:00:57 +0000 2010", false, true, 1},
- ParseTest{"RubyDate", RubyDate, "Thu Feb 04 21:00:57 +1130 2010", false, true, 1},
+ {"RubyDate", RubyDate, "Thu Feb 04 21:00:57 -0000 2010", false, true, 1},
+ {"RubyDate", RubyDate, "Thu Feb 04 21:00:57 +0000 2010", false, true, 1},
+ {"RubyDate", RubyDate, "Thu Feb 04 21:00:57 +1130 2010", false, true, 1},
}
// Problematic time zone format needs special tests.
@@ -272,11 +272,11 @@ type ParseErrorTest struct {
}
var parseErrorTests = []ParseErrorTest{
- ParseErrorTest{ANSIC, "Feb 4 21:00:60 2010", "parse"}, // cannot parse Feb as Mon
- ParseErrorTest{ANSIC, "Thu Feb 4 21:00:57 @2010", "parse"},
- ParseErrorTest{ANSIC, "Thu Feb 4 21:00:60 2010", "second out of range"},
- ParseErrorTest{ANSIC, "Thu Feb 4 21:61:57 2010", "minute out of range"},
- ParseErrorTest{ANSIC, "Thu Feb 4 24:00:60 2010", "hour out of range"},
+ {ANSIC, "Feb 4 21:00:60 2010", "parse"}, // cannot parse Feb as Mon
+ {ANSIC, "Thu Feb 4 21:00:57 @2010", "parse"},
+ {ANSIC, "Thu Feb 4 21:00:60 2010", "second out of range"},
+ {ANSIC, "Thu Feb 4 21:61:57 2010", "minute out of range"},
+ {ANSIC, "Thu Feb 4 24:00:60 2010", "hour out of range"},
}
func TestParseErrors(t *testing.T) {
diff --git a/src/pkg/try/try_test.go b/src/pkg/try/try_test.go
index 7ec540feea..617b2c7c3f 100644
--- a/src/pkg/try/try_test.go
+++ b/src/pkg/try/try_test.go
@@ -35,14 +35,14 @@ var testRE = regexp.MustCompile("a(.)(.)d")
var tests = []Test{
// A simple expression. The final value is a slice in case the expression is multivalue.
- Test{"3+4", "3+4 = 7", A([]interface{}{7})},
+ {"3+4", "3+4 = 7", A([]interface{}{7})},
// A search for a function.
- Test{"", "regexp QuoteMeta", A("([])", `\(\[\]\)`)},
+ {"", "regexp QuoteMeta", A("([])", `\(\[\]\)`)},
// A search for a function with multiple return values.
- Test{"", "regexp MatchString", A("abc", "xabcd", true, nil)},
+ {"", "regexp MatchString", A("abc", "xabcd", true, nil)},
// Searches for methods.
- Test{"", "regexp MatchString", A(testRE, "xabcde", true)},
- Test{"", "regexp NumSubexp", A(testRE, 2)},
+ {"", "regexp MatchString", A(testRE, "xabcde", true)},
+ {"", "regexp NumSubexp", A(testRE, 2)},
}
func TestAll(t *testing.T) {
diff --git a/src/pkg/unicode/letter_test.go b/src/pkg/unicode/letter_test.go
index c303d48795..b8ef648270 100644
--- a/src/pkg/unicode/letter_test.go
+++ b/src/pkg/unicode/letter_test.go
@@ -112,105 +112,105 @@ type caseT struct {
var caseTest = []caseT{
// errors
- caseT{-1, '\n', 0xFFFD},
- caseT{UpperCase, -1, -1},
- caseT{UpperCase, 1 << 30, 1 << 30},
+ {-1, '\n', 0xFFFD},
+ {UpperCase, -1, -1},
+ {UpperCase, 1 << 30, 1 << 30},
// ASCII (special-cased so test carefully)
- caseT{UpperCase, '\n', '\n'},
- caseT{UpperCase, 'a', 'A'},
- caseT{UpperCase, 'A', 'A'},
- caseT{UpperCase, '7', '7'},
- caseT{LowerCase, '\n', '\n'},
- caseT{LowerCase, 'a', 'a'},
- caseT{LowerCase, 'A', 'a'},
- caseT{LowerCase, '7', '7'},
- caseT{TitleCase, '\n', '\n'},
- caseT{TitleCase, 'a', 'A'},
- caseT{TitleCase, 'A', 'A'},
- caseT{TitleCase, '7', '7'},
+ {UpperCase, '\n', '\n'},
+ {UpperCase, 'a', 'A'},
+ {UpperCase, 'A', 'A'},
+ {UpperCase, '7', '7'},
+ {LowerCase, '\n', '\n'},
+ {LowerCase, 'a', 'a'},
+ {LowerCase, 'A', 'a'},
+ {LowerCase, '7', '7'},
+ {TitleCase, '\n', '\n'},
+ {TitleCase, 'a', 'A'},
+ {TitleCase, 'A', 'A'},
+ {TitleCase, '7', '7'},
// Latin-1: easy to read the tests!
- caseT{UpperCase, 0x80, 0x80},
- caseT{UpperCase, 'Å', 'Å'},
- caseT{UpperCase, 'å', 'Å'},
- caseT{LowerCase, 0x80, 0x80},
- caseT{LowerCase, 'Å', 'å'},
- caseT{LowerCase, 'å', 'å'},
- caseT{TitleCase, 0x80, 0x80},
- caseT{TitleCase, 'Å', 'Å'},
- caseT{TitleCase, 'å', 'Å'},
+ {UpperCase, 0x80, 0x80},
+ {UpperCase, 'Å', 'Å'},
+ {UpperCase, 'å', 'Å'},
+ {LowerCase, 0x80, 0x80},
+ {LowerCase, 'Å', 'å'},
+ {LowerCase, 'å', 'å'},
+ {TitleCase, 0x80, 0x80},
+ {TitleCase, 'Å', 'Å'},
+ {TitleCase, 'å', 'Å'},
// 0131;LATIN SMALL LETTER DOTLESS I;Ll;0;L;;;;;N;;;0049;;0049
- caseT{UpperCase, 0x0131, 'I'},
- caseT{LowerCase, 0x0131, 0x0131},
- caseT{TitleCase, 0x0131, 'I'},
+ {UpperCase, 0x0131, 'I'},
+ {LowerCase, 0x0131, 0x0131},
+ {TitleCase, 0x0131, 'I'},
// 0133;LATIN SMALL LIGATURE IJ;Ll;0;L;<compat> 0069 006A;;;;N;LATIN SMALL LETTER I J;;0132;;0132
- caseT{UpperCase, 0x0133, 0x0132},
- caseT{LowerCase, 0x0133, 0x0133},
- caseT{TitleCase, 0x0133, 0x0132},
+ {UpperCase, 0x0133, 0x0132},
+ {LowerCase, 0x0133, 0x0133},
+ {TitleCase, 0x0133, 0x0132},
// 212A;KELVIN SIGN;Lu;0;L;004B;;;;N;DEGREES KELVIN;;;006B;
- caseT{UpperCase, 0x212A, 0x212A},
- caseT{LowerCase, 0x212A, 'k'},
- caseT{TitleCase, 0x212A, 0x212A},
+ {UpperCase, 0x212A, 0x212A},
+ {LowerCase, 0x212A, 'k'},
+ {TitleCase, 0x212A, 0x212A},
// From an UpperLower sequence
// A640;CYRILLIC CAPITAL LETTER ZEMLYA;Lu;0;L;;;;;N;;;;A641;
- caseT{UpperCase, 0xA640, 0xA640},
- caseT{LowerCase, 0xA640, 0xA641},
- caseT{TitleCase, 0xA640, 0xA640},
+ {UpperCase, 0xA640, 0xA640},
+ {LowerCase, 0xA640, 0xA641},
+ {TitleCase, 0xA640, 0xA640},
// A641;CYRILLIC SMALL LETTER ZEMLYA;Ll;0;L;;;;;N;;;A640;;A640
- caseT{UpperCase, 0xA641, 0xA640},
- caseT{LowerCase, 0xA641, 0xA641},
- caseT{TitleCase, 0xA641, 0xA640},
+ {UpperCase, 0xA641, 0xA640},
+ {LowerCase, 0xA641, 0xA641},
+ {TitleCase, 0xA641, 0xA640},
// A64E;CYRILLIC CAPITAL LETTER NEUTRAL YER;Lu;0;L;;;;;N;;;;A64F;
- caseT{UpperCase, 0xA64E, 0xA64E},
- caseT{LowerCase, 0xA64E, 0xA64F},
- caseT{TitleCase, 0xA64E, 0xA64E},
+ {UpperCase, 0xA64E, 0xA64E},
+ {LowerCase, 0xA64E, 0xA64F},
+ {TitleCase, 0xA64E, 0xA64E},
// A65F;CYRILLIC SMALL LETTER YN;Ll;0;L;;;;;N;;;A65E;;A65E
- caseT{UpperCase, 0xA65F, 0xA65E},
- caseT{LowerCase, 0xA65F, 0xA65F},
- caseT{TitleCase, 0xA65F, 0xA65E},
+ {UpperCase, 0xA65F, 0xA65E},
+ {LowerCase, 0xA65F, 0xA65F},
+ {TitleCase, 0xA65F, 0xA65E},
// From another UpperLower sequence
// 0139;LATIN CAPITAL LETTER L WITH ACUTE;Lu;0;L;004C 0301;;;;N;LATIN CAPITAL LETTER L ACUTE;;;013A;
- caseT{UpperCase, 0x0139, 0x0139},
- caseT{LowerCase, 0x0139, 0x013A},
- caseT{TitleCase, 0x0139, 0x0139},
+ {UpperCase, 0x0139, 0x0139},
+ {LowerCase, 0x0139, 0x013A},
+ {TitleCase, 0x0139, 0x0139},
// 013F;LATIN CAPITAL LETTER L WITH MIDDLE DOT;Lu;0;L;<compat> 004C 00B7;;;;N;;;;0140;
- caseT{UpperCase, 0x013f, 0x013f},
- caseT{LowerCase, 0x013f, 0x0140},
- caseT{TitleCase, 0x013f, 0x013f},
+ {UpperCase, 0x013f, 0x013f},
+ {LowerCase, 0x013f, 0x0140},
+ {TitleCase, 0x013f, 0x013f},
// 0148;LATIN SMALL LETTER N WITH CARON;Ll;0;L;006E 030C;;;;N;LATIN SMALL LETTER N HACEK;;0147;;0147
- caseT{UpperCase, 0x0148, 0x0147},
- caseT{LowerCase, 0x0148, 0x0148},
- caseT{TitleCase, 0x0148, 0x0147},
+ {UpperCase, 0x0148, 0x0147},
+ {LowerCase, 0x0148, 0x0148},
+ {TitleCase, 0x0148, 0x0147},
// Last block in the 5.1.0 table
// 10400;DESERET CAPITAL LETTER LONG I;Lu;0;L;;;;;N;;;;10428;
- caseT{UpperCase, 0x10400, 0x10400},
- caseT{LowerCase, 0x10400, 0x10428},
- caseT{TitleCase, 0x10400, 0x10400},
+ {UpperCase, 0x10400, 0x10400},
+ {LowerCase, 0x10400, 0x10428},
+ {TitleCase, 0x10400, 0x10400},
// 10427;DESERET CAPITAL LETTER EW;Lu;0;L;;;;;N;;;;1044F;
- caseT{UpperCase, 0x10427, 0x10427},
- caseT{LowerCase, 0x10427, 0x1044F},
- caseT{TitleCase, 0x10427, 0x10427},
+ {UpperCase, 0x10427, 0x10427},
+ {LowerCase, 0x10427, 0x1044F},
+ {TitleCase, 0x10427, 0x10427},
// 10428;DESERET SMALL LETTER LONG I;Ll;0;L;;;;;N;;;10400;;10400
- caseT{UpperCase, 0x10428, 0x10400},
- caseT{LowerCase, 0x10428, 0x10428},
- caseT{TitleCase, 0x10428, 0x10400},
+ {UpperCase, 0x10428, 0x10400},
+ {LowerCase, 0x10428, 0x10428},
+ {TitleCase, 0x10428, 0x10400},
// 1044F;DESERET SMALL LETTER EW;Ll;0;L;;;;;N;;;10427;;10427
- caseT{UpperCase, 0x1044F, 0x10427},
- caseT{LowerCase, 0x1044F, 0x1044F},
- caseT{TitleCase, 0x1044F, 0x10427},
+ {UpperCase, 0x1044F, 0x10427},
+ {LowerCase, 0x1044F, 0x1044F},
+ {TitleCase, 0x1044F, 0x10427},
// First one not in the 5.1.0 table
// 10450;SHAVIAN LETTER PEEP;Lo;0;L;;;;;N;;;;;
- caseT{UpperCase, 0x10450, 0x10450},
- caseT{LowerCase, 0x10450, 0x10450},
- caseT{TitleCase, 0x10450, 0x10450},
+ {UpperCase, 0x10450, 0x10450},
+ {LowerCase, 0x10450, 0x10450},
+ {TitleCase, 0x10450, 0x10450},
}
func TestIsLetter(t *testing.T) {
diff --git a/src/pkg/unicode/script_test.go b/src/pkg/unicode/script_test.go
index f36adbe1c2..ffdc40dc07 100644
--- a/src/pkg/unicode/script_test.go
+++ b/src/pkg/unicode/script_test.go
@@ -17,171 +17,171 @@ type T struct {
// Hand-chosen tests from Unicode 5.1.0, mostly to discover when new
// scripts and categories arise.
var inTest = []T{
- T{0x06e2, "Arabic"},
- T{0x0567, "Armenian"},
- T{0x10b20, "Avestan"},
- T{0x1b37, "Balinese"},
- T{0xa6af, "Bamum"},
- T{0x09c2, "Bengali"},
- T{0x3115, "Bopomofo"},
- T{0x282d, "Braille"},
- T{0x1a1a, "Buginese"},
- T{0x1747, "Buhid"},
- T{0x156d, "Canadian_Aboriginal"},
- T{0x102a9, "Carian"},
- T{0xaa4d, "Cham"},
- T{0x13c2, "Cherokee"},
- T{0x0020, "Common"},
- T{0x1d4a5, "Common"},
- T{0x2cfc, "Coptic"},
- T{0x12420, "Cuneiform"},
- T{0x1080c, "Cypriot"},
- T{0xa663, "Cyrillic"},
- T{0x10430, "Deseret"},
- T{0x094a, "Devanagari"},
- T{0x13001, "Egyptian_Hieroglyphs"},
- T{0x1271, "Ethiopic"},
- T{0x10fc, "Georgian"},
- T{0x2c40, "Glagolitic"},
- T{0x10347, "Gothic"},
- T{0x03ae, "Greek"},
- T{0x0abf, "Gujarati"},
- T{0x0a24, "Gurmukhi"},
- T{0x3028, "Han"},
- T{0x11b8, "Hangul"},
- T{0x1727, "Hanunoo"},
- T{0x05a0, "Hebrew"},
- T{0x3058, "Hiragana"},
- T{0x10841, "Imperial_Aramaic"},
- T{0x20e6, "Inherited"},
- T{0x10b70, "Inscriptional_Pahlavi"},
- T{0x10b5a, "Inscriptional_Parthian"},
- T{0xa9d0, "Javanese"},
- T{0x1109f, "Kaithi"},
- T{0x0cbd, "Kannada"},
- T{0x30a6, "Katakana"},
- T{0xa928, "Kayah_Li"},
- T{0x10a11, "Kharoshthi"},
- T{0x17c6, "Khmer"},
- T{0x0eaa, "Lao"},
- T{0x1d79, "Latin"},
- T{0x1c10, "Lepcha"},
- T{0x1930, "Limbu"},
- T{0x1003c, "Linear_B"},
- T{0xa4e1, "Lisu"},
- T{0x10290, "Lycian"},
- T{0x10930, "Lydian"},
- T{0x0d42, "Malayalam"},
- T{0xabd0, "Meetei_Mayek"},
- T{0x1822, "Mongolian"},
- T{0x104c, "Myanmar"},
- T{0x19c3, "New_Tai_Lue"},
- T{0x07f8, "Nko"},
- T{0x169b, "Ogham"},
- T{0x1c6a, "Ol_Chiki"},
- T{0x10310, "Old_Italic"},
- T{0x103c9, "Old_Persian"},
- T{0x10a6f, "Old_South_Arabian"},
- T{0x10c20, "Old_Turkic"},
- T{0x0b3e, "Oriya"},
- T{0x10491, "Osmanya"},
- T{0xa860, "Phags_Pa"},
- T{0x10918, "Phoenician"},
- T{0xa949, "Rejang"},
- T{0x16c0, "Runic"},
- T{0x081d, "Samaritan"},
- T{0xa892, "Saurashtra"},
- T{0x10463, "Shavian"},
- T{0x0dbd, "Sinhala"},
- T{0x1ba3, "Sundanese"},
- T{0xa803, "Syloti_Nagri"},
- T{0x070f, "Syriac"},
- T{0x170f, "Tagalog"},
- T{0x176f, "Tagbanwa"},
- T{0x1972, "Tai_Le"},
- T{0x1a62, "Tai_Tham"},
- T{0xaadc, "Tai_Viet"},
- T{0x0bbf, "Tamil"},
- T{0x0c55, "Telugu"},
- T{0x07a7, "Thaana"},
- T{0x0e46, "Thai"},
- T{0x0f36, "Tibetan"},
- T{0x2d55, "Tifinagh"},
- T{0x10388, "Ugaritic"},
- T{0xa60e, "Vai"},
- T{0xa216, "Yi"},
+ {0x06e2, "Arabic"},
+ {0x0567, "Armenian"},
+ {0x10b20, "Avestan"},
+ {0x1b37, "Balinese"},
+ {0xa6af, "Bamum"},
+ {0x09c2, "Bengali"},
+ {0x3115, "Bopomofo"},
+ {0x282d, "Braille"},
+ {0x1a1a, "Buginese"},
+ {0x1747, "Buhid"},
+ {0x156d, "Canadian_Aboriginal"},
+ {0x102a9, "Carian"},
+ {0xaa4d, "Cham"},
+ {0x13c2, "Cherokee"},
+ {0x0020, "Common"},
+ {0x1d4a5, "Common"},
+ {0x2cfc, "Coptic"},
+ {0x12420, "Cuneiform"},
+ {0x1080c, "Cypriot"},
+ {0xa663, "Cyrillic"},
+ {0x10430, "Deseret"},
+ {0x094a, "Devanagari"},
+ {0x13001, "Egyptian_Hieroglyphs"},
+ {0x1271, "Ethiopic"},
+ {0x10fc, "Georgian"},
+ {0x2c40, "Glagolitic"},
+ {0x10347, "Gothic"},
+ {0x03ae, "Greek"},
+ {0x0abf, "Gujarati"},
+ {0x0a24, "Gurmukhi"},
+ {0x3028, "Han"},
+ {0x11b8, "Hangul"},
+ {0x1727, "Hanunoo"},
+ {0x05a0, "Hebrew"},
+ {0x3058, "Hiragana"},
+ {0x10841, "Imperial_Aramaic"},
+ {0x20e6, "Inherited"},
+ {0x10b70, "Inscriptional_Pahlavi"},
+ {0x10b5a, "Inscriptional_Parthian"},
+ {0xa9d0, "Javanese"},
+ {0x1109f, "Kaithi"},
+ {0x0cbd, "Kannada"},
+ {0x30a6, "Katakana"},
+ {0xa928, "Kayah_Li"},
+ {0x10a11, "Kharoshthi"},
+ {0x17c6, "Khmer"},
+ {0x0eaa, "Lao"},
+ {0x1d79, "Latin"},
+ {0x1c10, "Lepcha"},
+ {0x1930, "Limbu"},
+ {0x1003c, "Linear_B"},
+ {0xa4e1, "Lisu"},
+ {0x10290, "Lycian"},
+ {0x10930, "Lydian"},
+ {0x0d42, "Malayalam"},
+ {0xabd0, "Meetei_Mayek"},
+ {0x1822, "Mongolian"},
+ {0x104c, "Myanmar"},
+ {0x19c3, "New_Tai_Lue"},
+ {0x07f8, "Nko"},
+ {0x169b, "Ogham"},
+ {0x1c6a, "Ol_Chiki"},
+ {0x10310, "Old_Italic"},
+ {0x103c9, "Old_Persian"},
+ {0x10a6f, "Old_South_Arabian"},
+ {0x10c20, "Old_Turkic"},
+ {0x0b3e, "Oriya"},
+ {0x10491, "Osmanya"},
+ {0xa860, "Phags_Pa"},
+ {0x10918, "Phoenician"},
+ {0xa949, "Rejang"},
+ {0x16c0, "Runic"},
+ {0x081d, "Samaritan"},
+ {0xa892, "Saurashtra"},
+ {0x10463, "Shavian"},
+ {0x0dbd, "Sinhala"},
+ {0x1ba3, "Sundanese"},
+ {0xa803, "Syloti_Nagri"},
+ {0x070f, "Syriac"},
+ {0x170f, "Tagalog"},
+ {0x176f, "Tagbanwa"},
+ {0x1972, "Tai_Le"},
+ {0x1a62, "Tai_Tham"},
+ {0xaadc, "Tai_Viet"},
+ {0x0bbf, "Tamil"},
+ {0x0c55, "Telugu"},
+ {0x07a7, "Thaana"},
+ {0x0e46, "Thai"},
+ {0x0f36, "Tibetan"},
+ {0x2d55, "Tifinagh"},
+ {0x10388, "Ugaritic"},
+ {0xa60e, "Vai"},
+ {0xa216, "Yi"},
}
var outTest = []T{ // not really worth being thorough
- T{0x20, "Telugu"},
+ {0x20, "Telugu"},
}
var inCategoryTest = []T{
- T{0x0081, "Cc"},
- T{0x17b4, "Cf"},
- T{0xf0000, "Co"},
- T{0xdb80, "Cs"},
- T{0x0236, "Ll"},
- T{0x1d9d, "Lm"},
- T{0x07cf, "Lo"},
- T{0x1f8a, "Lt"},
- T{0x03ff, "Lu"},
- T{0x0bc1, "Mc"},
- T{0x20df, "Me"},
- T{0x07f0, "Mn"},
- T{0x1bb2, "Nd"},
- T{0x10147, "Nl"},
- T{0x2478, "No"},
- T{0xfe33, "Pc"},
- T{0x2011, "Pd"},
- T{0x301e, "Pe"},
- T{0x2e03, "Pf"},
- T{0x2e02, "Pi"},
- T{0x0022, "Po"},
- T{0x2770, "Ps"},
- T{0x00a4, "Sc"},
- T{0xa711, "Sk"},
- T{0x25f9, "Sm"},
- T{0x2108, "So"},
- T{0x2028, "Zl"},
- T{0x2029, "Zp"},
- T{0x202f, "Zs"},
- T{0x04aa, "letter"},
+ {0x0081, "Cc"},
+ {0x17b4, "Cf"},
+ {0xf0000, "Co"},
+ {0xdb80, "Cs"},
+ {0x0236, "Ll"},
+ {0x1d9d, "Lm"},
+ {0x07cf, "Lo"},
+ {0x1f8a, "Lt"},
+ {0x03ff, "Lu"},
+ {0x0bc1, "Mc"},
+ {0x20df, "Me"},
+ {0x07f0, "Mn"},
+ {0x1bb2, "Nd"},
+ {0x10147, "Nl"},
+ {0x2478, "No"},
+ {0xfe33, "Pc"},
+ {0x2011, "Pd"},
+ {0x301e, "Pe"},
+ {0x2e03, "Pf"},
+ {0x2e02, "Pi"},
+ {0x0022, "Po"},
+ {0x2770, "Ps"},
+ {0x00a4, "Sc"},
+ {0xa711, "Sk"},
+ {0x25f9, "Sm"},
+ {0x2108, "So"},
+ {0x2028, "Zl"},
+ {0x2029, "Zp"},
+ {0x202f, "Zs"},
+ {0x04aa, "letter"},
}
var inPropTest = []T{
- T{0x0046, "ASCII_Hex_Digit"},
- T{0x200F, "Bidi_Control"},
- T{0x2212, "Dash"},
- T{0xE0001, "Deprecated"},
- T{0x00B7, "Diacritic"},
- T{0x30FE, "Extender"},
- T{0xFF46, "Hex_Digit"},
- T{0x2E17, "Hyphen"},
- T{0x2FFB, "IDS_Binary_Operator"},
- T{0x2FF3, "IDS_Trinary_Operator"},
- T{0xFA6A, "Ideographic"},
- T{0x200D, "Join_Control"},
- T{0x0EC4, "Logical_Order_Exception"},
- T{0x2FFFF, "Noncharacter_Code_Point"},
- T{0x065E, "Other_Alphabetic"},
- T{0x2069, "Other_Default_Ignorable_Code_Point"},
- T{0x0BD7, "Other_Grapheme_Extend"},
- T{0x0387, "Other_ID_Continue"},
- T{0x212E, "Other_ID_Start"},
- T{0x2094, "Other_Lowercase"},
- T{0x2040, "Other_Math"},
- T{0x216F, "Other_Uppercase"},
- T{0x0027, "Pattern_Syntax"},
- T{0x0020, "Pattern_White_Space"},
- T{0x300D, "Quotation_Mark"},
- T{0x2EF3, "Radical"},
- T{0x061F, "STerm"},
- T{0x2071, "Soft_Dotted"},
- T{0x003A, "Terminal_Punctuation"},
- T{0x9FC3, "Unified_Ideograph"},
- T{0xFE0F, "Variation_Selector"},
- T{0x0020, "White_Space"},
+ {0x0046, "ASCII_Hex_Digit"},
+ {0x200F, "Bidi_Control"},
+ {0x2212, "Dash"},
+ {0xE0001, "Deprecated"},
+ {0x00B7, "Diacritic"},
+ {0x30FE, "Extender"},
+ {0xFF46, "Hex_Digit"},
+ {0x2E17, "Hyphen"},
+ {0x2FFB, "IDS_Binary_Operator"},
+ {0x2FF3, "IDS_Trinary_Operator"},
+ {0xFA6A, "Ideographic"},
+ {0x200D, "Join_Control"},
+ {0x0EC4, "Logical_Order_Exception"},
+ {0x2FFFF, "Noncharacter_Code_Point"},
+ {0x065E, "Other_Alphabetic"},
+ {0x2069, "Other_Default_Ignorable_Code_Point"},
+ {0x0BD7, "Other_Grapheme_Extend"},
+ {0x0387, "Other_ID_Continue"},
+ {0x212E, "Other_ID_Start"},
+ {0x2094, "Other_Lowercase"},
+ {0x2040, "Other_Math"},
+ {0x216F, "Other_Uppercase"},
+ {0x0027, "Pattern_Syntax"},
+ {0x0020, "Pattern_White_Space"},
+ {0x300D, "Quotation_Mark"},
+ {0x2EF3, "Radical"},
+ {0x061F, "STerm"},
+ {0x2071, "Soft_Dotted"},
+ {0x003A, "Terminal_Punctuation"},
+ {0x9FC3, "Unified_Ideograph"},
+ {0xFE0F, "Variation_Selector"},
+ {0x0020, "White_Space"},
}
func TestScripts(t *testing.T) {
diff --git a/src/pkg/unicode/tables.go b/src/pkg/unicode/tables.go
index 56b478ed06..b56c9bd038 100644
--- a/src/pkg/unicode/tables.go
+++ b/src/pkg/unicode/tables.go
@@ -42,1882 +42,1882 @@ var Categories = map[string][]Range{
}
var _Lm = []Range{
- Range{0x02b0, 0x02c1, 1},
- Range{0x02c6, 0x02d1, 1},
- Range{0x02e0, 0x02e4, 1},
- Range{0x02ec, 0x02ee, 2},
- Range{0x0374, 0x037a, 6},
- Range{0x0559, 0x0640, 231},
- Range{0x06e5, 0x06e6, 1},
- Range{0x07f4, 0x07f5, 1},
- Range{0x07fa, 0x081a, 32},
- Range{0x0824, 0x0828, 4},
- Range{0x0971, 0x0e46, 1237},
- Range{0x0ec6, 0x10fc, 566},
- Range{0x17d7, 0x1843, 108},
- Range{0x1aa7, 0x1c78, 465},
- Range{0x1c79, 0x1c7d, 1},
- Range{0x1d2c, 0x1d61, 1},
- Range{0x1d78, 0x1d9b, 35},
- Range{0x1d9c, 0x1dbf, 1},
- Range{0x2071, 0x207f, 14},
- Range{0x2090, 0x2094, 1},
- Range{0x2c7d, 0x2d6f, 242},
- Range{0x2e2f, 0x3005, 470},
- Range{0x3031, 0x3035, 1},
- Range{0x303b, 0x309d, 98},
- Range{0x309e, 0x30fc, 94},
- Range{0x30fd, 0x30fe, 1},
- Range{0xa015, 0xa4f8, 1251},
- Range{0xa4f9, 0xa4fd, 1},
- Range{0xa60c, 0xa67f, 115},
- Range{0xa717, 0xa71f, 1},
- Range{0xa770, 0xa788, 24},
- Range{0xa9cf, 0xaa70, 161},
- Range{0xaadd, 0xff70, 21651},
- Range{0xff9e, 0xff9f, 1},
+ {0x02b0, 0x02c1, 1},
+ {0x02c6, 0x02d1, 1},
+ {0x02e0, 0x02e4, 1},
+ {0x02ec, 0x02ee, 2},
+ {0x0374, 0x037a, 6},
+ {0x0559, 0x0640, 231},
+ {0x06e5, 0x06e6, 1},
+ {0x07f4, 0x07f5, 1},
+ {0x07fa, 0x081a, 32},
+ {0x0824, 0x0828, 4},
+ {0x0971, 0x0e46, 1237},
+ {0x0ec6, 0x10fc, 566},
+ {0x17d7, 0x1843, 108},
+ {0x1aa7, 0x1c78, 465},
+ {0x1c79, 0x1c7d, 1},
+ {0x1d2c, 0x1d61, 1},
+ {0x1d78, 0x1d9b, 35},
+ {0x1d9c, 0x1dbf, 1},
+ {0x2071, 0x207f, 14},
+ {0x2090, 0x2094, 1},
+ {0x2c7d, 0x2d6f, 242},
+ {0x2e2f, 0x3005, 470},
+ {0x3031, 0x3035, 1},
+ {0x303b, 0x309d, 98},
+ {0x309e, 0x30fc, 94},
+ {0x30fd, 0x30fe, 1},
+ {0xa015, 0xa4f8, 1251},
+ {0xa4f9, 0xa4fd, 1},
+ {0xa60c, 0xa67f, 115},
+ {0xa717, 0xa71f, 1},
+ {0xa770, 0xa788, 24},
+ {0xa9cf, 0xaa70, 161},
+ {0xaadd, 0xff70, 21651},
+ {0xff9e, 0xff9f, 1},
}
var _Ll = []Range{
- Range{0x0061, 0x007a, 1},
- Range{0x00aa, 0x00b5, 11},
- Range{0x00ba, 0x00df, 37},
- Range{0x00e0, 0x00f6, 1},
- Range{0x00f8, 0x00ff, 1},
- Range{0x0101, 0x0137, 2},
- Range{0x0138, 0x0148, 2},
- Range{0x0149, 0x0177, 2},
- Range{0x017a, 0x017e, 2},
- Range{0x017f, 0x0180, 1},
- Range{0x0183, 0x0185, 2},
- Range{0x0188, 0x018c, 4},
- Range{0x018d, 0x0192, 5},
- Range{0x0195, 0x0199, 4},
- Range{0x019a, 0x019b, 1},
- Range{0x019e, 0x01a1, 3},
- Range{0x01a3, 0x01a5, 2},
- Range{0x01a8, 0x01aa, 2},
- Range{0x01ab, 0x01ad, 2},
- Range{0x01b0, 0x01b4, 4},
- Range{0x01b6, 0x01b9, 3},
- Range{0x01ba, 0x01bd, 3},
- Range{0x01be, 0x01bf, 1},
- Range{0x01c6, 0x01cc, 3},
- Range{0x01ce, 0x01dc, 2},
- Range{0x01dd, 0x01ef, 2},
- Range{0x01f0, 0x01f3, 3},
- Range{0x01f5, 0x01f9, 4},
- Range{0x01fb, 0x0233, 2},
- Range{0x0234, 0x0239, 1},
- Range{0x023c, 0x023f, 3},
- Range{0x0240, 0x0242, 2},
- Range{0x0247, 0x024f, 2},
- Range{0x0250, 0x0293, 1},
- Range{0x0295, 0x02af, 1},
- Range{0x0371, 0x0373, 2},
- Range{0x0377, 0x037b, 4},
- Range{0x037c, 0x037d, 1},
- Range{0x0390, 0x03ac, 28},
- Range{0x03ad, 0x03ce, 1},
- Range{0x03d0, 0x03d1, 1},
- Range{0x03d5, 0x03d7, 1},
- Range{0x03d9, 0x03ef, 2},
- Range{0x03f0, 0x03f3, 1},
- Range{0x03f5, 0x03fb, 3},
- Range{0x03fc, 0x0430, 52},
- Range{0x0431, 0x045f, 1},
- Range{0x0461, 0x0481, 2},
- Range{0x048b, 0x04bf, 2},
- Range{0x04c2, 0x04ce, 2},
- Range{0x04cf, 0x0525, 2},
- Range{0x0561, 0x0587, 1},
- Range{0x1d00, 0x1d2b, 1},
- Range{0x1d62, 0x1d77, 1},
- Range{0x1d79, 0x1d9a, 1},
- Range{0x1e01, 0x1e95, 2},
- Range{0x1e96, 0x1e9d, 1},
- Range{0x1e9f, 0x1eff, 2},
- Range{0x1f00, 0x1f07, 1},
- Range{0x1f10, 0x1f15, 1},
- Range{0x1f20, 0x1f27, 1},
- Range{0x1f30, 0x1f37, 1},
- Range{0x1f40, 0x1f45, 1},
- Range{0x1f50, 0x1f57, 1},
- Range{0x1f60, 0x1f67, 1},
- Range{0x1f70, 0x1f7d, 1},
- Range{0x1f80, 0x1f87, 1},
- Range{0x1f90, 0x1f97, 1},
- Range{0x1fa0, 0x1fa7, 1},
- Range{0x1fb0, 0x1fb4, 1},
- Range{0x1fb6, 0x1fb7, 1},
- Range{0x1fbe, 0x1fc2, 4},
- Range{0x1fc3, 0x1fc4, 1},
- Range{0x1fc6, 0x1fc7, 1},
- Range{0x1fd0, 0x1fd3, 1},
- Range{0x1fd6, 0x1fd7, 1},
- Range{0x1fe0, 0x1fe7, 1},
- Range{0x1ff2, 0x1ff4, 1},
- Range{0x1ff6, 0x1ff7, 1},
- Range{0x210a, 0x210e, 4},
- Range{0x210f, 0x2113, 4},
- Range{0x212f, 0x2139, 5},
- Range{0x213c, 0x213d, 1},
- Range{0x2146, 0x2149, 1},
- Range{0x214e, 0x2184, 54},
- Range{0x2c30, 0x2c5e, 1},
- Range{0x2c61, 0x2c65, 4},
- Range{0x2c66, 0x2c6c, 2},
- Range{0x2c71, 0x2c73, 2},
- Range{0x2c74, 0x2c76, 2},
- Range{0x2c77, 0x2c7c, 1},
- Range{0x2c81, 0x2ce3, 2},
- Range{0x2ce4, 0x2cec, 8},
- Range{0x2cee, 0x2d00, 18},
- Range{0x2d01, 0x2d25, 1},
- Range{0xa641, 0xa65f, 2},
- Range{0xa663, 0xa66d, 2},
- Range{0xa681, 0xa697, 2},
- Range{0xa723, 0xa72f, 2},
- Range{0xa730, 0xa731, 1},
- Range{0xa733, 0xa771, 2},
- Range{0xa772, 0xa778, 1},
- Range{0xa77a, 0xa77c, 2},
- Range{0xa77f, 0xa787, 2},
- Range{0xa78c, 0xfb00, 21364},
- Range{0xfb01, 0xfb06, 1},
- Range{0xfb13, 0xfb17, 1},
- Range{0xff41, 0xff5a, 1},
- Range{0x10428, 0x1044f, 1},
- Range{0x1d41a, 0x1d433, 1},
- Range{0x1d44e, 0x1d454, 1},
- Range{0x1d456, 0x1d467, 1},
- Range{0x1d482, 0x1d49b, 1},
- Range{0x1d4b6, 0x1d4b9, 1},
- Range{0x1d4bb, 0x1d4bd, 2},
- Range{0x1d4be, 0x1d4c3, 1},
- Range{0x1d4c5, 0x1d4cf, 1},
- Range{0x1d4ea, 0x1d503, 1},
- Range{0x1d51e, 0x1d537, 1},
- Range{0x1d552, 0x1d56b, 1},
- Range{0x1d586, 0x1d59f, 1},
- Range{0x1d5ba, 0x1d5d3, 1},
- Range{0x1d5ee, 0x1d607, 1},
- Range{0x1d622, 0x1d63b, 1},
- Range{0x1d656, 0x1d66f, 1},
- Range{0x1d68a, 0x1d6a5, 1},
- Range{0x1d6c2, 0x1d6da, 1},
- Range{0x1d6dc, 0x1d6e1, 1},
- Range{0x1d6fc, 0x1d714, 1},
- Range{0x1d716, 0x1d71b, 1},
- Range{0x1d736, 0x1d74e, 1},
- Range{0x1d750, 0x1d755, 1},
- Range{0x1d770, 0x1d788, 1},
- Range{0x1d78a, 0x1d78f, 1},
- Range{0x1d7aa, 0x1d7c2, 1},
- Range{0x1d7c4, 0x1d7c9, 1},
- Range{0x1d7cb, 0x1d7cb, 1},
+ {0x0061, 0x007a, 1},
+ {0x00aa, 0x00b5, 11},
+ {0x00ba, 0x00df, 37},
+ {0x00e0, 0x00f6, 1},
+ {0x00f8, 0x00ff, 1},
+ {0x0101, 0x0137, 2},
+ {0x0138, 0x0148, 2},
+ {0x0149, 0x0177, 2},
+ {0x017a, 0x017e, 2},
+ {0x017f, 0x0180, 1},
+ {0x0183, 0x0185, 2},
+ {0x0188, 0x018c, 4},
+ {0x018d, 0x0192, 5},
+ {0x0195, 0x0199, 4},
+ {0x019a, 0x019b, 1},
+ {0x019e, 0x01a1, 3},
+ {0x01a3, 0x01a5, 2},
+ {0x01a8, 0x01aa, 2},
+ {0x01ab, 0x01ad, 2},
+ {0x01b0, 0x01b4, 4},
+ {0x01b6, 0x01b9, 3},
+ {0x01ba, 0x01bd, 3},
+ {0x01be, 0x01bf, 1},
+ {0x01c6, 0x01cc, 3},
+ {0x01ce, 0x01dc, 2},
+ {0x01dd, 0x01ef, 2},
+ {0x01f0, 0x01f3, 3},
+ {0x01f5, 0x01f9, 4},
+ {0x01fb, 0x0233, 2},
+ {0x0234, 0x0239, 1},
+ {0x023c, 0x023f, 3},
+ {0x0240, 0x0242, 2},
+ {0x0247, 0x024f, 2},
+ {0x0250, 0x0293, 1},
+ {0x0295, 0x02af, 1},
+ {0x0371, 0x0373, 2},
+ {0x0377, 0x037b, 4},
+ {0x037c, 0x037d, 1},
+ {0x0390, 0x03ac, 28},
+ {0x03ad, 0x03ce, 1},
+ {0x03d0, 0x03d1, 1},
+ {0x03d5, 0x03d7, 1},
+ {0x03d9, 0x03ef, 2},
+ {0x03f0, 0x03f3, 1},
+ {0x03f5, 0x03fb, 3},
+ {0x03fc, 0x0430, 52},
+ {0x0431, 0x045f, 1},
+ {0x0461, 0x0481, 2},
+ {0x048b, 0x04bf, 2},
+ {0x04c2, 0x04ce, 2},
+ {0x04cf, 0x0525, 2},
+ {0x0561, 0x0587, 1},
+ {0x1d00, 0x1d2b, 1},
+ {0x1d62, 0x1d77, 1},
+ {0x1d79, 0x1d9a, 1},
+ {0x1e01, 0x1e95, 2},
+ {0x1e96, 0x1e9d, 1},
+ {0x1e9f, 0x1eff, 2},
+ {0x1f00, 0x1f07, 1},
+ {0x1f10, 0x1f15, 1},
+ {0x1f20, 0x1f27, 1},
+ {0x1f30, 0x1f37, 1},
+ {0x1f40, 0x1f45, 1},
+ {0x1f50, 0x1f57, 1},
+ {0x1f60, 0x1f67, 1},
+ {0x1f70, 0x1f7d, 1},
+ {0x1f80, 0x1f87, 1},
+ {0x1f90, 0x1f97, 1},
+ {0x1fa0, 0x1fa7, 1},
+ {0x1fb0, 0x1fb4, 1},
+ {0x1fb6, 0x1fb7, 1},
+ {0x1fbe, 0x1fc2, 4},
+ {0x1fc3, 0x1fc4, 1},
+ {0x1fc6, 0x1fc7, 1},
+ {0x1fd0, 0x1fd3, 1},
+ {0x1fd6, 0x1fd7, 1},
+ {0x1fe0, 0x1fe7, 1},
+ {0x1ff2, 0x1ff4, 1},
+ {0x1ff6, 0x1ff7, 1},
+ {0x210a, 0x210e, 4},
+ {0x210f, 0x2113, 4},
+ {0x212f, 0x2139, 5},
+ {0x213c, 0x213d, 1},
+ {0x2146, 0x2149, 1},
+ {0x214e, 0x2184, 54},
+ {0x2c30, 0x2c5e, 1},
+ {0x2c61, 0x2c65, 4},
+ {0x2c66, 0x2c6c, 2},
+ {0x2c71, 0x2c73, 2},
+ {0x2c74, 0x2c76, 2},
+ {0x2c77, 0x2c7c, 1},
+ {0x2c81, 0x2ce3, 2},
+ {0x2ce4, 0x2cec, 8},
+ {0x2cee, 0x2d00, 18},
+ {0x2d01, 0x2d25, 1},
+ {0xa641, 0xa65f, 2},
+ {0xa663, 0xa66d, 2},
+ {0xa681, 0xa697, 2},
+ {0xa723, 0xa72f, 2},
+ {0xa730, 0xa731, 1},
+ {0xa733, 0xa771, 2},
+ {0xa772, 0xa778, 1},
+ {0xa77a, 0xa77c, 2},
+ {0xa77f, 0xa787, 2},
+ {0xa78c, 0xfb00, 21364},
+ {0xfb01, 0xfb06, 1},
+ {0xfb13, 0xfb17, 1},
+ {0xff41, 0xff5a, 1},
+ {0x10428, 0x1044f, 1},
+ {0x1d41a, 0x1d433, 1},
+ {0x1d44e, 0x1d454, 1},
+ {0x1d456, 0x1d467, 1},
+ {0x1d482, 0x1d49b, 1},
+ {0x1d4b6, 0x1d4b9, 1},
+ {0x1d4bb, 0x1d4bd, 2},
+ {0x1d4be, 0x1d4c3, 1},
+ {0x1d4c5, 0x1d4cf, 1},
+ {0x1d4ea, 0x1d503, 1},
+ {0x1d51e, 0x1d537, 1},
+ {0x1d552, 0x1d56b, 1},
+ {0x1d586, 0x1d59f, 1},
+ {0x1d5ba, 0x1d5d3, 1},
+ {0x1d5ee, 0x1d607, 1},
+ {0x1d622, 0x1d63b, 1},
+ {0x1d656, 0x1d66f, 1},
+ {0x1d68a, 0x1d6a5, 1},
+ {0x1d6c2, 0x1d6da, 1},
+ {0x1d6dc, 0x1d6e1, 1},
+ {0x1d6fc, 0x1d714, 1},
+ {0x1d716, 0x1d71b, 1},
+ {0x1d736, 0x1d74e, 1},
+ {0x1d750, 0x1d755, 1},
+ {0x1d770, 0x1d788, 1},
+ {0x1d78a, 0x1d78f, 1},
+ {0x1d7aa, 0x1d7c2, 1},
+ {0x1d7c4, 0x1d7c9, 1},
+ {0x1d7cb, 0x1d7cb, 1},
}
var _Me = []Range{
- Range{0x0488, 0x0489, 1},
- Range{0x06de, 0x20dd, 6655},
- Range{0x20de, 0x20e0, 1},
- Range{0x20e2, 0x20e4, 1},
- Range{0xa670, 0xa672, 1},
+ {0x0488, 0x0489, 1},
+ {0x06de, 0x20dd, 6655},
+ {0x20de, 0x20e0, 1},
+ {0x20e2, 0x20e4, 1},
+ {0xa670, 0xa672, 1},
}
var _Mc = []Range{
- Range{0x0903, 0x093e, 59},
- Range{0x093f, 0x0940, 1},
- Range{0x0949, 0x094c, 1},
- Range{0x094e, 0x0982, 52},
- Range{0x0983, 0x09be, 59},
- Range{0x09bf, 0x09c0, 1},
- Range{0x09c7, 0x09c8, 1},
- Range{0x09cb, 0x09cc, 1},
- Range{0x09d7, 0x0a03, 44},
- Range{0x0a3e, 0x0a40, 1},
- Range{0x0a83, 0x0abe, 59},
- Range{0x0abf, 0x0ac0, 1},
- Range{0x0ac9, 0x0acb, 2},
- Range{0x0acc, 0x0b02, 54},
- Range{0x0b03, 0x0b3e, 59},
- Range{0x0b40, 0x0b47, 7},
- Range{0x0b48, 0x0b4b, 3},
- Range{0x0b4c, 0x0b57, 11},
- Range{0x0bbe, 0x0bbf, 1},
- Range{0x0bc1, 0x0bc2, 1},
- Range{0x0bc6, 0x0bc8, 1},
- Range{0x0bca, 0x0bcc, 1},
- Range{0x0bd7, 0x0c01, 42},
- Range{0x0c02, 0x0c03, 1},
- Range{0x0c41, 0x0c44, 1},
- Range{0x0c82, 0x0c83, 1},
- Range{0x0cbe, 0x0cc0, 2},
- Range{0x0cc1, 0x0cc4, 1},
- Range{0x0cc7, 0x0cc8, 1},
- Range{0x0cca, 0x0ccb, 1},
- Range{0x0cd5, 0x0cd6, 1},
- Range{0x0d02, 0x0d03, 1},
- Range{0x0d3e, 0x0d40, 1},
- Range{0x0d46, 0x0d48, 1},
- Range{0x0d4a, 0x0d4c, 1},
- Range{0x0d57, 0x0d82, 43},
- Range{0x0d83, 0x0dcf, 76},
- Range{0x0dd0, 0x0dd1, 1},
- Range{0x0dd8, 0x0ddf, 1},
- Range{0x0df2, 0x0df3, 1},
- Range{0x0f3e, 0x0f3f, 1},
- Range{0x0f7f, 0x102b, 172},
- Range{0x102c, 0x1031, 5},
- Range{0x1038, 0x103b, 3},
- Range{0x103c, 0x1056, 26},
- Range{0x1057, 0x1062, 11},
- Range{0x1063, 0x1064, 1},
- Range{0x1067, 0x106d, 1},
- Range{0x1083, 0x1084, 1},
- Range{0x1087, 0x108c, 1},
- Range{0x108f, 0x109a, 11},
- Range{0x109b, 0x109c, 1},
- Range{0x17b6, 0x17be, 8},
- Range{0x17bf, 0x17c5, 1},
- Range{0x17c7, 0x17c8, 1},
- Range{0x1923, 0x1926, 1},
- Range{0x1929, 0x192b, 1},
- Range{0x1930, 0x1931, 1},
- Range{0x1933, 0x1938, 1},
- Range{0x19b0, 0x19c0, 1},
- Range{0x19c8, 0x19c9, 1},
- Range{0x1a19, 0x1a1b, 1},
- Range{0x1a55, 0x1a57, 2},
- Range{0x1a61, 0x1a63, 2},
- Range{0x1a64, 0x1a6d, 9},
- Range{0x1a6e, 0x1a72, 1},
- Range{0x1b04, 0x1b35, 49},
- Range{0x1b3b, 0x1b3d, 2},
- Range{0x1b3e, 0x1b41, 1},
- Range{0x1b43, 0x1b44, 1},
- Range{0x1b82, 0x1ba1, 31},
- Range{0x1ba6, 0x1ba7, 1},
- Range{0x1baa, 0x1c24, 122},
- Range{0x1c25, 0x1c2b, 1},
- Range{0x1c34, 0x1c35, 1},
- Range{0x1ce1, 0x1cf2, 17},
- Range{0xa823, 0xa824, 1},
- Range{0xa827, 0xa880, 89},
- Range{0xa881, 0xa8b4, 51},
- Range{0xa8b5, 0xa8c3, 1},
- Range{0xa952, 0xa953, 1},
- Range{0xa983, 0xa9b4, 49},
- Range{0xa9b5, 0xa9ba, 5},
- Range{0xa9bb, 0xa9bd, 2},
- Range{0xa9be, 0xa9c0, 1},
- Range{0xaa2f, 0xaa30, 1},
- Range{0xaa33, 0xaa34, 1},
- Range{0xaa4d, 0xaa7b, 46},
- Range{0xabe3, 0xabe4, 1},
- Range{0xabe6, 0xabe7, 1},
- Range{0xabe9, 0xabea, 1},
- Range{0xabec, 0x11082, 25750},
- Range{0x110b0, 0x110b2, 1},
- Range{0x110b7, 0x110b8, 1},
- Range{0x1d165, 0x1d166, 1},
- Range{0x1d16d, 0x1d172, 1},
+ {0x0903, 0x093e, 59},
+ {0x093f, 0x0940, 1},
+ {0x0949, 0x094c, 1},
+ {0x094e, 0x0982, 52},
+ {0x0983, 0x09be, 59},
+ {0x09bf, 0x09c0, 1},
+ {0x09c7, 0x09c8, 1},
+ {0x09cb, 0x09cc, 1},
+ {0x09d7, 0x0a03, 44},
+ {0x0a3e, 0x0a40, 1},
+ {0x0a83, 0x0abe, 59},
+ {0x0abf, 0x0ac0, 1},
+ {0x0ac9, 0x0acb, 2},
+ {0x0acc, 0x0b02, 54},
+ {0x0b03, 0x0b3e, 59},
+ {0x0b40, 0x0b47, 7},
+ {0x0b48, 0x0b4b, 3},
+ {0x0b4c, 0x0b57, 11},
+ {0x0bbe, 0x0bbf, 1},
+ {0x0bc1, 0x0bc2, 1},
+ {0x0bc6, 0x0bc8, 1},
+ {0x0bca, 0x0bcc, 1},
+ {0x0bd7, 0x0c01, 42},
+ {0x0c02, 0x0c03, 1},
+ {0x0c41, 0x0c44, 1},
+ {0x0c82, 0x0c83, 1},
+ {0x0cbe, 0x0cc0, 2},
+ {0x0cc1, 0x0cc4, 1},
+ {0x0cc7, 0x0cc8, 1},
+ {0x0cca, 0x0ccb, 1},
+ {0x0cd5, 0x0cd6, 1},
+ {0x0d02, 0x0d03, 1},
+ {0x0d3e, 0x0d40, 1},
+ {0x0d46, 0x0d48, 1},
+ {0x0d4a, 0x0d4c, 1},
+ {0x0d57, 0x0d82, 43},
+ {0x0d83, 0x0dcf, 76},
+ {0x0dd0, 0x0dd1, 1},
+ {0x0dd8, 0x0ddf, 1},
+ {0x0df2, 0x0df3, 1},
+ {0x0f3e, 0x0f3f, 1},
+ {0x0f7f, 0x102b, 172},
+ {0x102c, 0x1031, 5},
+ {0x1038, 0x103b, 3},
+ {0x103c, 0x1056, 26},
+ {0x1057, 0x1062, 11},
+ {0x1063, 0x1064, 1},
+ {0x1067, 0x106d, 1},
+ {0x1083, 0x1084, 1},
+ {0x1087, 0x108c, 1},
+ {0x108f, 0x109a, 11},
+ {0x109b, 0x109c, 1},
+ {0x17b6, 0x17be, 8},
+ {0x17bf, 0x17c5, 1},
+ {0x17c7, 0x17c8, 1},
+ {0x1923, 0x1926, 1},
+ {0x1929, 0x192b, 1},
+ {0x1930, 0x1931, 1},
+ {0x1933, 0x1938, 1},
+ {0x19b0, 0x19c0, 1},
+ {0x19c8, 0x19c9, 1},
+ {0x1a19, 0x1a1b, 1},
+ {0x1a55, 0x1a57, 2},
+ {0x1a61, 0x1a63, 2},
+ {0x1a64, 0x1a6d, 9},
+ {0x1a6e, 0x1a72, 1},
+ {0x1b04, 0x1b35, 49},
+ {0x1b3b, 0x1b3d, 2},
+ {0x1b3e, 0x1b41, 1},
+ {0x1b43, 0x1b44, 1},
+ {0x1b82, 0x1ba1, 31},
+ {0x1ba6, 0x1ba7, 1},
+ {0x1baa, 0x1c24, 122},
+ {0x1c25, 0x1c2b, 1},
+ {0x1c34, 0x1c35, 1},
+ {0x1ce1, 0x1cf2, 17},
+ {0xa823, 0xa824, 1},
+ {0xa827, 0xa880, 89},
+ {0xa881, 0xa8b4, 51},
+ {0xa8b5, 0xa8c3, 1},
+ {0xa952, 0xa953, 1},
+ {0xa983, 0xa9b4, 49},
+ {0xa9b5, 0xa9ba, 5},
+ {0xa9bb, 0xa9bd, 2},
+ {0xa9be, 0xa9c0, 1},
+ {0xaa2f, 0xaa30, 1},
+ {0xaa33, 0xaa34, 1},
+ {0xaa4d, 0xaa7b, 46},
+ {0xabe3, 0xabe4, 1},
+ {0xabe6, 0xabe7, 1},
+ {0xabe9, 0xabea, 1},
+ {0xabec, 0x11082, 25750},
+ {0x110b0, 0x110b2, 1},
+ {0x110b7, 0x110b8, 1},
+ {0x1d165, 0x1d166, 1},
+ {0x1d16d, 0x1d172, 1},
}
var _Mn = []Range{
- Range{0x0300, 0x036f, 1},
- Range{0x0483, 0x0487, 1},
- Range{0x0591, 0x05bd, 1},
- Range{0x05bf, 0x05c1, 2},
- Range{0x05c2, 0x05c4, 2},
- Range{0x05c5, 0x05c7, 2},
- Range{0x0610, 0x061a, 1},
- Range{0x064b, 0x065e, 1},
- Range{0x0670, 0x06d6, 102},
- Range{0x06d7, 0x06dc, 1},
- Range{0x06df, 0x06e4, 1},
- Range{0x06e7, 0x06e8, 1},
- Range{0x06ea, 0x06ed, 1},
- Range{0x0711, 0x0730, 31},
- Range{0x0731, 0x074a, 1},
- Range{0x07a6, 0x07b0, 1},
- Range{0x07eb, 0x07f3, 1},
- Range{0x0816, 0x0819, 1},
- Range{0x081b, 0x0823, 1},
- Range{0x0825, 0x0827, 1},
- Range{0x0829, 0x082d, 1},
- Range{0x0900, 0x0902, 1},
- Range{0x093c, 0x0941, 5},
- Range{0x0942, 0x0948, 1},
- Range{0x094d, 0x0951, 4},
- Range{0x0952, 0x0955, 1},
- Range{0x0962, 0x0963, 1},
- Range{0x0981, 0x09bc, 59},
- Range{0x09c1, 0x09c4, 1},
- Range{0x09cd, 0x09e2, 21},
- Range{0x09e3, 0x0a01, 30},
- Range{0x0a02, 0x0a3c, 58},
- Range{0x0a41, 0x0a42, 1},
- Range{0x0a47, 0x0a48, 1},
- Range{0x0a4b, 0x0a4d, 1},
- Range{0x0a51, 0x0a70, 31},
- Range{0x0a71, 0x0a75, 4},
- Range{0x0a81, 0x0a82, 1},
- Range{0x0abc, 0x0ac1, 5},
- Range{0x0ac2, 0x0ac5, 1},
- Range{0x0ac7, 0x0ac8, 1},
- Range{0x0acd, 0x0ae2, 21},
- Range{0x0ae3, 0x0b01, 30},
- Range{0x0b3c, 0x0b3f, 3},
- Range{0x0b41, 0x0b44, 1},
- Range{0x0b4d, 0x0b56, 9},
- Range{0x0b62, 0x0b63, 1},
- Range{0x0b82, 0x0bc0, 62},
- Range{0x0bcd, 0x0c3e, 113},
- Range{0x0c3f, 0x0c40, 1},
- Range{0x0c46, 0x0c48, 1},
- Range{0x0c4a, 0x0c4d, 1},
- Range{0x0c55, 0x0c56, 1},
- Range{0x0c62, 0x0c63, 1},
- Range{0x0cbc, 0x0cbf, 3},
- Range{0x0cc6, 0x0ccc, 6},
- Range{0x0ccd, 0x0ce2, 21},
- Range{0x0ce3, 0x0d41, 94},
- Range{0x0d42, 0x0d44, 1},
- Range{0x0d4d, 0x0d62, 21},
- Range{0x0d63, 0x0dca, 103},
- Range{0x0dd2, 0x0dd4, 1},
- Range{0x0dd6, 0x0e31, 91},
- Range{0x0e34, 0x0e3a, 1},
- Range{0x0e47, 0x0e4e, 1},
- Range{0x0eb1, 0x0eb4, 3},
- Range{0x0eb5, 0x0eb9, 1},
- Range{0x0ebb, 0x0ebc, 1},
- Range{0x0ec8, 0x0ecd, 1},
- Range{0x0f18, 0x0f19, 1},
- Range{0x0f35, 0x0f39, 2},
- Range{0x0f71, 0x0f7e, 1},
- Range{0x0f80, 0x0f84, 1},
- Range{0x0f86, 0x0f87, 1},
- Range{0x0f90, 0x0f97, 1},
- Range{0x0f99, 0x0fbc, 1},
- Range{0x0fc6, 0x102d, 103},
- Range{0x102e, 0x1030, 1},
- Range{0x1032, 0x1037, 1},
- Range{0x1039, 0x103a, 1},
- Range{0x103d, 0x103e, 1},
- Range{0x1058, 0x1059, 1},
- Range{0x105e, 0x1060, 1},
- Range{0x1071, 0x1074, 1},
- Range{0x1082, 0x1085, 3},
- Range{0x1086, 0x108d, 7},
- Range{0x109d, 0x135f, 706},
- Range{0x1712, 0x1714, 1},
- Range{0x1732, 0x1734, 1},
- Range{0x1752, 0x1753, 1},
- Range{0x1772, 0x1773, 1},
- Range{0x17b7, 0x17bd, 1},
- Range{0x17c6, 0x17c9, 3},
- Range{0x17ca, 0x17d3, 1},
- Range{0x17dd, 0x180b, 46},
- Range{0x180c, 0x180d, 1},
- Range{0x18a9, 0x1920, 119},
- Range{0x1921, 0x1922, 1},
- Range{0x1927, 0x1928, 1},
- Range{0x1932, 0x1939, 7},
- Range{0x193a, 0x193b, 1},
- Range{0x1a17, 0x1a18, 1},
- Range{0x1a56, 0x1a58, 2},
- Range{0x1a59, 0x1a5e, 1},
- Range{0x1a60, 0x1a62, 2},
- Range{0x1a65, 0x1a6c, 1},
- Range{0x1a73, 0x1a7c, 1},
- Range{0x1a7f, 0x1b00, 129},
- Range{0x1b01, 0x1b03, 1},
- Range{0x1b34, 0x1b36, 2},
- Range{0x1b37, 0x1b3a, 1},
- Range{0x1b3c, 0x1b42, 6},
- Range{0x1b6b, 0x1b73, 1},
- Range{0x1b80, 0x1b81, 1},
- Range{0x1ba2, 0x1ba5, 1},
- Range{0x1ba8, 0x1ba9, 1},
- Range{0x1c2c, 0x1c33, 1},
- Range{0x1c36, 0x1c37, 1},
- Range{0x1cd0, 0x1cd2, 1},
- Range{0x1cd4, 0x1ce0, 1},
- Range{0x1ce2, 0x1ce8, 1},
- Range{0x1ced, 0x1dc0, 211},
- Range{0x1dc1, 0x1de6, 1},
- Range{0x1dfd, 0x1dff, 1},
- Range{0x20d0, 0x20dc, 1},
- Range{0x20e1, 0x20e5, 4},
- Range{0x20e6, 0x20f0, 1},
- Range{0x2cef, 0x2cf1, 1},
- Range{0x2de0, 0x2dff, 1},
- Range{0x302a, 0x302f, 1},
- Range{0x3099, 0x309a, 1},
- Range{0xa66f, 0xa67c, 13},
- Range{0xa67d, 0xa6f0, 115},
- Range{0xa6f1, 0xa802, 273},
- Range{0xa806, 0xa80b, 5},
- Range{0xa825, 0xa826, 1},
- Range{0xa8c4, 0xa8e0, 28},
- Range{0xa8e1, 0xa8f1, 1},
- Range{0xa926, 0xa92d, 1},
- Range{0xa947, 0xa951, 1},
- Range{0xa980, 0xa982, 1},
- Range{0xa9b3, 0xa9b6, 3},
- Range{0xa9b7, 0xa9b9, 1},
- Range{0xa9bc, 0xaa29, 109},
- Range{0xaa2a, 0xaa2e, 1},
- Range{0xaa31, 0xaa32, 1},
- Range{0xaa35, 0xaa36, 1},
- Range{0xaa43, 0xaa4c, 9},
- Range{0xaab0, 0xaab2, 2},
- Range{0xaab3, 0xaab4, 1},
- Range{0xaab7, 0xaab8, 1},
- Range{0xaabe, 0xaabf, 1},
- Range{0xaac1, 0xabe5, 292},
- Range{0xabe8, 0xabed, 5},
- Range{0xfb1e, 0xfe00, 738},
- Range{0xfe01, 0xfe0f, 1},
- Range{0xfe20, 0xfe26, 1},
- Range{0x101fd, 0x10a01, 2052},
- Range{0x10a02, 0x10a03, 1},
- Range{0x10a05, 0x10a06, 1},
- Range{0x10a0c, 0x10a0f, 1},
- Range{0x10a38, 0x10a3a, 1},
- Range{0x10a3f, 0x11080, 1601},
- Range{0x11081, 0x110b3, 50},
- Range{0x110b4, 0x110b6, 1},
- Range{0x110b9, 0x110ba, 1},
- Range{0x1d167, 0x1d169, 1},
- Range{0x1d17b, 0x1d182, 1},
- Range{0x1d185, 0x1d18b, 1},
- Range{0x1d1aa, 0x1d1ad, 1},
- Range{0x1d242, 0x1d244, 1},
- Range{0xe0100, 0xe01ef, 1},
+ {0x0300, 0x036f, 1},
+ {0x0483, 0x0487, 1},
+ {0x0591, 0x05bd, 1},
+ {0x05bf, 0x05c1, 2},
+ {0x05c2, 0x05c4, 2},
+ {0x05c5, 0x05c7, 2},
+ {0x0610, 0x061a, 1},
+ {0x064b, 0x065e, 1},
+ {0x0670, 0x06d6, 102},
+ {0x06d7, 0x06dc, 1},
+ {0x06df, 0x06e4, 1},
+ {0x06e7, 0x06e8, 1},
+ {0x06ea, 0x06ed, 1},
+ {0x0711, 0x0730, 31},
+ {0x0731, 0x074a, 1},
+ {0x07a6, 0x07b0, 1},
+ {0x07eb, 0x07f3, 1},
+ {0x0816, 0x0819, 1},
+ {0x081b, 0x0823, 1},
+ {0x0825, 0x0827, 1},
+ {0x0829, 0x082d, 1},
+ {0x0900, 0x0902, 1},
+ {0x093c, 0x0941, 5},
+ {0x0942, 0x0948, 1},
+ {0x094d, 0x0951, 4},
+ {0x0952, 0x0955, 1},
+ {0x0962, 0x0963, 1},
+ {0x0981, 0x09bc, 59},
+ {0x09c1, 0x09c4, 1},
+ {0x09cd, 0x09e2, 21},
+ {0x09e3, 0x0a01, 30},
+ {0x0a02, 0x0a3c, 58},
+ {0x0a41, 0x0a42, 1},
+ {0x0a47, 0x0a48, 1},
+ {0x0a4b, 0x0a4d, 1},
+ {0x0a51, 0x0a70, 31},
+ {0x0a71, 0x0a75, 4},
+ {0x0a81, 0x0a82, 1},
+ {0x0abc, 0x0ac1, 5},
+ {0x0ac2, 0x0ac5, 1},
+ {0x0ac7, 0x0ac8, 1},
+ {0x0acd, 0x0ae2, 21},
+ {0x0ae3, 0x0b01, 30},
+ {0x0b3c, 0x0b3f, 3},
+ {0x0b41, 0x0b44, 1},
+ {0x0b4d, 0x0b56, 9},
+ {0x0b62, 0x0b63, 1},
+ {0x0b82, 0x0bc0, 62},
+ {0x0bcd, 0x0c3e, 113},
+ {0x0c3f, 0x0c40, 1},
+ {0x0c46, 0x0c48, 1},
+ {0x0c4a, 0x0c4d, 1},
+ {0x0c55, 0x0c56, 1},
+ {0x0c62, 0x0c63, 1},
+ {0x0cbc, 0x0cbf, 3},
+ {0x0cc6, 0x0ccc, 6},
+ {0x0ccd, 0x0ce2, 21},
+ {0x0ce3, 0x0d41, 94},
+ {0x0d42, 0x0d44, 1},
+ {0x0d4d, 0x0d62, 21},
+ {0x0d63, 0x0dca, 103},
+ {0x0dd2, 0x0dd4, 1},
+ {0x0dd6, 0x0e31, 91},
+ {0x0e34, 0x0e3a, 1},
+ {0x0e47, 0x0e4e, 1},
+ {0x0eb1, 0x0eb4, 3},
+ {0x0eb5, 0x0eb9, 1},
+ {0x0ebb, 0x0ebc, 1},
+ {0x0ec8, 0x0ecd, 1},
+ {0x0f18, 0x0f19, 1},
+ {0x0f35, 0x0f39, 2},
+ {0x0f71, 0x0f7e, 1},
+ {0x0f80, 0x0f84, 1},
+ {0x0f86, 0x0f87, 1},
+ {0x0f90, 0x0f97, 1},
+ {0x0f99, 0x0fbc, 1},
+ {0x0fc6, 0x102d, 103},
+ {0x102e, 0x1030, 1},
+ {0x1032, 0x1037, 1},
+ {0x1039, 0x103a, 1},
+ {0x103d, 0x103e, 1},
+ {0x1058, 0x1059, 1},
+ {0x105e, 0x1060, 1},
+ {0x1071, 0x1074, 1},
+ {0x1082, 0x1085, 3},
+ {0x1086, 0x108d, 7},
+ {0x109d, 0x135f, 706},
+ {0x1712, 0x1714, 1},
+ {0x1732, 0x1734, 1},
+ {0x1752, 0x1753, 1},
+ {0x1772, 0x1773, 1},
+ {0x17b7, 0x17bd, 1},
+ {0x17c6, 0x17c9, 3},
+ {0x17ca, 0x17d3, 1},
+ {0x17dd, 0x180b, 46},
+ {0x180c, 0x180d, 1},
+ {0x18a9, 0x1920, 119},
+ {0x1921, 0x1922, 1},
+ {0x1927, 0x1928, 1},
+ {0x1932, 0x1939, 7},
+ {0x193a, 0x193b, 1},
+ {0x1a17, 0x1a18, 1},
+ {0x1a56, 0x1a58, 2},
+ {0x1a59, 0x1a5e, 1},
+ {0x1a60, 0x1a62, 2},
+ {0x1a65, 0x1a6c, 1},
+ {0x1a73, 0x1a7c, 1},
+ {0x1a7f, 0x1b00, 129},
+ {0x1b01, 0x1b03, 1},
+ {0x1b34, 0x1b36, 2},
+ {0x1b37, 0x1b3a, 1},
+ {0x1b3c, 0x1b42, 6},
+ {0x1b6b, 0x1b73, 1},
+ {0x1b80, 0x1b81, 1},
+ {0x1ba2, 0x1ba5, 1},
+ {0x1ba8, 0x1ba9, 1},
+ {0x1c2c, 0x1c33, 1},
+ {0x1c36, 0x1c37, 1},
+ {0x1cd0, 0x1cd2, 1},
+ {0x1cd4, 0x1ce0, 1},
+ {0x1ce2, 0x1ce8, 1},
+ {0x1ced, 0x1dc0, 211},
+ {0x1dc1, 0x1de6, 1},
+ {0x1dfd, 0x1dff, 1},
+ {0x20d0, 0x20dc, 1},
+ {0x20e1, 0x20e5, 4},
+ {0x20e6, 0x20f0, 1},
+ {0x2cef, 0x2cf1, 1},
+ {0x2de0, 0x2dff, 1},
+ {0x302a, 0x302f, 1},
+ {0x3099, 0x309a, 1},
+ {0xa66f, 0xa67c, 13},
+ {0xa67d, 0xa6f0, 115},
+ {0xa6f1, 0xa802, 273},
+ {0xa806, 0xa80b, 5},
+ {0xa825, 0xa826, 1},
+ {0xa8c4, 0xa8e0, 28},
+ {0xa8e1, 0xa8f1, 1},
+ {0xa926, 0xa92d, 1},
+ {0xa947, 0xa951, 1},
+ {0xa980, 0xa982, 1},
+ {0xa9b3, 0xa9b6, 3},
+ {0xa9b7, 0xa9b9, 1},
+ {0xa9bc, 0xaa29, 109},
+ {0xaa2a, 0xaa2e, 1},
+ {0xaa31, 0xaa32, 1},
+ {0xaa35, 0xaa36, 1},
+ {0xaa43, 0xaa4c, 9},
+ {0xaab0, 0xaab2, 2},
+ {0xaab3, 0xaab4, 1},
+ {0xaab7, 0xaab8, 1},
+ {0xaabe, 0xaabf, 1},
+ {0xaac1, 0xabe5, 292},
+ {0xabe8, 0xabed, 5},
+ {0xfb1e, 0xfe00, 738},
+ {0xfe01, 0xfe0f, 1},
+ {0xfe20, 0xfe26, 1},
+ {0x101fd, 0x10a01, 2052},
+ {0x10a02, 0x10a03, 1},
+ {0x10a05, 0x10a06, 1},
+ {0x10a0c, 0x10a0f, 1},
+ {0x10a38, 0x10a3a, 1},
+ {0x10a3f, 0x11080, 1601},
+ {0x11081, 0x110b3, 50},
+ {0x110b4, 0x110b6, 1},
+ {0x110b9, 0x110ba, 1},
+ {0x1d167, 0x1d169, 1},
+ {0x1d17b, 0x1d182, 1},
+ {0x1d185, 0x1d18b, 1},
+ {0x1d1aa, 0x1d1ad, 1},
+ {0x1d242, 0x1d244, 1},
+ {0xe0100, 0xe01ef, 1},
}
var _Zl = []Range{
- Range{0x2028, 0x2028, 1},
+ {0x2028, 0x2028, 1},
}
var letter = []Range{
- Range{0x0041, 0x005a, 1},
- Range{0x0061, 0x007a, 1},
- Range{0x00aa, 0x00b5, 11},
- Range{0x00ba, 0x00c0, 6},
- Range{0x00c1, 0x00d6, 1},
- Range{0x00d8, 0x00f6, 1},
- Range{0x00f8, 0x02c1, 1},
- Range{0x02c6, 0x02d1, 1},
- Range{0x02e0, 0x02e4, 1},
- Range{0x02ec, 0x02ee, 2},
- Range{0x0370, 0x0374, 1},
- Range{0x0376, 0x0377, 1},
- Range{0x037a, 0x037d, 1},
- Range{0x0386, 0x0388, 2},
- Range{0x0389, 0x038a, 1},
- Range{0x038c, 0x038e, 2},
- Range{0x038f, 0x03a1, 1},
- Range{0x03a3, 0x03f5, 1},
- Range{0x03f7, 0x0481, 1},
- Range{0x048a, 0x0525, 1},
- Range{0x0531, 0x0556, 1},
- Range{0x0559, 0x0561, 8},
- Range{0x0562, 0x0587, 1},
- Range{0x05d0, 0x05ea, 1},
- Range{0x05f0, 0x05f2, 1},
- Range{0x0621, 0x064a, 1},
- Range{0x066e, 0x066f, 1},
- Range{0x0671, 0x06d3, 1},
- Range{0x06d5, 0x06e5, 16},
- Range{0x06e6, 0x06ee, 8},
- Range{0x06ef, 0x06fa, 11},
- Range{0x06fb, 0x06fc, 1},
- Range{0x06ff, 0x0710, 17},
- Range{0x0712, 0x072f, 1},
- Range{0x074d, 0x07a5, 1},
- Range{0x07b1, 0x07ca, 25},
- Range{0x07cb, 0x07ea, 1},
- Range{0x07f4, 0x07f5, 1},
- Range{0x07fa, 0x0800, 6},
- Range{0x0801, 0x0815, 1},
- Range{0x081a, 0x0824, 10},
- Range{0x0828, 0x0904, 220},
- Range{0x0905, 0x0939, 1},
- Range{0x093d, 0x0950, 19},
- Range{0x0958, 0x0961, 1},
- Range{0x0971, 0x0972, 1},
- Range{0x0979, 0x097f, 1},
- Range{0x0985, 0x098c, 1},
- Range{0x098f, 0x0990, 1},
- Range{0x0993, 0x09a8, 1},
- Range{0x09aa, 0x09b0, 1},
- Range{0x09b2, 0x09b6, 4},
- Range{0x09b7, 0x09b9, 1},
- Range{0x09bd, 0x09ce, 17},
- Range{0x09dc, 0x09dd, 1},
- Range{0x09df, 0x09e1, 1},
- Range{0x09f0, 0x09f1, 1},
- Range{0x0a05, 0x0a0a, 1},
- Range{0x0a0f, 0x0a10, 1},
- Range{0x0a13, 0x0a28, 1},
- Range{0x0a2a, 0x0a30, 1},
- Range{0x0a32, 0x0a33, 1},
- Range{0x0a35, 0x0a36, 1},
- Range{0x0a38, 0x0a39, 1},
- Range{0x0a59, 0x0a5c, 1},
- Range{0x0a5e, 0x0a72, 20},
- Range{0x0a73, 0x0a74, 1},
- Range{0x0a85, 0x0a8d, 1},
- Range{0x0a8f, 0x0a91, 1},
- Range{0x0a93, 0x0aa8, 1},
- Range{0x0aaa, 0x0ab0, 1},
- Range{0x0ab2, 0x0ab3, 1},
- Range{0x0ab5, 0x0ab9, 1},
- Range{0x0abd, 0x0ad0, 19},
- Range{0x0ae0, 0x0ae1, 1},
- Range{0x0b05, 0x0b0c, 1},
- Range{0x0b0f, 0x0b10, 1},
- Range{0x0b13, 0x0b28, 1},
- Range{0x0b2a, 0x0b30, 1},
- Range{0x0b32, 0x0b33, 1},
- Range{0x0b35, 0x0b39, 1},
- Range{0x0b3d, 0x0b5c, 31},
- Range{0x0b5d, 0x0b5f, 2},
- Range{0x0b60, 0x0b61, 1},
- Range{0x0b71, 0x0b83, 18},
- Range{0x0b85, 0x0b8a, 1},
- Range{0x0b8e, 0x0b90, 1},
- Range{0x0b92, 0x0b95, 1},
- Range{0x0b99, 0x0b9a, 1},
- Range{0x0b9c, 0x0b9e, 2},
- Range{0x0b9f, 0x0ba3, 4},
- Range{0x0ba4, 0x0ba8, 4},
- Range{0x0ba9, 0x0baa, 1},
- Range{0x0bae, 0x0bb9, 1},
- Range{0x0bd0, 0x0c05, 53},
- Range{0x0c06, 0x0c0c, 1},
- Range{0x0c0e, 0x0c10, 1},
- Range{0x0c12, 0x0c28, 1},
- Range{0x0c2a, 0x0c33, 1},
- Range{0x0c35, 0x0c39, 1},
- Range{0x0c3d, 0x0c58, 27},
- Range{0x0c59, 0x0c60, 7},
- Range{0x0c61, 0x0c85, 36},
- Range{0x0c86, 0x0c8c, 1},
- Range{0x0c8e, 0x0c90, 1},
- Range{0x0c92, 0x0ca8, 1},
- Range{0x0caa, 0x0cb3, 1},
- Range{0x0cb5, 0x0cb9, 1},
- Range{0x0cbd, 0x0cde, 33},
- Range{0x0ce0, 0x0ce1, 1},
- Range{0x0d05, 0x0d0c, 1},
- Range{0x0d0e, 0x0d10, 1},
- Range{0x0d12, 0x0d28, 1},
- Range{0x0d2a, 0x0d39, 1},
- Range{0x0d3d, 0x0d60, 35},
- Range{0x0d61, 0x0d7a, 25},
- Range{0x0d7b, 0x0d7f, 1},
- Range{0x0d85, 0x0d96, 1},
- Range{0x0d9a, 0x0db1, 1},
- Range{0x0db3, 0x0dbb, 1},
- Range{0x0dbd, 0x0dc0, 3},
- Range{0x0dc1, 0x0dc6, 1},
- Range{0x0e01, 0x0e30, 1},
- Range{0x0e32, 0x0e33, 1},
- Range{0x0e40, 0x0e46, 1},
- Range{0x0e81, 0x0e82, 1},
- Range{0x0e84, 0x0e87, 3},
- Range{0x0e88, 0x0e8a, 2},
- Range{0x0e8d, 0x0e94, 7},
- Range{0x0e95, 0x0e97, 1},
- Range{0x0e99, 0x0e9f, 1},
- Range{0x0ea1, 0x0ea3, 1},
- Range{0x0ea5, 0x0ea7, 2},
- Range{0x0eaa, 0x0eab, 1},
- Range{0x0ead, 0x0eb0, 1},
- Range{0x0eb2, 0x0eb3, 1},
- Range{0x0ebd, 0x0ec0, 3},
- Range{0x0ec1, 0x0ec4, 1},
- Range{0x0ec6, 0x0edc, 22},
- Range{0x0edd, 0x0f00, 35},
- Range{0x0f40, 0x0f47, 1},
- Range{0x0f49, 0x0f6c, 1},
- Range{0x0f88, 0x0f8b, 1},
- Range{0x1000, 0x102a, 1},
- Range{0x103f, 0x1050, 17},
- Range{0x1051, 0x1055, 1},
- Range{0x105a, 0x105d, 1},
- Range{0x1061, 0x1065, 4},
- Range{0x1066, 0x106e, 8},
- Range{0x106f, 0x1070, 1},
- Range{0x1075, 0x1081, 1},
- Range{0x108e, 0x10a0, 18},
- Range{0x10a1, 0x10c5, 1},
- Range{0x10d0, 0x10fa, 1},
- Range{0x10fc, 0x1100, 4},
- Range{0x1101, 0x1248, 1},
- Range{0x124a, 0x124d, 1},
- Range{0x1250, 0x1256, 1},
- Range{0x1258, 0x125a, 2},
- Range{0x125b, 0x125d, 1},
- Range{0x1260, 0x1288, 1},
- Range{0x128a, 0x128d, 1},
- Range{0x1290, 0x12b0, 1},
- Range{0x12b2, 0x12b5, 1},
- Range{0x12b8, 0x12be, 1},
- Range{0x12c0, 0x12c2, 2},
- Range{0x12c3, 0x12c5, 1},
- Range{0x12c8, 0x12d6, 1},
- Range{0x12d8, 0x1310, 1},
- Range{0x1312, 0x1315, 1},
- Range{0x1318, 0x135a, 1},
- Range{0x1380, 0x138f, 1},
- Range{0x13a0, 0x13f4, 1},
- Range{0x1401, 0x166c, 1},
- Range{0x166f, 0x167f, 1},
- Range{0x1681, 0x169a, 1},
- Range{0x16a0, 0x16ea, 1},
- Range{0x1700, 0x170c, 1},
- Range{0x170e, 0x1711, 1},
- Range{0x1720, 0x1731, 1},
- Range{0x1740, 0x1751, 1},
- Range{0x1760, 0x176c, 1},
- Range{0x176e, 0x1770, 1},
- Range{0x1780, 0x17b3, 1},
- Range{0x17d7, 0x17dc, 5},
- Range{0x1820, 0x1877, 1},
- Range{0x1880, 0x18a8, 1},
- Range{0x18aa, 0x18b0, 6},
- Range{0x18b1, 0x18f5, 1},
- Range{0x1900, 0x191c, 1},
- Range{0x1950, 0x196d, 1},
- Range{0x1970, 0x1974, 1},
- Range{0x1980, 0x19ab, 1},
- Range{0x19c1, 0x19c7, 1},
- Range{0x1a00, 0x1a16, 1},
- Range{0x1a20, 0x1a54, 1},
- Range{0x1aa7, 0x1b05, 94},
- Range{0x1b06, 0x1b33, 1},
- Range{0x1b45, 0x1b4b, 1},
- Range{0x1b83, 0x1ba0, 1},
- Range{0x1bae, 0x1baf, 1},
- Range{0x1c00, 0x1c23, 1},
- Range{0x1c4d, 0x1c4f, 1},
- Range{0x1c5a, 0x1c7d, 1},
- Range{0x1ce9, 0x1cec, 1},
- Range{0x1cee, 0x1cf1, 1},
- Range{0x1d00, 0x1dbf, 1},
- Range{0x1e00, 0x1f15, 1},
- Range{0x1f18, 0x1f1d, 1},
- Range{0x1f20, 0x1f45, 1},
- Range{0x1f48, 0x1f4d, 1},
- Range{0x1f50, 0x1f57, 1},
- Range{0x1f59, 0x1f5f, 2},
- Range{0x1f60, 0x1f7d, 1},
- Range{0x1f80, 0x1fb4, 1},
- Range{0x1fb6, 0x1fbc, 1},
- Range{0x1fbe, 0x1fc2, 4},
- Range{0x1fc3, 0x1fc4, 1},
- Range{0x1fc6, 0x1fcc, 1},
- Range{0x1fd0, 0x1fd3, 1},
- Range{0x1fd6, 0x1fdb, 1},
- Range{0x1fe0, 0x1fec, 1},
- Range{0x1ff2, 0x1ff4, 1},
- Range{0x1ff6, 0x1ffc, 1},
- Range{0x2071, 0x207f, 14},
- Range{0x2090, 0x2094, 1},
- Range{0x2102, 0x2107, 5},
- Range{0x210a, 0x2113, 1},
- Range{0x2115, 0x2119, 4},
- Range{0x211a, 0x211d, 1},
- Range{0x2124, 0x212a, 2},
- Range{0x212b, 0x212d, 1},
- Range{0x212f, 0x2139, 1},
- Range{0x213c, 0x213f, 1},
- Range{0x2145, 0x2149, 1},
- Range{0x214e, 0x2183, 53},
- Range{0x2184, 0x2c00, 2684},
- Range{0x2c01, 0x2c2e, 1},
- Range{0x2c30, 0x2c5e, 1},
- Range{0x2c60, 0x2ce4, 1},
- Range{0x2ceb, 0x2cee, 1},
- Range{0x2d00, 0x2d25, 1},
- Range{0x2d30, 0x2d65, 1},
- Range{0x2d6f, 0x2d80, 17},
- Range{0x2d81, 0x2d96, 1},
- Range{0x2da0, 0x2da6, 1},
- Range{0x2da8, 0x2dae, 1},
- Range{0x2db0, 0x2db6, 1},
- Range{0x2db8, 0x2dbe, 1},
- Range{0x2dc0, 0x2dc6, 1},
- Range{0x2dc8, 0x2dce, 1},
- Range{0x2dd0, 0x2dd6, 1},
- Range{0x2dd8, 0x2dde, 1},
- Range{0x2e2f, 0x3005, 470},
- Range{0x3006, 0x3031, 43},
- Range{0x3032, 0x3035, 1},
- Range{0x303b, 0x303c, 1},
- Range{0x3041, 0x3096, 1},
- Range{0x309d, 0x309f, 1},
- Range{0x30a1, 0x30fa, 1},
- Range{0x30fc, 0x30ff, 1},
- Range{0x3105, 0x312d, 1},
- Range{0x3131, 0x318e, 1},
- Range{0x31a0, 0x31b7, 1},
- Range{0x31f0, 0x31ff, 1},
- Range{0x3400, 0x4db5, 1},
- Range{0x4e00, 0x9fcb, 1},
- Range{0xa000, 0xa48c, 1},
- Range{0xa4d0, 0xa4fd, 1},
- Range{0xa500, 0xa60c, 1},
- Range{0xa610, 0xa61f, 1},
- Range{0xa62a, 0xa62b, 1},
- Range{0xa640, 0xa65f, 1},
- Range{0xa662, 0xa66e, 1},
- Range{0xa67f, 0xa697, 1},
- Range{0xa6a0, 0xa6e5, 1},
- Range{0xa717, 0xa71f, 1},
- Range{0xa722, 0xa788, 1},
- Range{0xa78b, 0xa78c, 1},
- Range{0xa7fb, 0xa801, 1},
- Range{0xa803, 0xa805, 1},
- Range{0xa807, 0xa80a, 1},
- Range{0xa80c, 0xa822, 1},
- Range{0xa840, 0xa873, 1},
- Range{0xa882, 0xa8b3, 1},
- Range{0xa8f2, 0xa8f7, 1},
- Range{0xa8fb, 0xa90a, 15},
- Range{0xa90b, 0xa925, 1},
- Range{0xa930, 0xa946, 1},
- Range{0xa960, 0xa97c, 1},
- Range{0xa984, 0xa9b2, 1},
- Range{0xa9cf, 0xaa00, 49},
- Range{0xaa01, 0xaa28, 1},
- Range{0xaa40, 0xaa42, 1},
- Range{0xaa44, 0xaa4b, 1},
- Range{0xaa60, 0xaa76, 1},
- Range{0xaa7a, 0xaa80, 6},
- Range{0xaa81, 0xaaaf, 1},
- Range{0xaab1, 0xaab5, 4},
- Range{0xaab6, 0xaab9, 3},
- Range{0xaaba, 0xaabd, 1},
- Range{0xaac0, 0xaac2, 2},
- Range{0xaadb, 0xaadd, 1},
- Range{0xabc0, 0xabe2, 1},
- Range{0xac00, 0xd7a3, 1},
- Range{0xd7b0, 0xd7c6, 1},
- Range{0xd7cb, 0xd7fb, 1},
- Range{0xf900, 0xfa2d, 1},
- Range{0xfa30, 0xfa6d, 1},
- Range{0xfa70, 0xfad9, 1},
- Range{0xfb00, 0xfb06, 1},
- Range{0xfb13, 0xfb17, 1},
- Range{0xfb1d, 0xfb1f, 2},
- Range{0xfb20, 0xfb28, 1},
- Range{0xfb2a, 0xfb36, 1},
- Range{0xfb38, 0xfb3c, 1},
- Range{0xfb3e, 0xfb40, 2},
- Range{0xfb41, 0xfb43, 2},
- Range{0xfb44, 0xfb46, 2},
- Range{0xfb47, 0xfbb1, 1},
- Range{0xfbd3, 0xfd3d, 1},
- Range{0xfd50, 0xfd8f, 1},
- Range{0xfd92, 0xfdc7, 1},
- Range{0xfdf0, 0xfdfb, 1},
- Range{0xfe70, 0xfe74, 1},
- Range{0xfe76, 0xfefc, 1},
- Range{0xff21, 0xff3a, 1},
- Range{0xff41, 0xff5a, 1},
- Range{0xff66, 0xffbe, 1},
- Range{0xffc2, 0xffc7, 1},
- Range{0xffca, 0xffcf, 1},
- Range{0xffd2, 0xffd7, 1},
- Range{0xffda, 0xffdc, 1},
- Range{0x10000, 0x1000b, 1},
- Range{0x1000d, 0x10026, 1},
- Range{0x10028, 0x1003a, 1},
- Range{0x1003c, 0x1003d, 1},
- Range{0x1003f, 0x1004d, 1},
- Range{0x10050, 0x1005d, 1},
- Range{0x10080, 0x100fa, 1},
- Range{0x10280, 0x1029c, 1},
- Range{0x102a0, 0x102d0, 1},
- Range{0x10300, 0x1031e, 1},
- Range{0x10330, 0x10340, 1},
- Range{0x10342, 0x10349, 1},
- Range{0x10380, 0x1039d, 1},
- Range{0x103a0, 0x103c3, 1},
- Range{0x103c8, 0x103cf, 1},
- Range{0x10400, 0x1049d, 1},
- Range{0x10800, 0x10805, 1},
- Range{0x10808, 0x1080a, 2},
- Range{0x1080b, 0x10835, 1},
- Range{0x10837, 0x10838, 1},
- Range{0x1083c, 0x1083f, 3},
- Range{0x10840, 0x10855, 1},
- Range{0x10900, 0x10915, 1},
- Range{0x10920, 0x10939, 1},
- Range{0x10a00, 0x10a10, 16},
- Range{0x10a11, 0x10a13, 1},
- Range{0x10a15, 0x10a17, 1},
- Range{0x10a19, 0x10a33, 1},
- Range{0x10a60, 0x10a7c, 1},
- Range{0x10b00, 0x10b35, 1},
- Range{0x10b40, 0x10b55, 1},
- Range{0x10b60, 0x10b72, 1},
- Range{0x10c00, 0x10c48, 1},
- Range{0x11083, 0x110af, 1},
- Range{0x12000, 0x1236e, 1},
- Range{0x13000, 0x1342e, 1},
- Range{0x1d400, 0x1d454, 1},
- Range{0x1d456, 0x1d49c, 1},
- Range{0x1d49e, 0x1d49f, 1},
- Range{0x1d4a2, 0x1d4a5, 3},
- Range{0x1d4a6, 0x1d4a9, 3},
- Range{0x1d4aa, 0x1d4ac, 1},
- Range{0x1d4ae, 0x1d4b9, 1},
- Range{0x1d4bb, 0x1d4bd, 2},
- Range{0x1d4be, 0x1d4c3, 1},
- Range{0x1d4c5, 0x1d505, 1},
- Range{0x1d507, 0x1d50a, 1},
- Range{0x1d50d, 0x1d514, 1},
- Range{0x1d516, 0x1d51c, 1},
- Range{0x1d51e, 0x1d539, 1},
- Range{0x1d53b, 0x1d53e, 1},
- Range{0x1d540, 0x1d544, 1},
- Range{0x1d546, 0x1d54a, 4},
- Range{0x1d54b, 0x1d550, 1},
- Range{0x1d552, 0x1d6a5, 1},
- Range{0x1d6a8, 0x1d6c0, 1},
- Range{0x1d6c2, 0x1d6da, 1},
- Range{0x1d6dc, 0x1d6fa, 1},
- Range{0x1d6fc, 0x1d714, 1},
- Range{0x1d716, 0x1d734, 1},
- Range{0x1d736, 0x1d74e, 1},
- Range{0x1d750, 0x1d76e, 1},
- Range{0x1d770, 0x1d788, 1},
- Range{0x1d78a, 0x1d7a8, 1},
- Range{0x1d7aa, 0x1d7c2, 1},
- Range{0x1d7c4, 0x1d7cb, 1},
- Range{0x20000, 0x2a6d6, 1},
- Range{0x2a700, 0x2b734, 1},
- Range{0x2f800, 0x2fa1d, 1},
+ {0x0041, 0x005a, 1},
+ {0x0061, 0x007a, 1},
+ {0x00aa, 0x00b5, 11},
+ {0x00ba, 0x00c0, 6},
+ {0x00c1, 0x00d6, 1},
+ {0x00d8, 0x00f6, 1},
+ {0x00f8, 0x02c1, 1},
+ {0x02c6, 0x02d1, 1},
+ {0x02e0, 0x02e4, 1},
+ {0x02ec, 0x02ee, 2},
+ {0x0370, 0x0374, 1},
+ {0x0376, 0x0377, 1},
+ {0x037a, 0x037d, 1},
+ {0x0386, 0x0388, 2},
+ {0x0389, 0x038a, 1},
+ {0x038c, 0x038e, 2},
+ {0x038f, 0x03a1, 1},
+ {0x03a3, 0x03f5, 1},
+ {0x03f7, 0x0481, 1},
+ {0x048a, 0x0525, 1},
+ {0x0531, 0x0556, 1},
+ {0x0559, 0x0561, 8},
+ {0x0562, 0x0587, 1},
+ {0x05d0, 0x05ea, 1},
+ {0x05f0, 0x05f2, 1},
+ {0x0621, 0x064a, 1},
+ {0x066e, 0x066f, 1},
+ {0x0671, 0x06d3, 1},
+ {0x06d5, 0x06e5, 16},
+ {0x06e6, 0x06ee, 8},
+ {0x06ef, 0x06fa, 11},
+ {0x06fb, 0x06fc, 1},
+ {0x06ff, 0x0710, 17},
+ {0x0712, 0x072f, 1},
+ {0x074d, 0x07a5, 1},
+ {0x07b1, 0x07ca, 25},
+ {0x07cb, 0x07ea, 1},
+ {0x07f4, 0x07f5, 1},
+ {0x07fa, 0x0800, 6},
+ {0x0801, 0x0815, 1},
+ {0x081a, 0x0824, 10},
+ {0x0828, 0x0904, 220},
+ {0x0905, 0x0939, 1},
+ {0x093d, 0x0950, 19},
+ {0x0958, 0x0961, 1},
+ {0x0971, 0x0972, 1},
+ {0x0979, 0x097f, 1},
+ {0x0985, 0x098c, 1},
+ {0x098f, 0x0990, 1},
+ {0x0993, 0x09a8, 1},
+ {0x09aa, 0x09b0, 1},
+ {0x09b2, 0x09b6, 4},
+ {0x09b7, 0x09b9, 1},
+ {0x09bd, 0x09ce, 17},
+ {0x09dc, 0x09dd, 1},
+ {0x09df, 0x09e1, 1},
+ {0x09f0, 0x09f1, 1},
+ {0x0a05, 0x0a0a, 1},
+ {0x0a0f, 0x0a10, 1},
+ {0x0a13, 0x0a28, 1},
+ {0x0a2a, 0x0a30, 1},
+ {0x0a32, 0x0a33, 1},
+ {0x0a35, 0x0a36, 1},
+ {0x0a38, 0x0a39, 1},
+ {0x0a59, 0x0a5c, 1},
+ {0x0a5e, 0x0a72, 20},
+ {0x0a73, 0x0a74, 1},
+ {0x0a85, 0x0a8d, 1},
+ {0x0a8f, 0x0a91, 1},
+ {0x0a93, 0x0aa8, 1},
+ {0x0aaa, 0x0ab0, 1},
+ {0x0ab2, 0x0ab3, 1},
+ {0x0ab5, 0x0ab9, 1},
+ {0x0abd, 0x0ad0, 19},
+ {0x0ae0, 0x0ae1, 1},
+ {0x0b05, 0x0b0c, 1},
+ {0x0b0f, 0x0b10, 1},
+ {0x0b13, 0x0b28, 1},
+ {0x0b2a, 0x0b30, 1},
+ {0x0b32, 0x0b33, 1},
+ {0x0b35, 0x0b39, 1},
+ {0x0b3d, 0x0b5c, 31},
+ {0x0b5d, 0x0b5f, 2},
+ {0x0b60, 0x0b61, 1},
+ {0x0b71, 0x0b83, 18},
+ {0x0b85, 0x0b8a, 1},
+ {0x0b8e, 0x0b90, 1},
+ {0x0b92, 0x0b95, 1},
+ {0x0b99, 0x0b9a, 1},
+ {0x0b9c, 0x0b9e, 2},
+ {0x0b9f, 0x0ba3, 4},
+ {0x0ba4, 0x0ba8, 4},
+ {0x0ba9, 0x0baa, 1},
+ {0x0bae, 0x0bb9, 1},
+ {0x0bd0, 0x0c05, 53},
+ {0x0c06, 0x0c0c, 1},
+ {0x0c0e, 0x0c10, 1},
+ {0x0c12, 0x0c28, 1},
+ {0x0c2a, 0x0c33, 1},
+ {0x0c35, 0x0c39, 1},
+ {0x0c3d, 0x0c58, 27},
+ {0x0c59, 0x0c60, 7},
+ {0x0c61, 0x0c85, 36},
+ {0x0c86, 0x0c8c, 1},
+ {0x0c8e, 0x0c90, 1},
+ {0x0c92, 0x0ca8, 1},
+ {0x0caa, 0x0cb3, 1},
+ {0x0cb5, 0x0cb9, 1},
+ {0x0cbd, 0x0cde, 33},
+ {0x0ce0, 0x0ce1, 1},
+ {0x0d05, 0x0d0c, 1},
+ {0x0d0e, 0x0d10, 1},
+ {0x0d12, 0x0d28, 1},
+ {0x0d2a, 0x0d39, 1},
+ {0x0d3d, 0x0d60, 35},
+ {0x0d61, 0x0d7a, 25},
+ {0x0d7b, 0x0d7f, 1},
+ {0x0d85, 0x0d96, 1},
+ {0x0d9a, 0x0db1, 1},
+ {0x0db3, 0x0dbb, 1},
+ {0x0dbd, 0x0dc0, 3},
+ {0x0dc1, 0x0dc6, 1},
+ {0x0e01, 0x0e30, 1},
+ {0x0e32, 0x0e33, 1},
+ {0x0e40, 0x0e46, 1},
+ {0x0e81, 0x0e82, 1},
+ {0x0e84, 0x0e87, 3},
+ {0x0e88, 0x0e8a, 2},
+ {0x0e8d, 0x0e94, 7},
+ {0x0e95, 0x0e97, 1},
+ {0x0e99, 0x0e9f, 1},
+ {0x0ea1, 0x0ea3, 1},
+ {0x0ea5, 0x0ea7, 2},
+ {0x0eaa, 0x0eab, 1},
+ {0x0ead, 0x0eb0, 1},
+ {0x0eb2, 0x0eb3, 1},
+ {0x0ebd, 0x0ec0, 3},
+ {0x0ec1, 0x0ec4, 1},
+ {0x0ec6, 0x0edc, 22},
+ {0x0edd, 0x0f00, 35},
+ {0x0f40, 0x0f47, 1},
+ {0x0f49, 0x0f6c, 1},
+ {0x0f88, 0x0f8b, 1},
+ {0x1000, 0x102a, 1},
+ {0x103f, 0x1050, 17},
+ {0x1051, 0x1055, 1},
+ {0x105a, 0x105d, 1},
+ {0x1061, 0x1065, 4},
+ {0x1066, 0x106e, 8},
+ {0x106f, 0x1070, 1},
+ {0x1075, 0x1081, 1},
+ {0x108e, 0x10a0, 18},
+ {0x10a1, 0x10c5, 1},
+ {0x10d0, 0x10fa, 1},
+ {0x10fc, 0x1100, 4},
+ {0x1101, 0x1248, 1},
+ {0x124a, 0x124d, 1},
+ {0x1250, 0x1256, 1},
+ {0x1258, 0x125a, 2},
+ {0x125b, 0x125d, 1},
+ {0x1260, 0x1288, 1},
+ {0x128a, 0x128d, 1},
+ {0x1290, 0x12b0, 1},
+ {0x12b2, 0x12b5, 1},
+ {0x12b8, 0x12be, 1},
+ {0x12c0, 0x12c2, 2},
+ {0x12c3, 0x12c5, 1},
+ {0x12c8, 0x12d6, 1},
+ {0x12d8, 0x1310, 1},
+ {0x1312, 0x1315, 1},
+ {0x1318, 0x135a, 1},
+ {0x1380, 0x138f, 1},
+ {0x13a0, 0x13f4, 1},
+ {0x1401, 0x166c, 1},
+ {0x166f, 0x167f, 1},
+ {0x1681, 0x169a, 1},
+ {0x16a0, 0x16ea, 1},
+ {0x1700, 0x170c, 1},
+ {0x170e, 0x1711, 1},
+ {0x1720, 0x1731, 1},
+ {0x1740, 0x1751, 1},
+ {0x1760, 0x176c, 1},
+ {0x176e, 0x1770, 1},
+ {0x1780, 0x17b3, 1},
+ {0x17d7, 0x17dc, 5},
+ {0x1820, 0x1877, 1},
+ {0x1880, 0x18a8, 1},
+ {0x18aa, 0x18b0, 6},
+ {0x18b1, 0x18f5, 1},
+ {0x1900, 0x191c, 1},
+ {0x1950, 0x196d, 1},
+ {0x1970, 0x1974, 1},
+ {0x1980, 0x19ab, 1},
+ {0x19c1, 0x19c7, 1},
+ {0x1a00, 0x1a16, 1},
+ {0x1a20, 0x1a54, 1},
+ {0x1aa7, 0x1b05, 94},
+ {0x1b06, 0x1b33, 1},
+ {0x1b45, 0x1b4b, 1},
+ {0x1b83, 0x1ba0, 1},
+ {0x1bae, 0x1baf, 1},
+ {0x1c00, 0x1c23, 1},
+ {0x1c4d, 0x1c4f, 1},
+ {0x1c5a, 0x1c7d, 1},
+ {0x1ce9, 0x1cec, 1},
+ {0x1cee, 0x1cf1, 1},
+ {0x1d00, 0x1dbf, 1},
+ {0x1e00, 0x1f15, 1},
+ {0x1f18, 0x1f1d, 1},
+ {0x1f20, 0x1f45, 1},
+ {0x1f48, 0x1f4d, 1},
+ {0x1f50, 0x1f57, 1},
+ {0x1f59, 0x1f5f, 2},
+ {0x1f60, 0x1f7d, 1},
+ {0x1f80, 0x1fb4, 1},
+ {0x1fb6, 0x1fbc, 1},
+ {0x1fbe, 0x1fc2, 4},
+ {0x1fc3, 0x1fc4, 1},
+ {0x1fc6, 0x1fcc, 1},
+ {0x1fd0, 0x1fd3, 1},
+ {0x1fd6, 0x1fdb, 1},
+ {0x1fe0, 0x1fec, 1},
+ {0x1ff2, 0x1ff4, 1},
+ {0x1ff6, 0x1ffc, 1},
+ {0x2071, 0x207f, 14},
+ {0x2090, 0x2094, 1},
+ {0x2102, 0x2107, 5},
+ {0x210a, 0x2113, 1},
+ {0x2115, 0x2119, 4},
+ {0x211a, 0x211d, 1},
+ {0x2124, 0x212a, 2},
+ {0x212b, 0x212d, 1},
+ {0x212f, 0x2139, 1},
+ {0x213c, 0x213f, 1},
+ {0x2145, 0x2149, 1},
+ {0x214e, 0x2183, 53},
+ {0x2184, 0x2c00, 2684},
+ {0x2c01, 0x2c2e, 1},
+ {0x2c30, 0x2c5e, 1},
+ {0x2c60, 0x2ce4, 1},
+ {0x2ceb, 0x2cee, 1},
+ {0x2d00, 0x2d25, 1},
+ {0x2d30, 0x2d65, 1},
+ {0x2d6f, 0x2d80, 17},
+ {0x2d81, 0x2d96, 1},
+ {0x2da0, 0x2da6, 1},
+ {0x2da8, 0x2dae, 1},
+ {0x2db0, 0x2db6, 1},
+ {0x2db8, 0x2dbe, 1},
+ {0x2dc0, 0x2dc6, 1},
+ {0x2dc8, 0x2dce, 1},
+ {0x2dd0, 0x2dd6, 1},
+ {0x2dd8, 0x2dde, 1},
+ {0x2e2f, 0x3005, 470},
+ {0x3006, 0x3031, 43},
+ {0x3032, 0x3035, 1},
+ {0x303b, 0x303c, 1},
+ {0x3041, 0x3096, 1},
+ {0x309d, 0x309f, 1},
+ {0x30a1, 0x30fa, 1},
+ {0x30fc, 0x30ff, 1},
+ {0x3105, 0x312d, 1},
+ {0x3131, 0x318e, 1},
+ {0x31a0, 0x31b7, 1},
+ {0x31f0, 0x31ff, 1},
+ {0x3400, 0x4db5, 1},
+ {0x4e00, 0x9fcb, 1},
+ {0xa000, 0xa48c, 1},
+ {0xa4d0, 0xa4fd, 1},
+ {0xa500, 0xa60c, 1},
+ {0xa610, 0xa61f, 1},
+ {0xa62a, 0xa62b, 1},
+ {0xa640, 0xa65f, 1},
+ {0xa662, 0xa66e, 1},
+ {0xa67f, 0xa697, 1},
+ {0xa6a0, 0xa6e5, 1},
+ {0xa717, 0xa71f, 1},
+ {0xa722, 0xa788, 1},
+ {0xa78b, 0xa78c, 1},
+ {0xa7fb, 0xa801, 1},
+ {0xa803, 0xa805, 1},
+ {0xa807, 0xa80a, 1},
+ {0xa80c, 0xa822, 1},
+ {0xa840, 0xa873, 1},
+ {0xa882, 0xa8b3, 1},
+ {0xa8f2, 0xa8f7, 1},
+ {0xa8fb, 0xa90a, 15},
+ {0xa90b, 0xa925, 1},
+ {0xa930, 0xa946, 1},
+ {0xa960, 0xa97c, 1},
+ {0xa984, 0xa9b2, 1},
+ {0xa9cf, 0xaa00, 49},
+ {0xaa01, 0xaa28, 1},
+ {0xaa40, 0xaa42, 1},
+ {0xaa44, 0xaa4b, 1},
+ {0xaa60, 0xaa76, 1},
+ {0xaa7a, 0xaa80, 6},
+ {0xaa81, 0xaaaf, 1},
+ {0xaab1, 0xaab5, 4},
+ {0xaab6, 0xaab9, 3},
+ {0xaaba, 0xaabd, 1},
+ {0xaac0, 0xaac2, 2},
+ {0xaadb, 0xaadd, 1},
+ {0xabc0, 0xabe2, 1},
+ {0xac00, 0xd7a3, 1},
+ {0xd7b0, 0xd7c6, 1},
+ {0xd7cb, 0xd7fb, 1},
+ {0xf900, 0xfa2d, 1},
+ {0xfa30, 0xfa6d, 1},
+ {0xfa70, 0xfad9, 1},
+ {0xfb00, 0xfb06, 1},
+ {0xfb13, 0xfb17, 1},
+ {0xfb1d, 0xfb1f, 2},
+ {0xfb20, 0xfb28, 1},
+ {0xfb2a, 0xfb36, 1},
+ {0xfb38, 0xfb3c, 1},
+ {0xfb3e, 0xfb40, 2},
+ {0xfb41, 0xfb43, 2},
+ {0xfb44, 0xfb46, 2},
+ {0xfb47, 0xfbb1, 1},
+ {0xfbd3, 0xfd3d, 1},
+ {0xfd50, 0xfd8f, 1},
+ {0xfd92, 0xfdc7, 1},
+ {0xfdf0, 0xfdfb, 1},
+ {0xfe70, 0xfe74, 1},
+ {0xfe76, 0xfefc, 1},
+ {0xff21, 0xff3a, 1},
+ {0xff41, 0xff5a, 1},
+ {0xff66, 0xffbe, 1},
+ {0xffc2, 0xffc7, 1},
+ {0xffca, 0xffcf, 1},
+ {0xffd2, 0xffd7, 1},
+ {0xffda, 0xffdc, 1},
+ {0x10000, 0x1000b, 1},
+ {0x1000d, 0x10026, 1},
+ {0x10028, 0x1003a, 1},
+ {0x1003c, 0x1003d, 1},
+ {0x1003f, 0x1004d, 1},
+ {0x10050, 0x1005d, 1},
+ {0x10080, 0x100fa, 1},
+ {0x10280, 0x1029c, 1},
+ {0x102a0, 0x102d0, 1},
+ {0x10300, 0x1031e, 1},
+ {0x10330, 0x10340, 1},
+ {0x10342, 0x10349, 1},
+ {0x10380, 0x1039d, 1},
+ {0x103a0, 0x103c3, 1},
+ {0x103c8, 0x103cf, 1},
+ {0x10400, 0x1049d, 1},
+ {0x10800, 0x10805, 1},
+ {0x10808, 0x1080a, 2},
+ {0x1080b, 0x10835, 1},
+ {0x10837, 0x10838, 1},
+ {0x1083c, 0x1083f, 3},
+ {0x10840, 0x10855, 1},
+ {0x10900, 0x10915, 1},
+ {0x10920, 0x10939, 1},
+ {0x10a00, 0x10a10, 16},
+ {0x10a11, 0x10a13, 1},
+ {0x10a15, 0x10a17, 1},
+ {0x10a19, 0x10a33, 1},
+ {0x10a60, 0x10a7c, 1},
+ {0x10b00, 0x10b35, 1},
+ {0x10b40, 0x10b55, 1},
+ {0x10b60, 0x10b72, 1},
+ {0x10c00, 0x10c48, 1},
+ {0x11083, 0x110af, 1},
+ {0x12000, 0x1236e, 1},
+ {0x13000, 0x1342e, 1},
+ {0x1d400, 0x1d454, 1},
+ {0x1d456, 0x1d49c, 1},
+ {0x1d49e, 0x1d49f, 1},
+ {0x1d4a2, 0x1d4a5, 3},
+ {0x1d4a6, 0x1d4a9, 3},
+ {0x1d4aa, 0x1d4ac, 1},
+ {0x1d4ae, 0x1d4b9, 1},
+ {0x1d4bb, 0x1d4bd, 2},
+ {0x1d4be, 0x1d4c3, 1},
+ {0x1d4c5, 0x1d505, 1},
+ {0x1d507, 0x1d50a, 1},
+ {0x1d50d, 0x1d514, 1},
+ {0x1d516, 0x1d51c, 1},
+ {0x1d51e, 0x1d539, 1},
+ {0x1d53b, 0x1d53e, 1},
+ {0x1d540, 0x1d544, 1},
+ {0x1d546, 0x1d54a, 4},
+ {0x1d54b, 0x1d550, 1},
+ {0x1d552, 0x1d6a5, 1},
+ {0x1d6a8, 0x1d6c0, 1},
+ {0x1d6c2, 0x1d6da, 1},
+ {0x1d6dc, 0x1d6fa, 1},
+ {0x1d6fc, 0x1d714, 1},
+ {0x1d716, 0x1d734, 1},
+ {0x1d736, 0x1d74e, 1},
+ {0x1d750, 0x1d76e, 1},
+ {0x1d770, 0x1d788, 1},
+ {0x1d78a, 0x1d7a8, 1},
+ {0x1d7aa, 0x1d7c2, 1},
+ {0x1d7c4, 0x1d7cb, 1},
+ {0x20000, 0x2a6d6, 1},
+ {0x2a700, 0x2b734, 1},
+ {0x2f800, 0x2fa1d, 1},
}
var _Zp = []Range{
- Range{0x2029, 0x2029, 1},
+ {0x2029, 0x2029, 1},
}
var _Zs = []Range{
- Range{0x0020, 0x00a0, 128},
- Range{0x1680, 0x180e, 398},
- Range{0x2000, 0x200a, 1},
- Range{0x202f, 0x205f, 48},
- Range{0x3000, 0x3000, 1},
+ {0x0020, 0x00a0, 128},
+ {0x1680, 0x180e, 398},
+ {0x2000, 0x200a, 1},
+ {0x202f, 0x205f, 48},
+ {0x3000, 0x3000, 1},
}
var _Cs = []Range{
- Range{0xd800, 0xdfff, 1},
+ {0xd800, 0xdfff, 1},
}
var _Co = []Range{
- Range{0xe000, 0xf8ff, 1},
- Range{0xf0000, 0xffffd, 1},
- Range{0x100000, 0x10fffd, 1},
+ {0xe000, 0xf8ff, 1},
+ {0xf0000, 0xffffd, 1},
+ {0x100000, 0x10fffd, 1},
}
var _Cf = []Range{
- Range{0x00ad, 0x0600, 1363},
- Range{0x0601, 0x0603, 1},
- Range{0x06dd, 0x070f, 50},
- Range{0x17b4, 0x17b5, 1},
- Range{0x200b, 0x200f, 1},
- Range{0x202a, 0x202e, 1},
- Range{0x2060, 0x2064, 1},
- Range{0x206a, 0x206f, 1},
- Range{0xfeff, 0xfff9, 250},
- Range{0xfffa, 0xfffb, 1},
- Range{0x110bd, 0x1d173, 49334},
- Range{0x1d174, 0x1d17a, 1},
- Range{0xe0001, 0xe0020, 31},
- Range{0xe0021, 0xe007f, 1},
+ {0x00ad, 0x0600, 1363},
+ {0x0601, 0x0603, 1},
+ {0x06dd, 0x070f, 50},
+ {0x17b4, 0x17b5, 1},
+ {0x200b, 0x200f, 1},
+ {0x202a, 0x202e, 1},
+ {0x2060, 0x2064, 1},
+ {0x206a, 0x206f, 1},
+ {0xfeff, 0xfff9, 250},
+ {0xfffa, 0xfffb, 1},
+ {0x110bd, 0x1d173, 49334},
+ {0x1d174, 0x1d17a, 1},
+ {0xe0001, 0xe0020, 31},
+ {0xe0021, 0xe007f, 1},
}
var _Cc = []Range{
- Range{0x0001, 0x001f, 1},
- Range{0x007f, 0x009f, 1},
+ {0x0001, 0x001f, 1},
+ {0x007f, 0x009f, 1},
}
var _Po = []Range{
- Range{0x0021, 0x0023, 1},
- Range{0x0025, 0x0027, 1},
- Range{0x002a, 0x002e, 2},
- Range{0x002f, 0x003a, 11},
- Range{0x003b, 0x003f, 4},
- Range{0x0040, 0x005c, 28},
- Range{0x00a1, 0x00b7, 22},
- Range{0x00bf, 0x037e, 703},
- Range{0x0387, 0x055a, 467},
- Range{0x055b, 0x055f, 1},
- Range{0x0589, 0x05c0, 55},
- Range{0x05c3, 0x05c6, 3},
- Range{0x05f3, 0x05f4, 1},
- Range{0x0609, 0x060a, 1},
- Range{0x060c, 0x060d, 1},
- Range{0x061b, 0x061e, 3},
- Range{0x061f, 0x066a, 75},
- Range{0x066b, 0x066d, 1},
- Range{0x06d4, 0x0700, 44},
- Range{0x0701, 0x070d, 1},
- Range{0x07f7, 0x07f9, 1},
- Range{0x0830, 0x083e, 1},
- Range{0x0964, 0x0965, 1},
- Range{0x0970, 0x0df4, 1156},
- Range{0x0e4f, 0x0e5a, 11},
- Range{0x0e5b, 0x0f04, 169},
- Range{0x0f05, 0x0f12, 1},
- Range{0x0f85, 0x0fd0, 75},
- Range{0x0fd1, 0x0fd4, 1},
- Range{0x104a, 0x104f, 1},
- Range{0x10fb, 0x1361, 614},
- Range{0x1362, 0x1368, 1},
- Range{0x166d, 0x166e, 1},
- Range{0x16eb, 0x16ed, 1},
- Range{0x1735, 0x1736, 1},
- Range{0x17d4, 0x17d6, 1},
- Range{0x17d8, 0x17da, 1},
- Range{0x1800, 0x1805, 1},
- Range{0x1807, 0x180a, 1},
- Range{0x1944, 0x1945, 1},
- Range{0x19de, 0x19df, 1},
- Range{0x1a1e, 0x1a1f, 1},
- Range{0x1aa0, 0x1aa6, 1},
- Range{0x1aa8, 0x1aad, 1},
- Range{0x1b5a, 0x1b60, 1},
- Range{0x1c3b, 0x1c3f, 1},
- Range{0x1c7e, 0x1c7f, 1},
- Range{0x1cd3, 0x2016, 835},
- Range{0x2017, 0x2020, 9},
- Range{0x2021, 0x2027, 1},
- Range{0x2030, 0x2038, 1},
- Range{0x203b, 0x203e, 1},
- Range{0x2041, 0x2043, 1},
- Range{0x2047, 0x2051, 1},
- Range{0x2053, 0x2055, 2},
- Range{0x2056, 0x205e, 1},
- Range{0x2cf9, 0x2cfc, 1},
- Range{0x2cfe, 0x2cff, 1},
- Range{0x2e00, 0x2e01, 1},
- Range{0x2e06, 0x2e08, 1},
- Range{0x2e0b, 0x2e0e, 3},
- Range{0x2e0f, 0x2e16, 1},
- Range{0x2e18, 0x2e19, 1},
- Range{0x2e1b, 0x2e1e, 3},
- Range{0x2e1f, 0x2e2a, 11},
- Range{0x2e2b, 0x2e2e, 1},
- Range{0x2e30, 0x2e31, 1},
- Range{0x3001, 0x3003, 1},
- Range{0x303d, 0x30fb, 190},
- Range{0xa4fe, 0xa4ff, 1},
- Range{0xa60d, 0xa60f, 1},
- Range{0xa673, 0xa67e, 11},
- Range{0xa6f2, 0xa6f7, 1},
- Range{0xa874, 0xa877, 1},
- Range{0xa8ce, 0xa8cf, 1},
- Range{0xa8f8, 0xa8fa, 1},
- Range{0xa92e, 0xa92f, 1},
- Range{0xa95f, 0xa9c1, 98},
- Range{0xa9c2, 0xa9cd, 1},
- Range{0xa9de, 0xa9df, 1},
- Range{0xaa5c, 0xaa5f, 1},
- Range{0xaade, 0xaadf, 1},
- Range{0xabeb, 0xfe10, 21029},
- Range{0xfe11, 0xfe16, 1},
- Range{0xfe19, 0xfe30, 23},
- Range{0xfe45, 0xfe46, 1},
- Range{0xfe49, 0xfe4c, 1},
- Range{0xfe50, 0xfe52, 1},
- Range{0xfe54, 0xfe57, 1},
- Range{0xfe5f, 0xfe61, 1},
- Range{0xfe68, 0xfe6a, 2},
- Range{0xfe6b, 0xff01, 150},
- Range{0xff02, 0xff03, 1},
- Range{0xff05, 0xff07, 1},
- Range{0xff0a, 0xff0e, 2},
- Range{0xff0f, 0xff1a, 11},
- Range{0xff1b, 0xff1f, 4},
- Range{0xff20, 0xff3c, 28},
- Range{0xff61, 0xff64, 3},
- Range{0xff65, 0x10100, 411},
- Range{0x10101, 0x1039f, 670},
- Range{0x103d0, 0x10857, 1159},
- Range{0x1091f, 0x1093f, 32},
- Range{0x10a50, 0x10a58, 1},
- Range{0x10a7f, 0x10b39, 186},
- Range{0x10b3a, 0x10b3f, 1},
- Range{0x110bb, 0x110bc, 1},
- Range{0x110be, 0x110c1, 1},
- Range{0x12470, 0x12473, 1},
+ {0x0021, 0x0023, 1},
+ {0x0025, 0x0027, 1},
+ {0x002a, 0x002e, 2},
+ {0x002f, 0x003a, 11},
+ {0x003b, 0x003f, 4},
+ {0x0040, 0x005c, 28},
+ {0x00a1, 0x00b7, 22},
+ {0x00bf, 0x037e, 703},
+ {0x0387, 0x055a, 467},
+ {0x055b, 0x055f, 1},
+ {0x0589, 0x05c0, 55},
+ {0x05c3, 0x05c6, 3},
+ {0x05f3, 0x05f4, 1},
+ {0x0609, 0x060a, 1},
+ {0x060c, 0x060d, 1},
+ {0x061b, 0x061e, 3},
+ {0x061f, 0x066a, 75},
+ {0x066b, 0x066d, 1},
+ {0x06d4, 0x0700, 44},
+ {0x0701, 0x070d, 1},
+ {0x07f7, 0x07f9, 1},
+ {0x0830, 0x083e, 1},
+ {0x0964, 0x0965, 1},
+ {0x0970, 0x0df4, 1156},
+ {0x0e4f, 0x0e5a, 11},
+ {0x0e5b, 0x0f04, 169},
+ {0x0f05, 0x0f12, 1},
+ {0x0f85, 0x0fd0, 75},
+ {0x0fd1, 0x0fd4, 1},
+ {0x104a, 0x104f, 1},
+ {0x10fb, 0x1361, 614},
+ {0x1362, 0x1368, 1},
+ {0x166d, 0x166e, 1},
+ {0x16eb, 0x16ed, 1},
+ {0x1735, 0x1736, 1},
+ {0x17d4, 0x17d6, 1},
+ {0x17d8, 0x17da, 1},
+ {0x1800, 0x1805, 1},
+ {0x1807, 0x180a, 1},
+ {0x1944, 0x1945, 1},
+ {0x19de, 0x19df, 1},
+ {0x1a1e, 0x1a1f, 1},
+ {0x1aa0, 0x1aa6, 1},
+ {0x1aa8, 0x1aad, 1},
+ {0x1b5a, 0x1b60, 1},
+ {0x1c3b, 0x1c3f, 1},
+ {0x1c7e, 0x1c7f, 1},
+ {0x1cd3, 0x2016, 835},
+ {0x2017, 0x2020, 9},
+ {0x2021, 0x2027, 1},
+ {0x2030, 0x2038, 1},
+ {0x203b, 0x203e, 1},
+ {0x2041, 0x2043, 1},
+ {0x2047, 0x2051, 1},
+ {0x2053, 0x2055, 2},
+ {0x2056, 0x205e, 1},
+ {0x2cf9, 0x2cfc, 1},
+ {0x2cfe, 0x2cff, 1},
+ {0x2e00, 0x2e01, 1},
+ {0x2e06, 0x2e08, 1},
+ {0x2e0b, 0x2e0e, 3},
+ {0x2e0f, 0x2e16, 1},
+ {0x2e18, 0x2e19, 1},
+ {0x2e1b, 0x2e1e, 3},
+ {0x2e1f, 0x2e2a, 11},
+ {0x2e2b, 0x2e2e, 1},
+ {0x2e30, 0x2e31, 1},
+ {0x3001, 0x3003, 1},
+ {0x303d, 0x30fb, 190},
+ {0xa4fe, 0xa4ff, 1},
+ {0xa60d, 0xa60f, 1},
+ {0xa673, 0xa67e, 11},
+ {0xa6f2, 0xa6f7, 1},
+ {0xa874, 0xa877, 1},
+ {0xa8ce, 0xa8cf, 1},
+ {0xa8f8, 0xa8fa, 1},
+ {0xa92e, 0xa92f, 1},
+ {0xa95f, 0xa9c1, 98},
+ {0xa9c2, 0xa9cd, 1},
+ {0xa9de, 0xa9df, 1},
+ {0xaa5c, 0xaa5f, 1},
+ {0xaade, 0xaadf, 1},
+ {0xabeb, 0xfe10, 21029},
+ {0xfe11, 0xfe16, 1},
+ {0xfe19, 0xfe30, 23},
+ {0xfe45, 0xfe46, 1},
+ {0xfe49, 0xfe4c, 1},
+ {0xfe50, 0xfe52, 1},
+ {0xfe54, 0xfe57, 1},
+ {0xfe5f, 0xfe61, 1},
+ {0xfe68, 0xfe6a, 2},
+ {0xfe6b, 0xff01, 150},
+ {0xff02, 0xff03, 1},
+ {0xff05, 0xff07, 1},
+ {0xff0a, 0xff0e, 2},
+ {0xff0f, 0xff1a, 11},
+ {0xff1b, 0xff1f, 4},
+ {0xff20, 0xff3c, 28},
+ {0xff61, 0xff64, 3},
+ {0xff65, 0x10100, 411},
+ {0x10101, 0x1039f, 670},
+ {0x103d0, 0x10857, 1159},
+ {0x1091f, 0x1093f, 32},
+ {0x10a50, 0x10a58, 1},
+ {0x10a7f, 0x10b39, 186},
+ {0x10b3a, 0x10b3f, 1},
+ {0x110bb, 0x110bc, 1},
+ {0x110be, 0x110c1, 1},
+ {0x12470, 0x12473, 1},
}
var _Pi = []Range{
- Range{0x00ab, 0x2018, 8045},
- Range{0x201b, 0x201c, 1},
- Range{0x201f, 0x2039, 26},
- Range{0x2e02, 0x2e04, 2},
- Range{0x2e09, 0x2e0c, 3},
- Range{0x2e1c, 0x2e20, 4},
+ {0x00ab, 0x2018, 8045},
+ {0x201b, 0x201c, 1},
+ {0x201f, 0x2039, 26},
+ {0x2e02, 0x2e04, 2},
+ {0x2e09, 0x2e0c, 3},
+ {0x2e1c, 0x2e20, 4},
}
var _Pf = []Range{
- Range{0x00bb, 0x2019, 8030},
- Range{0x201d, 0x203a, 29},
- Range{0x2e03, 0x2e05, 2},
- Range{0x2e0a, 0x2e0d, 3},
- Range{0x2e1d, 0x2e21, 4},
+ {0x00bb, 0x2019, 8030},
+ {0x201d, 0x203a, 29},
+ {0x2e03, 0x2e05, 2},
+ {0x2e0a, 0x2e0d, 3},
+ {0x2e1d, 0x2e21, 4},
}
var _Pe = []Range{
- Range{0x0029, 0x005d, 52},
- Range{0x007d, 0x0f3b, 3774},
- Range{0x0f3d, 0x169c, 1887},
- Range{0x2046, 0x207e, 56},
- Range{0x208e, 0x232a, 668},
- Range{0x2769, 0x2775, 2},
- Range{0x27c6, 0x27e7, 33},
- Range{0x27e9, 0x27ef, 2},
- Range{0x2984, 0x2998, 2},
- Range{0x29d9, 0x29db, 2},
- Range{0x29fd, 0x2e23, 1062},
- Range{0x2e25, 0x2e29, 2},
- Range{0x3009, 0x3011, 2},
- Range{0x3015, 0x301b, 2},
- Range{0x301e, 0x301f, 1},
- Range{0xfd3f, 0xfe18, 217},
- Range{0xfe36, 0xfe44, 2},
- Range{0xfe48, 0xfe5a, 18},
- Range{0xfe5c, 0xfe5e, 2},
- Range{0xff09, 0xff3d, 52},
- Range{0xff5d, 0xff63, 3},
+ {0x0029, 0x005d, 52},
+ {0x007d, 0x0f3b, 3774},
+ {0x0f3d, 0x169c, 1887},
+ {0x2046, 0x207e, 56},
+ {0x208e, 0x232a, 668},
+ {0x2769, 0x2775, 2},
+ {0x27c6, 0x27e7, 33},
+ {0x27e9, 0x27ef, 2},
+ {0x2984, 0x2998, 2},
+ {0x29d9, 0x29db, 2},
+ {0x29fd, 0x2e23, 1062},
+ {0x2e25, 0x2e29, 2},
+ {0x3009, 0x3011, 2},
+ {0x3015, 0x301b, 2},
+ {0x301e, 0x301f, 1},
+ {0xfd3f, 0xfe18, 217},
+ {0xfe36, 0xfe44, 2},
+ {0xfe48, 0xfe5a, 18},
+ {0xfe5c, 0xfe5e, 2},
+ {0xff09, 0xff3d, 52},
+ {0xff5d, 0xff63, 3},
}
var _Pd = []Range{
- Range{0x002d, 0x058a, 1373},
- Range{0x05be, 0x1400, 3650},
- Range{0x1806, 0x2010, 2058},
- Range{0x2011, 0x2015, 1},
- Range{0x2e17, 0x2e1a, 3},
- Range{0x301c, 0x3030, 20},
- Range{0x30a0, 0xfe31, 52625},
- Range{0xfe32, 0xfe58, 38},
- Range{0xfe63, 0xff0d, 170},
+ {0x002d, 0x058a, 1373},
+ {0x05be, 0x1400, 3650},
+ {0x1806, 0x2010, 2058},
+ {0x2011, 0x2015, 1},
+ {0x2e17, 0x2e1a, 3},
+ {0x301c, 0x3030, 20},
+ {0x30a0, 0xfe31, 52625},
+ {0xfe32, 0xfe58, 38},
+ {0xfe63, 0xff0d, 170},
}
var _Pc = []Range{
- Range{0x005f, 0x203f, 8160},
- Range{0x2040, 0x2054, 20},
- Range{0xfe33, 0xfe34, 1},
- Range{0xfe4d, 0xfe4f, 1},
- Range{0xff3f, 0xff3f, 1},
+ {0x005f, 0x203f, 8160},
+ {0x2040, 0x2054, 20},
+ {0xfe33, 0xfe34, 1},
+ {0xfe4d, 0xfe4f, 1},
+ {0xff3f, 0xff3f, 1},
}
var _Ps = []Range{
- Range{0x0028, 0x005b, 51},
- Range{0x007b, 0x0f3a, 3775},
- Range{0x0f3c, 0x169b, 1887},
- Range{0x201a, 0x201e, 4},
- Range{0x2045, 0x207d, 56},
- Range{0x208d, 0x2329, 668},
- Range{0x2768, 0x2774, 2},
- Range{0x27c5, 0x27e6, 33},
- Range{0x27e8, 0x27ee, 2},
- Range{0x2983, 0x2997, 2},
- Range{0x29d8, 0x29da, 2},
- Range{0x29fc, 0x2e22, 1062},
- Range{0x2e24, 0x2e28, 2},
- Range{0x3008, 0x3010, 2},
- Range{0x3014, 0x301a, 2},
- Range{0x301d, 0xfd3e, 52513},
- Range{0xfe17, 0xfe35, 30},
- Range{0xfe37, 0xfe43, 2},
- Range{0xfe47, 0xfe59, 18},
- Range{0xfe5b, 0xfe5d, 2},
- Range{0xff08, 0xff3b, 51},
- Range{0xff5b, 0xff5f, 4},
- Range{0xff62, 0xff62, 1},
+ {0x0028, 0x005b, 51},
+ {0x007b, 0x0f3a, 3775},
+ {0x0f3c, 0x169b, 1887},
+ {0x201a, 0x201e, 4},
+ {0x2045, 0x207d, 56},
+ {0x208d, 0x2329, 668},
+ {0x2768, 0x2774, 2},
+ {0x27c5, 0x27e6, 33},
+ {0x27e8, 0x27ee, 2},
+ {0x2983, 0x2997, 2},
+ {0x29d8, 0x29da, 2},
+ {0x29fc, 0x2e22, 1062},
+ {0x2e24, 0x2e28, 2},
+ {0x3008, 0x3010, 2},
+ {0x3014, 0x301a, 2},
+ {0x301d, 0xfd3e, 52513},
+ {0xfe17, 0xfe35, 30},
+ {0xfe37, 0xfe43, 2},
+ {0xfe47, 0xfe59, 18},
+ {0xfe5b, 0xfe5d, 2},
+ {0xff08, 0xff3b, 51},
+ {0xff5b, 0xff5f, 4},
+ {0xff62, 0xff62, 1},
}
var _Nd = []Range{
- Range{0x0030, 0x0039, 1},
- Range{0x0660, 0x0669, 1},
- Range{0x06f0, 0x06f9, 1},
- Range{0x07c0, 0x07c9, 1},
- Range{0x0966, 0x096f, 1},
- Range{0x09e6, 0x09ef, 1},
- Range{0x0a66, 0x0a6f, 1},
- Range{0x0ae6, 0x0aef, 1},
- Range{0x0b66, 0x0b6f, 1},
- Range{0x0be6, 0x0bef, 1},
- Range{0x0c66, 0x0c6f, 1},
- Range{0x0ce6, 0x0cef, 1},
- Range{0x0d66, 0x0d6f, 1},
- Range{0x0e50, 0x0e59, 1},
- Range{0x0ed0, 0x0ed9, 1},
- Range{0x0f20, 0x0f29, 1},
- Range{0x1040, 0x1049, 1},
- Range{0x1090, 0x1099, 1},
- Range{0x17e0, 0x17e9, 1},
- Range{0x1810, 0x1819, 1},
- Range{0x1946, 0x194f, 1},
- Range{0x19d0, 0x19da, 1},
- Range{0x1a80, 0x1a89, 1},
- Range{0x1a90, 0x1a99, 1},
- Range{0x1b50, 0x1b59, 1},
- Range{0x1bb0, 0x1bb9, 1},
- Range{0x1c40, 0x1c49, 1},
- Range{0x1c50, 0x1c59, 1},
- Range{0xa620, 0xa629, 1},
- Range{0xa8d0, 0xa8d9, 1},
- Range{0xa900, 0xa909, 1},
- Range{0xa9d0, 0xa9d9, 1},
- Range{0xaa50, 0xaa59, 1},
- Range{0xabf0, 0xabf9, 1},
- Range{0xff10, 0xff19, 1},
- Range{0x104a0, 0x104a9, 1},
- Range{0x1d7ce, 0x1d7ff, 1},
+ {0x0030, 0x0039, 1},
+ {0x0660, 0x0669, 1},
+ {0x06f0, 0x06f9, 1},
+ {0x07c0, 0x07c9, 1},
+ {0x0966, 0x096f, 1},
+ {0x09e6, 0x09ef, 1},
+ {0x0a66, 0x0a6f, 1},
+ {0x0ae6, 0x0aef, 1},
+ {0x0b66, 0x0b6f, 1},
+ {0x0be6, 0x0bef, 1},
+ {0x0c66, 0x0c6f, 1},
+ {0x0ce6, 0x0cef, 1},
+ {0x0d66, 0x0d6f, 1},
+ {0x0e50, 0x0e59, 1},
+ {0x0ed0, 0x0ed9, 1},
+ {0x0f20, 0x0f29, 1},
+ {0x1040, 0x1049, 1},
+ {0x1090, 0x1099, 1},
+ {0x17e0, 0x17e9, 1},
+ {0x1810, 0x1819, 1},
+ {0x1946, 0x194f, 1},
+ {0x19d0, 0x19da, 1},
+ {0x1a80, 0x1a89, 1},
+ {0x1a90, 0x1a99, 1},
+ {0x1b50, 0x1b59, 1},
+ {0x1bb0, 0x1bb9, 1},
+ {0x1c40, 0x1c49, 1},
+ {0x1c50, 0x1c59, 1},
+ {0xa620, 0xa629, 1},
+ {0xa8d0, 0xa8d9, 1},
+ {0xa900, 0xa909, 1},
+ {0xa9d0, 0xa9d9, 1},
+ {0xaa50, 0xaa59, 1},
+ {0xabf0, 0xabf9, 1},
+ {0xff10, 0xff19, 1},
+ {0x104a0, 0x104a9, 1},
+ {0x1d7ce, 0x1d7ff, 1},
}
var _Nl = []Range{
- Range{0x16ee, 0x16f0, 1},
- Range{0x2160, 0x2182, 1},
- Range{0x2185, 0x2188, 1},
- Range{0x3007, 0x3021, 26},
- Range{0x3022, 0x3029, 1},
- Range{0x3038, 0x303a, 1},
- Range{0xa6e6, 0xa6ef, 1},
- Range{0x10140, 0x10174, 1},
- Range{0x10341, 0x1034a, 9},
- Range{0x103d1, 0x103d5, 1},
- Range{0x12400, 0x12462, 1},
+ {0x16ee, 0x16f0, 1},
+ {0x2160, 0x2182, 1},
+ {0x2185, 0x2188, 1},
+ {0x3007, 0x3021, 26},
+ {0x3022, 0x3029, 1},
+ {0x3038, 0x303a, 1},
+ {0xa6e6, 0xa6ef, 1},
+ {0x10140, 0x10174, 1},
+ {0x10341, 0x1034a, 9},
+ {0x103d1, 0x103d5, 1},
+ {0x12400, 0x12462, 1},
}
var _No = []Range{
- Range{0x00b2, 0x00b3, 1},
- Range{0x00b9, 0x00bc, 3},
- Range{0x00bd, 0x00be, 1},
- Range{0x09f4, 0x09f9, 1},
- Range{0x0bf0, 0x0bf2, 1},
- Range{0x0c78, 0x0c7e, 1},
- Range{0x0d70, 0x0d75, 1},
- Range{0x0f2a, 0x0f33, 1},
- Range{0x1369, 0x137c, 1},
- Range{0x17f0, 0x17f9, 1},
- Range{0x2070, 0x2074, 4},
- Range{0x2075, 0x2079, 1},
- Range{0x2080, 0x2089, 1},
- Range{0x2150, 0x215f, 1},
- Range{0x2189, 0x2460, 727},
- Range{0x2461, 0x249b, 1},
- Range{0x24ea, 0x24ff, 1},
- Range{0x2776, 0x2793, 1},
- Range{0x2cfd, 0x3192, 1173},
- Range{0x3193, 0x3195, 1},
- Range{0x3220, 0x3229, 1},
- Range{0x3251, 0x325f, 1},
- Range{0x3280, 0x3289, 1},
- Range{0x32b1, 0x32bf, 1},
- Range{0xa830, 0xa835, 1},
- Range{0x10107, 0x10133, 1},
- Range{0x10175, 0x10178, 1},
- Range{0x1018a, 0x10320, 406},
- Range{0x10321, 0x10323, 1},
- Range{0x10858, 0x1085f, 1},
- Range{0x10916, 0x1091b, 1},
- Range{0x10a40, 0x10a47, 1},
- Range{0x10a7d, 0x10a7e, 1},
- Range{0x10b58, 0x10b5f, 1},
- Range{0x10b78, 0x10b7f, 1},
- Range{0x10e60, 0x10e7e, 1},
- Range{0x1d360, 0x1d371, 1},
- Range{0x1f100, 0x1f10a, 1},
+ {0x00b2, 0x00b3, 1},
+ {0x00b9, 0x00bc, 3},
+ {0x00bd, 0x00be, 1},
+ {0x09f4, 0x09f9, 1},
+ {0x0bf0, 0x0bf2, 1},
+ {0x0c78, 0x0c7e, 1},
+ {0x0d70, 0x0d75, 1},
+ {0x0f2a, 0x0f33, 1},
+ {0x1369, 0x137c, 1},
+ {0x17f0, 0x17f9, 1},
+ {0x2070, 0x2074, 4},
+ {0x2075, 0x2079, 1},
+ {0x2080, 0x2089, 1},
+ {0x2150, 0x215f, 1},
+ {0x2189, 0x2460, 727},
+ {0x2461, 0x249b, 1},
+ {0x24ea, 0x24ff, 1},
+ {0x2776, 0x2793, 1},
+ {0x2cfd, 0x3192, 1173},
+ {0x3193, 0x3195, 1},
+ {0x3220, 0x3229, 1},
+ {0x3251, 0x325f, 1},
+ {0x3280, 0x3289, 1},
+ {0x32b1, 0x32bf, 1},
+ {0xa830, 0xa835, 1},
+ {0x10107, 0x10133, 1},
+ {0x10175, 0x10178, 1},
+ {0x1018a, 0x10320, 406},
+ {0x10321, 0x10323, 1},
+ {0x10858, 0x1085f, 1},
+ {0x10916, 0x1091b, 1},
+ {0x10a40, 0x10a47, 1},
+ {0x10a7d, 0x10a7e, 1},
+ {0x10b58, 0x10b5f, 1},
+ {0x10b78, 0x10b7f, 1},
+ {0x10e60, 0x10e7e, 1},
+ {0x1d360, 0x1d371, 1},
+ {0x1f100, 0x1f10a, 1},
}
var _So = []Range{
- Range{0x00a6, 0x00a7, 1},
- Range{0x00a9, 0x00ae, 5},
- Range{0x00b0, 0x00b6, 6},
- Range{0x0482, 0x060e, 396},
- Range{0x060f, 0x06e9, 218},
- Range{0x06fd, 0x06fe, 1},
- Range{0x07f6, 0x09fa, 516},
- Range{0x0b70, 0x0bf3, 131},
- Range{0x0bf4, 0x0bf8, 1},
- Range{0x0bfa, 0x0c7f, 133},
- Range{0x0cf1, 0x0cf2, 1},
- Range{0x0d79, 0x0f01, 392},
- Range{0x0f02, 0x0f03, 1},
- Range{0x0f13, 0x0f17, 1},
- Range{0x0f1a, 0x0f1f, 1},
- Range{0x0f34, 0x0f38, 2},
- Range{0x0fbe, 0x0fc5, 1},
- Range{0x0fc7, 0x0fcc, 1},
- Range{0x0fce, 0x0fcf, 1},
- Range{0x0fd5, 0x0fd8, 1},
- Range{0x109e, 0x109f, 1},
- Range{0x1360, 0x1390, 48},
- Range{0x1391, 0x1399, 1},
- Range{0x1940, 0x19e0, 160},
- Range{0x19e1, 0x19ff, 1},
- Range{0x1b61, 0x1b6a, 1},
- Range{0x1b74, 0x1b7c, 1},
- Range{0x2100, 0x2101, 1},
- Range{0x2103, 0x2106, 1},
- Range{0x2108, 0x2109, 1},
- Range{0x2114, 0x2116, 2},
- Range{0x2117, 0x2118, 1},
- Range{0x211e, 0x2123, 1},
- Range{0x2125, 0x2129, 2},
- Range{0x212e, 0x213a, 12},
- Range{0x213b, 0x214a, 15},
- Range{0x214c, 0x214d, 1},
- Range{0x214f, 0x2195, 70},
- Range{0x2196, 0x2199, 1},
- Range{0x219c, 0x219f, 1},
- Range{0x21a1, 0x21a2, 1},
- Range{0x21a4, 0x21a5, 1},
- Range{0x21a7, 0x21ad, 1},
- Range{0x21af, 0x21cd, 1},
- Range{0x21d0, 0x21d1, 1},
- Range{0x21d3, 0x21d5, 2},
- Range{0x21d6, 0x21f3, 1},
- Range{0x2300, 0x2307, 1},
- Range{0x230c, 0x231f, 1},
- Range{0x2322, 0x2328, 1},
- Range{0x232b, 0x237b, 1},
- Range{0x237d, 0x239a, 1},
- Range{0x23b4, 0x23db, 1},
- Range{0x23e2, 0x23e8, 1},
- Range{0x2400, 0x2426, 1},
- Range{0x2440, 0x244a, 1},
- Range{0x249c, 0x24e9, 1},
- Range{0x2500, 0x25b6, 1},
- Range{0x25b8, 0x25c0, 1},
- Range{0x25c2, 0x25f7, 1},
- Range{0x2600, 0x266e, 1},
- Range{0x2670, 0x26cd, 1},
- Range{0x26cf, 0x26e1, 1},
- Range{0x26e3, 0x26e8, 5},
- Range{0x26e9, 0x26ff, 1},
- Range{0x2701, 0x2704, 1},
- Range{0x2706, 0x2709, 1},
- Range{0x270c, 0x2727, 1},
- Range{0x2729, 0x274b, 1},
- Range{0x274d, 0x274f, 2},
- Range{0x2750, 0x2752, 1},
- Range{0x2756, 0x275e, 1},
- Range{0x2761, 0x2767, 1},
- Range{0x2794, 0x2798, 4},
- Range{0x2799, 0x27af, 1},
- Range{0x27b1, 0x27be, 1},
- Range{0x2800, 0x28ff, 1},
- Range{0x2b00, 0x2b2f, 1},
- Range{0x2b45, 0x2b46, 1},
- Range{0x2b50, 0x2b59, 1},
- Range{0x2ce5, 0x2cea, 1},
- Range{0x2e80, 0x2e99, 1},
- Range{0x2e9b, 0x2ef3, 1},
- Range{0x2f00, 0x2fd5, 1},
- Range{0x2ff0, 0x2ffb, 1},
- Range{0x3004, 0x3012, 14},
- Range{0x3013, 0x3020, 13},
- Range{0x3036, 0x3037, 1},
- Range{0x303e, 0x303f, 1},
- Range{0x3190, 0x3191, 1},
- Range{0x3196, 0x319f, 1},
- Range{0x31c0, 0x31e3, 1},
- Range{0x3200, 0x321e, 1},
- Range{0x322a, 0x3250, 1},
- Range{0x3260, 0x327f, 1},
- Range{0x328a, 0x32b0, 1},
- Range{0x32c0, 0x32fe, 1},
- Range{0x3300, 0x33ff, 1},
- Range{0x4dc0, 0x4dff, 1},
- Range{0xa490, 0xa4c6, 1},
- Range{0xa828, 0xa82b, 1},
- Range{0xa836, 0xa837, 1},
- Range{0xa839, 0xaa77, 574},
- Range{0xaa78, 0xaa79, 1},
- Range{0xfdfd, 0xffe4, 487},
- Range{0xffe8, 0xffed, 5},
- Range{0xffee, 0xfffc, 14},
- Range{0xfffd, 0x10102, 261},
- Range{0x10137, 0x1013f, 1},
- Range{0x10179, 0x10189, 1},
- Range{0x10190, 0x1019b, 1},
- Range{0x101d0, 0x101fc, 1},
- Range{0x1d000, 0x1d0f5, 1},
- Range{0x1d100, 0x1d126, 1},
- Range{0x1d129, 0x1d164, 1},
- Range{0x1d16a, 0x1d16c, 1},
- Range{0x1d183, 0x1d184, 1},
- Range{0x1d18c, 0x1d1a9, 1},
- Range{0x1d1ae, 0x1d1dd, 1},
- Range{0x1d200, 0x1d241, 1},
- Range{0x1d245, 0x1d300, 187},
- Range{0x1d301, 0x1d356, 1},
- Range{0x1f000, 0x1f02b, 1},
- Range{0x1f030, 0x1f093, 1},
- Range{0x1f110, 0x1f12e, 1},
- Range{0x1f131, 0x1f13d, 12},
- Range{0x1f13f, 0x1f142, 3},
- Range{0x1f146, 0x1f14a, 4},
- Range{0x1f14b, 0x1f14e, 1},
- Range{0x1f157, 0x1f15f, 8},
- Range{0x1f179, 0x1f17b, 2},
- Range{0x1f17c, 0x1f17f, 3},
- Range{0x1f18a, 0x1f18d, 1},
- Range{0x1f190, 0x1f200, 112},
- Range{0x1f210, 0x1f231, 1},
- Range{0x1f240, 0x1f248, 1},
+ {0x00a6, 0x00a7, 1},
+ {0x00a9, 0x00ae, 5},
+ {0x00b0, 0x00b6, 6},
+ {0x0482, 0x060e, 396},
+ {0x060f, 0x06e9, 218},
+ {0x06fd, 0x06fe, 1},
+ {0x07f6, 0x09fa, 516},
+ {0x0b70, 0x0bf3, 131},
+ {0x0bf4, 0x0bf8, 1},
+ {0x0bfa, 0x0c7f, 133},
+ {0x0cf1, 0x0cf2, 1},
+ {0x0d79, 0x0f01, 392},
+ {0x0f02, 0x0f03, 1},
+ {0x0f13, 0x0f17, 1},
+ {0x0f1a, 0x0f1f, 1},
+ {0x0f34, 0x0f38, 2},
+ {0x0fbe, 0x0fc5, 1},
+ {0x0fc7, 0x0fcc, 1},
+ {0x0fce, 0x0fcf, 1},
+ {0x0fd5, 0x0fd8, 1},
+ {0x109e, 0x109f, 1},
+ {0x1360, 0x1390, 48},
+ {0x1391, 0x1399, 1},
+ {0x1940, 0x19e0, 160},
+ {0x19e1, 0x19ff, 1},
+ {0x1b61, 0x1b6a, 1},
+ {0x1b74, 0x1b7c, 1},
+ {0x2100, 0x2101, 1},
+ {0x2103, 0x2106, 1},
+ {0x2108, 0x2109, 1},
+ {0x2114, 0x2116, 2},
+ {0x2117, 0x2118, 1},
+ {0x211e, 0x2123, 1},
+ {0x2125, 0x2129, 2},
+ {0x212e, 0x213a, 12},
+ {0x213b, 0x214a, 15},
+ {0x214c, 0x214d, 1},
+ {0x214f, 0x2195, 70},
+ {0x2196, 0x2199, 1},
+ {0x219c, 0x219f, 1},
+ {0x21a1, 0x21a2, 1},
+ {0x21a4, 0x21a5, 1},
+ {0x21a7, 0x21ad, 1},
+ {0x21af, 0x21cd, 1},
+ {0x21d0, 0x21d1, 1},
+ {0x21d3, 0x21d5, 2},
+ {0x21d6, 0x21f3, 1},
+ {0x2300, 0x2307, 1},
+ {0x230c, 0x231f, 1},
+ {0x2322, 0x2328, 1},
+ {0x232b, 0x237b, 1},
+ {0x237d, 0x239a, 1},
+ {0x23b4, 0x23db, 1},
+ {0x23e2, 0x23e8, 1},
+ {0x2400, 0x2426, 1},
+ {0x2440, 0x244a, 1},
+ {0x249c, 0x24e9, 1},
+ {0x2500, 0x25b6, 1},
+ {0x25b8, 0x25c0, 1},
+ {0x25c2, 0x25f7, 1},
+ {0x2600, 0x266e, 1},
+ {0x2670, 0x26cd, 1},
+ {0x26cf, 0x26e1, 1},
+ {0x26e3, 0x26e8, 5},
+ {0x26e9, 0x26ff, 1},
+ {0x2701, 0x2704, 1},
+ {0x2706, 0x2709, 1},
+ {0x270c, 0x2727, 1},
+ {0x2729, 0x274b, 1},
+ {0x274d, 0x274f, 2},
+ {0x2750, 0x2752, 1},
+ {0x2756, 0x275e, 1},
+ {0x2761, 0x2767, 1},
+ {0x2794, 0x2798, 4},
+ {0x2799, 0x27af, 1},
+ {0x27b1, 0x27be, 1},
+ {0x2800, 0x28ff, 1},
+ {0x2b00, 0x2b2f, 1},
+ {0x2b45, 0x2b46, 1},
+ {0x2b50, 0x2b59, 1},
+ {0x2ce5, 0x2cea, 1},
+ {0x2e80, 0x2e99, 1},
+ {0x2e9b, 0x2ef3, 1},
+ {0x2f00, 0x2fd5, 1},
+ {0x2ff0, 0x2ffb, 1},
+ {0x3004, 0x3012, 14},
+ {0x3013, 0x3020, 13},
+ {0x3036, 0x3037, 1},
+ {0x303e, 0x303f, 1},
+ {0x3190, 0x3191, 1},
+ {0x3196, 0x319f, 1},
+ {0x31c0, 0x31e3, 1},
+ {0x3200, 0x321e, 1},
+ {0x322a, 0x3250, 1},
+ {0x3260, 0x327f, 1},
+ {0x328a, 0x32b0, 1},
+ {0x32c0, 0x32fe, 1},
+ {0x3300, 0x33ff, 1},
+ {0x4dc0, 0x4dff, 1},
+ {0xa490, 0xa4c6, 1},
+ {0xa828, 0xa82b, 1},
+ {0xa836, 0xa837, 1},
+ {0xa839, 0xaa77, 574},
+ {0xaa78, 0xaa79, 1},
+ {0xfdfd, 0xffe4, 487},
+ {0xffe8, 0xffed, 5},
+ {0xffee, 0xfffc, 14},
+ {0xfffd, 0x10102, 261},
+ {0x10137, 0x1013f, 1},
+ {0x10179, 0x10189, 1},
+ {0x10190, 0x1019b, 1},
+ {0x101d0, 0x101fc, 1},
+ {0x1d000, 0x1d0f5, 1},
+ {0x1d100, 0x1d126, 1},
+ {0x1d129, 0x1d164, 1},
+ {0x1d16a, 0x1d16c, 1},
+ {0x1d183, 0x1d184, 1},
+ {0x1d18c, 0x1d1a9, 1},
+ {0x1d1ae, 0x1d1dd, 1},
+ {0x1d200, 0x1d241, 1},
+ {0x1d245, 0x1d300, 187},
+ {0x1d301, 0x1d356, 1},
+ {0x1f000, 0x1f02b, 1},
+ {0x1f030, 0x1f093, 1},
+ {0x1f110, 0x1f12e, 1},
+ {0x1f131, 0x1f13d, 12},
+ {0x1f13f, 0x1f142, 3},
+ {0x1f146, 0x1f14a, 4},
+ {0x1f14b, 0x1f14e, 1},
+ {0x1f157, 0x1f15f, 8},
+ {0x1f179, 0x1f17b, 2},
+ {0x1f17c, 0x1f17f, 3},
+ {0x1f18a, 0x1f18d, 1},
+ {0x1f190, 0x1f200, 112},
+ {0x1f210, 0x1f231, 1},
+ {0x1f240, 0x1f248, 1},
}
var _Sm = []Range{
- Range{0x002b, 0x003c, 17},
- Range{0x003d, 0x003e, 1},
- Range{0x007c, 0x007e, 2},
- Range{0x00ac, 0x00b1, 5},
- Range{0x00d7, 0x00f7, 32},
- Range{0x03f6, 0x0606, 528},
- Range{0x0607, 0x0608, 1},
- Range{0x2044, 0x2052, 14},
- Range{0x207a, 0x207c, 1},
- Range{0x208a, 0x208c, 1},
- Range{0x2140, 0x2144, 1},
- Range{0x214b, 0x2190, 69},
- Range{0x2191, 0x2194, 1},
- Range{0x219a, 0x219b, 1},
- Range{0x21a0, 0x21a6, 3},
- Range{0x21ae, 0x21ce, 32},
- Range{0x21cf, 0x21d2, 3},
- Range{0x21d4, 0x21f4, 32},
- Range{0x21f5, 0x22ff, 1},
- Range{0x2308, 0x230b, 1},
- Range{0x2320, 0x2321, 1},
- Range{0x237c, 0x239b, 31},
- Range{0x239c, 0x23b3, 1},
- Range{0x23dc, 0x23e1, 1},
- Range{0x25b7, 0x25c1, 10},
- Range{0x25f8, 0x25ff, 1},
- Range{0x266f, 0x27c0, 337},
- Range{0x27c1, 0x27c4, 1},
- Range{0x27c7, 0x27ca, 1},
- Range{0x27cc, 0x27d0, 4},
- Range{0x27d1, 0x27e5, 1},
- Range{0x27f0, 0x27ff, 1},
- Range{0x2900, 0x2982, 1},
- Range{0x2999, 0x29d7, 1},
- Range{0x29dc, 0x29fb, 1},
- Range{0x29fe, 0x2aff, 1},
- Range{0x2b30, 0x2b44, 1},
- Range{0x2b47, 0x2b4c, 1},
- Range{0xfb29, 0xfe62, 825},
- Range{0xfe64, 0xfe66, 1},
- Range{0xff0b, 0xff1c, 17},
- Range{0xff1d, 0xff1e, 1},
- Range{0xff5c, 0xff5e, 2},
- Range{0xffe2, 0xffe9, 7},
- Range{0xffea, 0xffec, 1},
- Range{0x1d6c1, 0x1d6db, 26},
- Range{0x1d6fb, 0x1d715, 26},
- Range{0x1d735, 0x1d74f, 26},
- Range{0x1d76f, 0x1d789, 26},
- Range{0x1d7a9, 0x1d7c3, 26},
+ {0x002b, 0x003c, 17},
+ {0x003d, 0x003e, 1},
+ {0x007c, 0x007e, 2},
+ {0x00ac, 0x00b1, 5},
+ {0x00d7, 0x00f7, 32},
+ {0x03f6, 0x0606, 528},
+ {0x0607, 0x0608, 1},
+ {0x2044, 0x2052, 14},
+ {0x207a, 0x207c, 1},
+ {0x208a, 0x208c, 1},
+ {0x2140, 0x2144, 1},
+ {0x214b, 0x2190, 69},
+ {0x2191, 0x2194, 1},
+ {0x219a, 0x219b, 1},
+ {0x21a0, 0x21a6, 3},
+ {0x21ae, 0x21ce, 32},
+ {0x21cf, 0x21d2, 3},
+ {0x21d4, 0x21f4, 32},
+ {0x21f5, 0x22ff, 1},
+ {0x2308, 0x230b, 1},
+ {0x2320, 0x2321, 1},
+ {0x237c, 0x239b, 31},
+ {0x239c, 0x23b3, 1},
+ {0x23dc, 0x23e1, 1},
+ {0x25b7, 0x25c1, 10},
+ {0x25f8, 0x25ff, 1},
+ {0x266f, 0x27c0, 337},
+ {0x27c1, 0x27c4, 1},
+ {0x27c7, 0x27ca, 1},
+ {0x27cc, 0x27d0, 4},
+ {0x27d1, 0x27e5, 1},
+ {0x27f0, 0x27ff, 1},
+ {0x2900, 0x2982, 1},
+ {0x2999, 0x29d7, 1},
+ {0x29dc, 0x29fb, 1},
+ {0x29fe, 0x2aff, 1},
+ {0x2b30, 0x2b44, 1},
+ {0x2b47, 0x2b4c, 1},
+ {0xfb29, 0xfe62, 825},
+ {0xfe64, 0xfe66, 1},
+ {0xff0b, 0xff1c, 17},
+ {0xff1d, 0xff1e, 1},
+ {0xff5c, 0xff5e, 2},
+ {0xffe2, 0xffe9, 7},
+ {0xffea, 0xffec, 1},
+ {0x1d6c1, 0x1d6db, 26},
+ {0x1d6fb, 0x1d715, 26},
+ {0x1d735, 0x1d74f, 26},
+ {0x1d76f, 0x1d789, 26},
+ {0x1d7a9, 0x1d7c3, 26},
}
var _Sk = []Range{
- Range{0x005e, 0x0060, 2},
- Range{0x00a8, 0x00af, 7},
- Range{0x00b4, 0x00b8, 4},
- Range{0x02c2, 0x02c5, 1},
- Range{0x02d2, 0x02df, 1},
- Range{0x02e5, 0x02eb, 1},
- Range{0x02ed, 0x02ef, 2},
- Range{0x02f0, 0x02ff, 1},
- Range{0x0375, 0x0384, 15},
- Range{0x0385, 0x1fbd, 7224},
- Range{0x1fbf, 0x1fc1, 1},
- Range{0x1fcd, 0x1fcf, 1},
- Range{0x1fdd, 0x1fdf, 1},
- Range{0x1fed, 0x1fef, 1},
- Range{0x1ffd, 0x1ffe, 1},
- Range{0x309b, 0x309c, 1},
- Range{0xa700, 0xa716, 1},
- Range{0xa720, 0xa721, 1},
- Range{0xa789, 0xa78a, 1},
- Range{0xff3e, 0xff40, 2},
- Range{0xffe3, 0xffe3, 1},
+ {0x005e, 0x0060, 2},
+ {0x00a8, 0x00af, 7},
+ {0x00b4, 0x00b8, 4},
+ {0x02c2, 0x02c5, 1},
+ {0x02d2, 0x02df, 1},
+ {0x02e5, 0x02eb, 1},
+ {0x02ed, 0x02ef, 2},
+ {0x02f0, 0x02ff, 1},
+ {0x0375, 0x0384, 15},
+ {0x0385, 0x1fbd, 7224},
+ {0x1fbf, 0x1fc1, 1},
+ {0x1fcd, 0x1fcf, 1},
+ {0x1fdd, 0x1fdf, 1},
+ {0x1fed, 0x1fef, 1},
+ {0x1ffd, 0x1ffe, 1},
+ {0x309b, 0x309c, 1},
+ {0xa700, 0xa716, 1},
+ {0xa720, 0xa721, 1},
+ {0xa789, 0xa78a, 1},
+ {0xff3e, 0xff40, 2},
+ {0xffe3, 0xffe3, 1},
}
var _Sc = []Range{
- Range{0x0024, 0x00a2, 126},
- Range{0x00a3, 0x00a5, 1},
- Range{0x060b, 0x09f2, 999},
- Range{0x09f3, 0x09fb, 8},
- Range{0x0af1, 0x0bf9, 264},
- Range{0x0e3f, 0x17db, 2460},
- Range{0x20a0, 0x20b8, 1},
- Range{0xa838, 0xfdfc, 21956},
- Range{0xfe69, 0xff04, 155},
- Range{0xffe0, 0xffe1, 1},
- Range{0xffe5, 0xffe6, 1},
+ {0x0024, 0x00a2, 126},
+ {0x00a3, 0x00a5, 1},
+ {0x060b, 0x09f2, 999},
+ {0x09f3, 0x09fb, 8},
+ {0x0af1, 0x0bf9, 264},
+ {0x0e3f, 0x17db, 2460},
+ {0x20a0, 0x20b8, 1},
+ {0xa838, 0xfdfc, 21956},
+ {0xfe69, 0xff04, 155},
+ {0xffe0, 0xffe1, 1},
+ {0xffe5, 0xffe6, 1},
}
var _Lu = []Range{
- Range{0x0041, 0x005a, 1},
- Range{0x00c0, 0x00d6, 1},
- Range{0x00d8, 0x00de, 1},
- Range{0x0100, 0x0136, 2},
- Range{0x0139, 0x0147, 2},
- Range{0x014a, 0x0178, 2},
- Range{0x0179, 0x017d, 2},
- Range{0x0181, 0x0182, 1},
- Range{0x0184, 0x0186, 2},
- Range{0x0187, 0x0189, 2},
- Range{0x018a, 0x018b, 1},
- Range{0x018e, 0x0191, 1},
- Range{0x0193, 0x0194, 1},
- Range{0x0196, 0x0198, 1},
- Range{0x019c, 0x019d, 1},
- Range{0x019f, 0x01a0, 1},
- Range{0x01a2, 0x01a6, 2},
- Range{0x01a7, 0x01a9, 2},
- Range{0x01ac, 0x01ae, 2},
- Range{0x01af, 0x01b1, 2},
- Range{0x01b2, 0x01b3, 1},
- Range{0x01b5, 0x01b7, 2},
- Range{0x01b8, 0x01bc, 4},
- Range{0x01c4, 0x01cd, 3},
- Range{0x01cf, 0x01db, 2},
- Range{0x01de, 0x01ee, 2},
- Range{0x01f1, 0x01f4, 3},
- Range{0x01f6, 0x01f8, 1},
- Range{0x01fa, 0x0232, 2},
- Range{0x023a, 0x023b, 1},
- Range{0x023d, 0x023e, 1},
- Range{0x0241, 0x0243, 2},
- Range{0x0244, 0x0246, 1},
- Range{0x0248, 0x024e, 2},
- Range{0x0370, 0x0372, 2},
- Range{0x0376, 0x0386, 16},
- Range{0x0388, 0x038a, 1},
- Range{0x038c, 0x038e, 2},
- Range{0x038f, 0x0391, 2},
- Range{0x0392, 0x03a1, 1},
- Range{0x03a3, 0x03ab, 1},
- Range{0x03cf, 0x03d2, 3},
- Range{0x03d3, 0x03d4, 1},
- Range{0x03d8, 0x03ee, 2},
- Range{0x03f4, 0x03f7, 3},
- Range{0x03f9, 0x03fa, 1},
- Range{0x03fd, 0x042f, 1},
- Range{0x0460, 0x0480, 2},
- Range{0x048a, 0x04c0, 2},
- Range{0x04c1, 0x04cd, 2},
- Range{0x04d0, 0x0524, 2},
- Range{0x0531, 0x0556, 1},
- Range{0x10a0, 0x10c5, 1},
- Range{0x1e00, 0x1e94, 2},
- Range{0x1e9e, 0x1efe, 2},
- Range{0x1f08, 0x1f0f, 1},
- Range{0x1f18, 0x1f1d, 1},
- Range{0x1f28, 0x1f2f, 1},
- Range{0x1f38, 0x1f3f, 1},
- Range{0x1f48, 0x1f4d, 1},
- Range{0x1f59, 0x1f5f, 2},
- Range{0x1f68, 0x1f6f, 1},
- Range{0x1fb8, 0x1fbb, 1},
- Range{0x1fc8, 0x1fcb, 1},
- Range{0x1fd8, 0x1fdb, 1},
- Range{0x1fe8, 0x1fec, 1},
- Range{0x1ff8, 0x1ffb, 1},
- Range{0x2102, 0x2107, 5},
- Range{0x210b, 0x210d, 1},
- Range{0x2110, 0x2112, 1},
- Range{0x2115, 0x2119, 4},
- Range{0x211a, 0x211d, 1},
- Range{0x2124, 0x212a, 2},
- Range{0x212b, 0x212d, 1},
- Range{0x2130, 0x2133, 1},
- Range{0x213e, 0x213f, 1},
- Range{0x2145, 0x2183, 62},
- Range{0x2c00, 0x2c2e, 1},
- Range{0x2c60, 0x2c62, 2},
- Range{0x2c63, 0x2c64, 1},
- Range{0x2c67, 0x2c6d, 2},
- Range{0x2c6e, 0x2c70, 1},
- Range{0x2c72, 0x2c75, 3},
- Range{0x2c7e, 0x2c80, 1},
- Range{0x2c82, 0x2ce2, 2},
- Range{0x2ceb, 0x2ced, 2},
- Range{0xa640, 0xa65e, 2},
- Range{0xa662, 0xa66c, 2},
- Range{0xa680, 0xa696, 2},
- Range{0xa722, 0xa72e, 2},
- Range{0xa732, 0xa76e, 2},
- Range{0xa779, 0xa77d, 2},
- Range{0xa77e, 0xa786, 2},
- Range{0xa78b, 0xff21, 22422},
- Range{0xff22, 0xff3a, 1},
- Range{0x10400, 0x10427, 1},
- Range{0x1d400, 0x1d419, 1},
- Range{0x1d434, 0x1d44d, 1},
- Range{0x1d468, 0x1d481, 1},
- Range{0x1d49c, 0x1d49e, 2},
- Range{0x1d49f, 0x1d4a5, 3},
- Range{0x1d4a6, 0x1d4a9, 3},
- Range{0x1d4aa, 0x1d4ac, 1},
- Range{0x1d4ae, 0x1d4b5, 1},
- Range{0x1d4d0, 0x1d4e9, 1},
- Range{0x1d504, 0x1d505, 1},
- Range{0x1d507, 0x1d50a, 1},
- Range{0x1d50d, 0x1d514, 1},
- Range{0x1d516, 0x1d51c, 1},
- Range{0x1d538, 0x1d539, 1},
- Range{0x1d53b, 0x1d53e, 1},
- Range{0x1d540, 0x1d544, 1},
- Range{0x1d546, 0x1d54a, 4},
- Range{0x1d54b, 0x1d550, 1},
- Range{0x1d56c, 0x1d585, 1},
- Range{0x1d5a0, 0x1d5b9, 1},
- Range{0x1d5d4, 0x1d5ed, 1},
- Range{0x1d608, 0x1d621, 1},
- Range{0x1d63c, 0x1d655, 1},
- Range{0x1d670, 0x1d689, 1},
- Range{0x1d6a8, 0x1d6c0, 1},
- Range{0x1d6e2, 0x1d6fa, 1},
- Range{0x1d71c, 0x1d734, 1},
- Range{0x1d756, 0x1d76e, 1},
- Range{0x1d790, 0x1d7a8, 1},
- Range{0x1d7ca, 0x1d7ca, 1},
+ {0x0041, 0x005a, 1},
+ {0x00c0, 0x00d6, 1},
+ {0x00d8, 0x00de, 1},
+ {0x0100, 0x0136, 2},
+ {0x0139, 0x0147, 2},
+ {0x014a, 0x0178, 2},
+ {0x0179, 0x017d, 2},
+ {0x0181, 0x0182, 1},
+ {0x0184, 0x0186, 2},
+ {0x0187, 0x0189, 2},
+ {0x018a, 0x018b, 1},
+ {0x018e, 0x0191, 1},
+ {0x0193, 0x0194, 1},
+ {0x0196, 0x0198, 1},
+ {0x019c, 0x019d, 1},
+ {0x019f, 0x01a0, 1},
+ {0x01a2, 0x01a6, 2},
+ {0x01a7, 0x01a9, 2},
+ {0x01ac, 0x01ae, 2},
+ {0x01af, 0x01b1, 2},
+ {0x01b2, 0x01b3, 1},
+ {0x01b5, 0x01b7, 2},
+ {0x01b8, 0x01bc, 4},
+ {0x01c4, 0x01cd, 3},
+ {0x01cf, 0x01db, 2},
+ {0x01de, 0x01ee, 2},
+ {0x01f1, 0x01f4, 3},
+ {0x01f6, 0x01f8, 1},
+ {0x01fa, 0x0232, 2},
+ {0x023a, 0x023b, 1},
+ {0x023d, 0x023e, 1},
+ {0x0241, 0x0243, 2},
+ {0x0244, 0x0246, 1},
+ {0x0248, 0x024e, 2},
+ {0x0370, 0x0372, 2},
+ {0x0376, 0x0386, 16},
+ {0x0388, 0x038a, 1},
+ {0x038c, 0x038e, 2},
+ {0x038f, 0x0391, 2},
+ {0x0392, 0x03a1, 1},
+ {0x03a3, 0x03ab, 1},
+ {0x03cf, 0x03d2, 3},
+ {0x03d3, 0x03d4, 1},
+ {0x03d8, 0x03ee, 2},
+ {0x03f4, 0x03f7, 3},
+ {0x03f9, 0x03fa, 1},
+ {0x03fd, 0x042f, 1},
+ {0x0460, 0x0480, 2},
+ {0x048a, 0x04c0, 2},
+ {0x04c1, 0x04cd, 2},
+ {0x04d0, 0x0524, 2},
+ {0x0531, 0x0556, 1},
+ {0x10a0, 0x10c5, 1},
+ {0x1e00, 0x1e94, 2},
+ {0x1e9e, 0x1efe, 2},
+ {0x1f08, 0x1f0f, 1},
+ {0x1f18, 0x1f1d, 1},
+ {0x1f28, 0x1f2f, 1},
+ {0x1f38, 0x1f3f, 1},
+ {0x1f48, 0x1f4d, 1},
+ {0x1f59, 0x1f5f, 2},
+ {0x1f68, 0x1f6f, 1},
+ {0x1fb8, 0x1fbb, 1},
+ {0x1fc8, 0x1fcb, 1},
+ {0x1fd8, 0x1fdb, 1},
+ {0x1fe8, 0x1fec, 1},
+ {0x1ff8, 0x1ffb, 1},
+ {0x2102, 0x2107, 5},
+ {0x210b, 0x210d, 1},
+ {0x2110, 0x2112, 1},
+ {0x2115, 0x2119, 4},
+ {0x211a, 0x211d, 1},
+ {0x2124, 0x212a, 2},
+ {0x212b, 0x212d, 1},
+ {0x2130, 0x2133, 1},
+ {0x213e, 0x213f, 1},
+ {0x2145, 0x2183, 62},
+ {0x2c00, 0x2c2e, 1},
+ {0x2c60, 0x2c62, 2},
+ {0x2c63, 0x2c64, 1},
+ {0x2c67, 0x2c6d, 2},
+ {0x2c6e, 0x2c70, 1},
+ {0x2c72, 0x2c75, 3},
+ {0x2c7e, 0x2c80, 1},
+ {0x2c82, 0x2ce2, 2},
+ {0x2ceb, 0x2ced, 2},
+ {0xa640, 0xa65e, 2},
+ {0xa662, 0xa66c, 2},
+ {0xa680, 0xa696, 2},
+ {0xa722, 0xa72e, 2},
+ {0xa732, 0xa76e, 2},
+ {0xa779, 0xa77d, 2},
+ {0xa77e, 0xa786, 2},
+ {0xa78b, 0xff21, 22422},
+ {0xff22, 0xff3a, 1},
+ {0x10400, 0x10427, 1},
+ {0x1d400, 0x1d419, 1},
+ {0x1d434, 0x1d44d, 1},
+ {0x1d468, 0x1d481, 1},
+ {0x1d49c, 0x1d49e, 2},
+ {0x1d49f, 0x1d4a5, 3},
+ {0x1d4a6, 0x1d4a9, 3},
+ {0x1d4aa, 0x1d4ac, 1},
+ {0x1d4ae, 0x1d4b5, 1},
+ {0x1d4d0, 0x1d4e9, 1},
+ {0x1d504, 0x1d505, 1},
+ {0x1d507, 0x1d50a, 1},
+ {0x1d50d, 0x1d514, 1},
+ {0x1d516, 0x1d51c, 1},
+ {0x1d538, 0x1d539, 1},
+ {0x1d53b, 0x1d53e, 1},
+ {0x1d540, 0x1d544, 1},
+ {0x1d546, 0x1d54a, 4},
+ {0x1d54b, 0x1d550, 1},
+ {0x1d56c, 0x1d585, 1},
+ {0x1d5a0, 0x1d5b9, 1},
+ {0x1d5d4, 0x1d5ed, 1},
+ {0x1d608, 0x1d621, 1},
+ {0x1d63c, 0x1d655, 1},
+ {0x1d670, 0x1d689, 1},
+ {0x1d6a8, 0x1d6c0, 1},
+ {0x1d6e2, 0x1d6fa, 1},
+ {0x1d71c, 0x1d734, 1},
+ {0x1d756, 0x1d76e, 1},
+ {0x1d790, 0x1d7a8, 1},
+ {0x1d7ca, 0x1d7ca, 1},
}
var _Lt = []Range{
- Range{0x01c5, 0x01cb, 3},
- Range{0x01f2, 0x1f88, 7574},
- Range{0x1f89, 0x1f8f, 1},
- Range{0x1f98, 0x1f9f, 1},
- Range{0x1fa8, 0x1faf, 1},
- Range{0x1fbc, 0x1fcc, 16},
- Range{0x1ffc, 0x1ffc, 1},
+ {0x01c5, 0x01cb, 3},
+ {0x01f2, 0x1f88, 7574},
+ {0x1f89, 0x1f8f, 1},
+ {0x1f98, 0x1f9f, 1},
+ {0x1fa8, 0x1faf, 1},
+ {0x1fbc, 0x1fcc, 16},
+ {0x1ffc, 0x1ffc, 1},
}
var _Lo = []Range{
- Range{0x01bb, 0x01c0, 5},
- Range{0x01c1, 0x01c3, 1},
- Range{0x0294, 0x05d0, 828},
- Range{0x05d1, 0x05ea, 1},
- Range{0x05f0, 0x05f2, 1},
- Range{0x0621, 0x063f, 1},
- Range{0x0641, 0x064a, 1},
- Range{0x066e, 0x066f, 1},
- Range{0x0671, 0x06d3, 1},
- Range{0x06d5, 0x06ee, 25},
- Range{0x06ef, 0x06fa, 11},
- Range{0x06fb, 0x06fc, 1},
- Range{0x06ff, 0x0710, 17},
- Range{0x0712, 0x072f, 1},
- Range{0x074d, 0x07a5, 1},
- Range{0x07b1, 0x07ca, 25},
- Range{0x07cb, 0x07ea, 1},
- Range{0x0800, 0x0815, 1},
- Range{0x0904, 0x0939, 1},
- Range{0x093d, 0x0950, 19},
- Range{0x0958, 0x0961, 1},
- Range{0x0972, 0x0979, 7},
- Range{0x097a, 0x097f, 1},
- Range{0x0985, 0x098c, 1},
- Range{0x098f, 0x0990, 1},
- Range{0x0993, 0x09a8, 1},
- Range{0x09aa, 0x09b0, 1},
- Range{0x09b2, 0x09b6, 4},
- Range{0x09b7, 0x09b9, 1},
- Range{0x09bd, 0x09ce, 17},
- Range{0x09dc, 0x09dd, 1},
- Range{0x09df, 0x09e1, 1},
- Range{0x09f0, 0x09f1, 1},
- Range{0x0a05, 0x0a0a, 1},
- Range{0x0a0f, 0x0a10, 1},
- Range{0x0a13, 0x0a28, 1},
- Range{0x0a2a, 0x0a30, 1},
- Range{0x0a32, 0x0a33, 1},
- Range{0x0a35, 0x0a36, 1},
- Range{0x0a38, 0x0a39, 1},
- Range{0x0a59, 0x0a5c, 1},
- Range{0x0a5e, 0x0a72, 20},
- Range{0x0a73, 0x0a74, 1},
- Range{0x0a85, 0x0a8d, 1},
- Range{0x0a8f, 0x0a91, 1},
- Range{0x0a93, 0x0aa8, 1},
- Range{0x0aaa, 0x0ab0, 1},
- Range{0x0ab2, 0x0ab3, 1},
- Range{0x0ab5, 0x0ab9, 1},
- Range{0x0abd, 0x0ad0, 19},
- Range{0x0ae0, 0x0ae1, 1},
- Range{0x0b05, 0x0b0c, 1},
- Range{0x0b0f, 0x0b10, 1},
- Range{0x0b13, 0x0b28, 1},
- Range{0x0b2a, 0x0b30, 1},
- Range{0x0b32, 0x0b33, 1},
- Range{0x0b35, 0x0b39, 1},
- Range{0x0b3d, 0x0b5c, 31},
- Range{0x0b5d, 0x0b5f, 2},
- Range{0x0b60, 0x0b61, 1},
- Range{0x0b71, 0x0b83, 18},
- Range{0x0b85, 0x0b8a, 1},
- Range{0x0b8e, 0x0b90, 1},
- Range{0x0b92, 0x0b95, 1},
- Range{0x0b99, 0x0b9a, 1},
- Range{0x0b9c, 0x0b9e, 2},
- Range{0x0b9f, 0x0ba3, 4},
- Range{0x0ba4, 0x0ba8, 4},
- Range{0x0ba9, 0x0baa, 1},
- Range{0x0bae, 0x0bb9, 1},
- Range{0x0bd0, 0x0c05, 53},
- Range{0x0c06, 0x0c0c, 1},
- Range{0x0c0e, 0x0c10, 1},
- Range{0x0c12, 0x0c28, 1},
- Range{0x0c2a, 0x0c33, 1},
- Range{0x0c35, 0x0c39, 1},
- Range{0x0c3d, 0x0c58, 27},
- Range{0x0c59, 0x0c60, 7},
- Range{0x0c61, 0x0c85, 36},
- Range{0x0c86, 0x0c8c, 1},
- Range{0x0c8e, 0x0c90, 1},
- Range{0x0c92, 0x0ca8, 1},
- Range{0x0caa, 0x0cb3, 1},
- Range{0x0cb5, 0x0cb9, 1},
- Range{0x0cbd, 0x0cde, 33},
- Range{0x0ce0, 0x0ce1, 1},
- Range{0x0d05, 0x0d0c, 1},
- Range{0x0d0e, 0x0d10, 1},
- Range{0x0d12, 0x0d28, 1},
- Range{0x0d2a, 0x0d39, 1},
- Range{0x0d3d, 0x0d60, 35},
- Range{0x0d61, 0x0d7a, 25},
- Range{0x0d7b, 0x0d7f, 1},
- Range{0x0d85, 0x0d96, 1},
- Range{0x0d9a, 0x0db1, 1},
- Range{0x0db3, 0x0dbb, 1},
- Range{0x0dbd, 0x0dc0, 3},
- Range{0x0dc1, 0x0dc6, 1},
- Range{0x0e01, 0x0e30, 1},
- Range{0x0e32, 0x0e33, 1},
- Range{0x0e40, 0x0e45, 1},
- Range{0x0e81, 0x0e82, 1},
- Range{0x0e84, 0x0e87, 3},
- Range{0x0e88, 0x0e8a, 2},
- Range{0x0e8d, 0x0e94, 7},
- Range{0x0e95, 0x0e97, 1},
- Range{0x0e99, 0x0e9f, 1},
- Range{0x0ea1, 0x0ea3, 1},
- Range{0x0ea5, 0x0ea7, 2},
- Range{0x0eaa, 0x0eab, 1},
- Range{0x0ead, 0x0eb0, 1},
- Range{0x0eb2, 0x0eb3, 1},
- Range{0x0ebd, 0x0ec0, 3},
- Range{0x0ec1, 0x0ec4, 1},
- Range{0x0edc, 0x0edd, 1},
- Range{0x0f00, 0x0f40, 64},
- Range{0x0f41, 0x0f47, 1},
- Range{0x0f49, 0x0f6c, 1},
- Range{0x0f88, 0x0f8b, 1},
- Range{0x1000, 0x102a, 1},
- Range{0x103f, 0x1050, 17},
- Range{0x1051, 0x1055, 1},
- Range{0x105a, 0x105d, 1},
- Range{0x1061, 0x1065, 4},
- Range{0x1066, 0x106e, 8},
- Range{0x106f, 0x1070, 1},
- Range{0x1075, 0x1081, 1},
- Range{0x108e, 0x10d0, 66},
- Range{0x10d1, 0x10fa, 1},
- Range{0x1100, 0x1248, 1},
- Range{0x124a, 0x124d, 1},
- Range{0x1250, 0x1256, 1},
- Range{0x1258, 0x125a, 2},
- Range{0x125b, 0x125d, 1},
- Range{0x1260, 0x1288, 1},
- Range{0x128a, 0x128d, 1},
- Range{0x1290, 0x12b0, 1},
- Range{0x12b2, 0x12b5, 1},
- Range{0x12b8, 0x12be, 1},
- Range{0x12c0, 0x12c2, 2},
- Range{0x12c3, 0x12c5, 1},
- Range{0x12c8, 0x12d6, 1},
- Range{0x12d8, 0x1310, 1},
- Range{0x1312, 0x1315, 1},
- Range{0x1318, 0x135a, 1},
- Range{0x1380, 0x138f, 1},
- Range{0x13a0, 0x13f4, 1},
- Range{0x1401, 0x166c, 1},
- Range{0x166f, 0x167f, 1},
- Range{0x1681, 0x169a, 1},
- Range{0x16a0, 0x16ea, 1},
- Range{0x1700, 0x170c, 1},
- Range{0x170e, 0x1711, 1},
- Range{0x1720, 0x1731, 1},
- Range{0x1740, 0x1751, 1},
- Range{0x1760, 0x176c, 1},
- Range{0x176e, 0x1770, 1},
- Range{0x1780, 0x17b3, 1},
- Range{0x17dc, 0x1820, 68},
- Range{0x1821, 0x1842, 1},
- Range{0x1844, 0x1877, 1},
- Range{0x1880, 0x18a8, 1},
- Range{0x18aa, 0x18b0, 6},
- Range{0x18b1, 0x18f5, 1},
- Range{0x1900, 0x191c, 1},
- Range{0x1950, 0x196d, 1},
- Range{0x1970, 0x1974, 1},
- Range{0x1980, 0x19ab, 1},
- Range{0x19c1, 0x19c7, 1},
- Range{0x1a00, 0x1a16, 1},
- Range{0x1a20, 0x1a54, 1},
- Range{0x1b05, 0x1b33, 1},
- Range{0x1b45, 0x1b4b, 1},
- Range{0x1b83, 0x1ba0, 1},
- Range{0x1bae, 0x1baf, 1},
- Range{0x1c00, 0x1c23, 1},
- Range{0x1c4d, 0x1c4f, 1},
- Range{0x1c5a, 0x1c77, 1},
- Range{0x1ce9, 0x1cec, 1},
- Range{0x1cee, 0x1cf1, 1},
- Range{0x2135, 0x2138, 1},
- Range{0x2d30, 0x2d65, 1},
- Range{0x2d80, 0x2d96, 1},
- Range{0x2da0, 0x2da6, 1},
- Range{0x2da8, 0x2dae, 1},
- Range{0x2db0, 0x2db6, 1},
- Range{0x2db8, 0x2dbe, 1},
- Range{0x2dc0, 0x2dc6, 1},
- Range{0x2dc8, 0x2dce, 1},
- Range{0x2dd0, 0x2dd6, 1},
- Range{0x2dd8, 0x2dde, 1},
- Range{0x3006, 0x303c, 54},
- Range{0x3041, 0x3096, 1},
- Range{0x309f, 0x30a1, 2},
- Range{0x30a2, 0x30fa, 1},
- Range{0x30ff, 0x3105, 6},
- Range{0x3106, 0x312d, 1},
- Range{0x3131, 0x318e, 1},
- Range{0x31a0, 0x31b7, 1},
- Range{0x31f0, 0x31ff, 1},
- Range{0x3400, 0x4db5, 1},
- Range{0x4e00, 0x9fcb, 1},
- Range{0xa000, 0xa014, 1},
- Range{0xa016, 0xa48c, 1},
- Range{0xa4d0, 0xa4f7, 1},
- Range{0xa500, 0xa60b, 1},
- Range{0xa610, 0xa61f, 1},
- Range{0xa62a, 0xa62b, 1},
- Range{0xa66e, 0xa6a0, 50},
- Range{0xa6a1, 0xa6e5, 1},
- Range{0xa7fb, 0xa801, 1},
- Range{0xa803, 0xa805, 1},
- Range{0xa807, 0xa80a, 1},
- Range{0xa80c, 0xa822, 1},
- Range{0xa840, 0xa873, 1},
- Range{0xa882, 0xa8b3, 1},
- Range{0xa8f2, 0xa8f7, 1},
- Range{0xa8fb, 0xa90a, 15},
- Range{0xa90b, 0xa925, 1},
- Range{0xa930, 0xa946, 1},
- Range{0xa960, 0xa97c, 1},
- Range{0xa984, 0xa9b2, 1},
- Range{0xaa00, 0xaa28, 1},
- Range{0xaa40, 0xaa42, 1},
- Range{0xaa44, 0xaa4b, 1},
- Range{0xaa60, 0xaa6f, 1},
- Range{0xaa71, 0xaa76, 1},
- Range{0xaa7a, 0xaa80, 6},
- Range{0xaa81, 0xaaaf, 1},
- Range{0xaab1, 0xaab5, 4},
- Range{0xaab6, 0xaab9, 3},
- Range{0xaaba, 0xaabd, 1},
- Range{0xaac0, 0xaac2, 2},
- Range{0xaadb, 0xaadc, 1},
- Range{0xabc0, 0xabe2, 1},
- Range{0xac00, 0xd7a3, 1},
- Range{0xd7b0, 0xd7c6, 1},
- Range{0xd7cb, 0xd7fb, 1},
- Range{0xf900, 0xfa2d, 1},
- Range{0xfa30, 0xfa6d, 1},
- Range{0xfa70, 0xfad9, 1},
- Range{0xfb1d, 0xfb1f, 2},
- Range{0xfb20, 0xfb28, 1},
- Range{0xfb2a, 0xfb36, 1},
- Range{0xfb38, 0xfb3c, 1},
- Range{0xfb3e, 0xfb40, 2},
- Range{0xfb41, 0xfb43, 2},
- Range{0xfb44, 0xfb46, 2},
- Range{0xfb47, 0xfbb1, 1},
- Range{0xfbd3, 0xfd3d, 1},
- Range{0xfd50, 0xfd8f, 1},
- Range{0xfd92, 0xfdc7, 1},
- Range{0xfdf0, 0xfdfb, 1},
- Range{0xfe70, 0xfe74, 1},
- Range{0xfe76, 0xfefc, 1},
- Range{0xff66, 0xff6f, 1},
- Range{0xff71, 0xff9d, 1},
- Range{0xffa0, 0xffbe, 1},
- Range{0xffc2, 0xffc7, 1},
- Range{0xffca, 0xffcf, 1},
- Range{0xffd2, 0xffd7, 1},
- Range{0xffda, 0xffdc, 1},
- Range{0x10000, 0x1000b, 1},
- Range{0x1000d, 0x10026, 1},
- Range{0x10028, 0x1003a, 1},
- Range{0x1003c, 0x1003d, 1},
- Range{0x1003f, 0x1004d, 1},
- Range{0x10050, 0x1005d, 1},
- Range{0x10080, 0x100fa, 1},
- Range{0x10280, 0x1029c, 1},
- Range{0x102a0, 0x102d0, 1},
- Range{0x10300, 0x1031e, 1},
- Range{0x10330, 0x10340, 1},
- Range{0x10342, 0x10349, 1},
- Range{0x10380, 0x1039d, 1},
- Range{0x103a0, 0x103c3, 1},
- Range{0x103c8, 0x103cf, 1},
- Range{0x10450, 0x1049d, 1},
- Range{0x10800, 0x10805, 1},
- Range{0x10808, 0x1080a, 2},
- Range{0x1080b, 0x10835, 1},
- Range{0x10837, 0x10838, 1},
- Range{0x1083c, 0x1083f, 3},
- Range{0x10840, 0x10855, 1},
- Range{0x10900, 0x10915, 1},
- Range{0x10920, 0x10939, 1},
- Range{0x10a00, 0x10a10, 16},
- Range{0x10a11, 0x10a13, 1},
- Range{0x10a15, 0x10a17, 1},
- Range{0x10a19, 0x10a33, 1},
- Range{0x10a60, 0x10a7c, 1},
- Range{0x10b00, 0x10b35, 1},
- Range{0x10b40, 0x10b55, 1},
- Range{0x10b60, 0x10b72, 1},
- Range{0x10c00, 0x10c48, 1},
- Range{0x11083, 0x110af, 1},
- Range{0x12000, 0x1236e, 1},
- Range{0x13000, 0x1342e, 1},
- Range{0x20000, 0x2a6d6, 1},
- Range{0x2a700, 0x2b734, 1},
- Range{0x2f800, 0x2fa1d, 1},
+ {0x01bb, 0x01c0, 5},
+ {0x01c1, 0x01c3, 1},
+ {0x0294, 0x05d0, 828},
+ {0x05d1, 0x05ea, 1},
+ {0x05f0, 0x05f2, 1},
+ {0x0621, 0x063f, 1},
+ {0x0641, 0x064a, 1},
+ {0x066e, 0x066f, 1},
+ {0x0671, 0x06d3, 1},
+ {0x06d5, 0x06ee, 25},
+ {0x06ef, 0x06fa, 11},
+ {0x06fb, 0x06fc, 1},
+ {0x06ff, 0x0710, 17},
+ {0x0712, 0x072f, 1},
+ {0x074d, 0x07a5, 1},
+ {0x07b1, 0x07ca, 25},
+ {0x07cb, 0x07ea, 1},
+ {0x0800, 0x0815, 1},
+ {0x0904, 0x0939, 1},
+ {0x093d, 0x0950, 19},
+ {0x0958, 0x0961, 1},
+ {0x0972, 0x0979, 7},
+ {0x097a, 0x097f, 1},
+ {0x0985, 0x098c, 1},
+ {0x098f, 0x0990, 1},
+ {0x0993, 0x09a8, 1},
+ {0x09aa, 0x09b0, 1},
+ {0x09b2, 0x09b6, 4},
+ {0x09b7, 0x09b9, 1},
+ {0x09bd, 0x09ce, 17},
+ {0x09dc, 0x09dd, 1},
+ {0x09df, 0x09e1, 1},
+ {0x09f0, 0x09f1, 1},
+ {0x0a05, 0x0a0a, 1},
+ {0x0a0f, 0x0a10, 1},
+ {0x0a13, 0x0a28, 1},
+ {0x0a2a, 0x0a30, 1},
+ {0x0a32, 0x0a33, 1},
+ {0x0a35, 0x0a36, 1},
+ {0x0a38, 0x0a39, 1},
+ {0x0a59, 0x0a5c, 1},
+ {0x0a5e, 0x0a72, 20},
+ {0x0a73, 0x0a74, 1},
+ {0x0a85, 0x0a8d, 1},
+ {0x0a8f, 0x0a91, 1},
+ {0x0a93, 0x0aa8, 1},
+ {0x0aaa, 0x0ab0, 1},
+ {0x0ab2, 0x0ab3, 1},
+ {0x0ab5, 0x0ab9, 1},
+ {0x0abd, 0x0ad0, 19},
+ {0x0ae0, 0x0ae1, 1},
+ {0x0b05, 0x0b0c, 1},
+ {0x0b0f, 0x0b10, 1},
+ {0x0b13, 0x0b28, 1},
+ {0x0b2a, 0x0b30, 1},
+ {0x0b32, 0x0b33, 1},
+ {0x0b35, 0x0b39, 1},
+ {0x0b3d, 0x0b5c, 31},
+ {0x0b5d, 0x0b5f, 2},
+ {0x0b60, 0x0b61, 1},
+ {0x0b71, 0x0b83, 18},
+ {0x0b85, 0x0b8a, 1},
+ {0x0b8e, 0x0b90, 1},
+ {0x0b92, 0x0b95, 1},
+ {0x0b99, 0x0b9a, 1},
+ {0x0b9c, 0x0b9e, 2},
+ {0x0b9f, 0x0ba3, 4},
+ {0x0ba4, 0x0ba8, 4},
+ {0x0ba9, 0x0baa, 1},
+ {0x0bae, 0x0bb9, 1},
+ {0x0bd0, 0x0c05, 53},
+ {0x0c06, 0x0c0c, 1},
+ {0x0c0e, 0x0c10, 1},
+ {0x0c12, 0x0c28, 1},
+ {0x0c2a, 0x0c33, 1},
+ {0x0c35, 0x0c39, 1},
+ {0x0c3d, 0x0c58, 27},
+ {0x0c59, 0x0c60, 7},
+ {0x0c61, 0x0c85, 36},
+ {0x0c86, 0x0c8c, 1},
+ {0x0c8e, 0x0c90, 1},
+ {0x0c92, 0x0ca8, 1},
+ {0x0caa, 0x0cb3, 1},
+ {0x0cb5, 0x0cb9, 1},
+ {0x0cbd, 0x0cde, 33},
+ {0x0ce0, 0x0ce1, 1},
+ {0x0d05, 0x0d0c, 1},
+ {0x0d0e, 0x0d10, 1},
+ {0x0d12, 0x0d28, 1},
+ {0x0d2a, 0x0d39, 1},
+ {0x0d3d, 0x0d60, 35},
+ {0x0d61, 0x0d7a, 25},
+ {0x0d7b, 0x0d7f, 1},
+ {0x0d85, 0x0d96, 1},
+ {0x0d9a, 0x0db1, 1},
+ {0x0db3, 0x0dbb, 1},
+ {0x0dbd, 0x0dc0, 3},
+ {0x0dc1, 0x0dc6, 1},
+ {0x0e01, 0x0e30, 1},
+ {0x0e32, 0x0e33, 1},
+ {0x0e40, 0x0e45, 1},
+ {0x0e81, 0x0e82, 1},
+ {0x0e84, 0x0e87, 3},
+ {0x0e88, 0x0e8a, 2},
+ {0x0e8d, 0x0e94, 7},
+ {0x0e95, 0x0e97, 1},
+ {0x0e99, 0x0e9f, 1},
+ {0x0ea1, 0x0ea3, 1},
+ {0x0ea5, 0x0ea7, 2},
+ {0x0eaa, 0x0eab, 1},
+ {0x0ead, 0x0eb0, 1},
+ {0x0eb2, 0x0eb3, 1},
+ {0x0ebd, 0x0ec0, 3},
+ {0x0ec1, 0x0ec4, 1},
+ {0x0edc, 0x0edd, 1},
+ {0x0f00, 0x0f40, 64},
+ {0x0f41, 0x0f47, 1},
+ {0x0f49, 0x0f6c, 1},
+ {0x0f88, 0x0f8b, 1},
+ {0x1000, 0x102a, 1},
+ {0x103f, 0x1050, 17},
+ {0x1051, 0x1055, 1},
+ {0x105a, 0x105d, 1},
+ {0x1061, 0x1065, 4},
+ {0x1066, 0x106e, 8},
+ {0x106f, 0x1070, 1},
+ {0x1075, 0x1081, 1},
+ {0x108e, 0x10d0, 66},
+ {0x10d1, 0x10fa, 1},
+ {0x1100, 0x1248, 1},
+ {0x124a, 0x124d, 1},
+ {0x1250, 0x1256, 1},
+ {0x1258, 0x125a, 2},
+ {0x125b, 0x125d, 1},
+ {0x1260, 0x1288, 1},
+ {0x128a, 0x128d, 1},
+ {0x1290, 0x12b0, 1},
+ {0x12b2, 0x12b5, 1},
+ {0x12b8, 0x12be, 1},
+ {0x12c0, 0x12c2, 2},
+ {0x12c3, 0x12c5, 1},
+ {0x12c8, 0x12d6, 1},
+ {0x12d8, 0x1310, 1},
+ {0x1312, 0x1315, 1},
+ {0x1318, 0x135a, 1},
+ {0x1380, 0x138f, 1},
+ {0x13a0, 0x13f4, 1},
+ {0x1401, 0x166c, 1},
+ {0x166f, 0x167f, 1},
+ {0x1681, 0x169a, 1},
+ {0x16a0, 0x16ea, 1},
+ {0x1700, 0x170c, 1},
+ {0x170e, 0x1711, 1},
+ {0x1720, 0x1731, 1},
+ {0x1740, 0x1751, 1},
+ {0x1760, 0x176c, 1},
+ {0x176e, 0x1770, 1},
+ {0x1780, 0x17b3, 1},
+ {0x17dc, 0x1820, 68},
+ {0x1821, 0x1842, 1},
+ {0x1844, 0x1877, 1},
+ {0x1880, 0x18a8, 1},
+ {0x18aa, 0x18b0, 6},
+ {0x18b1, 0x18f5, 1},
+ {0x1900, 0x191c, 1},
+ {0x1950, 0x196d, 1},
+ {0x1970, 0x1974, 1},
+ {0x1980, 0x19ab, 1},
+ {0x19c1, 0x19c7, 1},
+ {0x1a00, 0x1a16, 1},
+ {0x1a20, 0x1a54, 1},
+ {0x1b05, 0x1b33, 1},
+ {0x1b45, 0x1b4b, 1},
+ {0x1b83, 0x1ba0, 1},
+ {0x1bae, 0x1baf, 1},
+ {0x1c00, 0x1c23, 1},
+ {0x1c4d, 0x1c4f, 1},
+ {0x1c5a, 0x1c77, 1},
+ {0x1ce9, 0x1cec, 1},
+ {0x1cee, 0x1cf1, 1},
+ {0x2135, 0x2138, 1},
+ {0x2d30, 0x2d65, 1},
+ {0x2d80, 0x2d96, 1},
+ {0x2da0, 0x2da6, 1},
+ {0x2da8, 0x2dae, 1},
+ {0x2db0, 0x2db6, 1},
+ {0x2db8, 0x2dbe, 1},
+ {0x2dc0, 0x2dc6, 1},
+ {0x2dc8, 0x2dce, 1},
+ {0x2dd0, 0x2dd6, 1},
+ {0x2dd8, 0x2dde, 1},
+ {0x3006, 0x303c, 54},
+ {0x3041, 0x3096, 1},
+ {0x309f, 0x30a1, 2},
+ {0x30a2, 0x30fa, 1},
+ {0x30ff, 0x3105, 6},
+ {0x3106, 0x312d, 1},
+ {0x3131, 0x318e, 1},
+ {0x31a0, 0x31b7, 1},
+ {0x31f0, 0x31ff, 1},
+ {0x3400, 0x4db5, 1},
+ {0x4e00, 0x9fcb, 1},
+ {0xa000, 0xa014, 1},
+ {0xa016, 0xa48c, 1},
+ {0xa4d0, 0xa4f7, 1},
+ {0xa500, 0xa60b, 1},
+ {0xa610, 0xa61f, 1},
+ {0xa62a, 0xa62b, 1},
+ {0xa66e, 0xa6a0, 50},
+ {0xa6a1, 0xa6e5, 1},
+ {0xa7fb, 0xa801, 1},
+ {0xa803, 0xa805, 1},
+ {0xa807, 0xa80a, 1},
+ {0xa80c, 0xa822, 1},
+ {0xa840, 0xa873, 1},
+ {0xa882, 0xa8b3, 1},
+ {0xa8f2, 0xa8f7, 1},
+ {0xa8fb, 0xa90a, 15},
+ {0xa90b, 0xa925, 1},
+ {0xa930, 0xa946, 1},
+ {0xa960, 0xa97c, 1},
+ {0xa984, 0xa9b2, 1},
+ {0xaa00, 0xaa28, 1},
+ {0xaa40, 0xaa42, 1},
+ {0xaa44, 0xaa4b, 1},
+ {0xaa60, 0xaa6f, 1},
+ {0xaa71, 0xaa76, 1},
+ {0xaa7a, 0xaa80, 6},
+ {0xaa81, 0xaaaf, 1},
+ {0xaab1, 0xaab5, 4},
+ {0xaab6, 0xaab9, 3},
+ {0xaaba, 0xaabd, 1},
+ {0xaac0, 0xaac2, 2},
+ {0xaadb, 0xaadc, 1},
+ {0xabc0, 0xabe2, 1},
+ {0xac00, 0xd7a3, 1},
+ {0xd7b0, 0xd7c6, 1},
+ {0xd7cb, 0xd7fb, 1},
+ {0xf900, 0xfa2d, 1},
+ {0xfa30, 0xfa6d, 1},
+ {0xfa70, 0xfad9, 1},
+ {0xfb1d, 0xfb1f, 2},
+ {0xfb20, 0xfb28, 1},
+ {0xfb2a, 0xfb36, 1},
+ {0xfb38, 0xfb3c, 1},
+ {0xfb3e, 0xfb40, 2},
+ {0xfb41, 0xfb43, 2},
+ {0xfb44, 0xfb46, 2},
+ {0xfb47, 0xfbb1, 1},
+ {0xfbd3, 0xfd3d, 1},
+ {0xfd50, 0xfd8f, 1},
+ {0xfd92, 0xfdc7, 1},
+ {0xfdf0, 0xfdfb, 1},
+ {0xfe70, 0xfe74, 1},
+ {0xfe76, 0xfefc, 1},
+ {0xff66, 0xff6f, 1},
+ {0xff71, 0xff9d, 1},
+ {0xffa0, 0xffbe, 1},
+ {0xffc2, 0xffc7, 1},
+ {0xffca, 0xffcf, 1},
+ {0xffd2, 0xffd7, 1},
+ {0xffda, 0xffdc, 1},
+ {0x10000, 0x1000b, 1},
+ {0x1000d, 0x10026, 1},
+ {0x10028, 0x1003a, 1},
+ {0x1003c, 0x1003d, 1},
+ {0x1003f, 0x1004d, 1},
+ {0x10050, 0x1005d, 1},
+ {0x10080, 0x100fa, 1},
+ {0x10280, 0x1029c, 1},
+ {0x102a0, 0x102d0, 1},
+ {0x10300, 0x1031e, 1},
+ {0x10330, 0x10340, 1},
+ {0x10342, 0x10349, 1},
+ {0x10380, 0x1039d, 1},
+ {0x103a0, 0x103c3, 1},
+ {0x103c8, 0x103cf, 1},
+ {0x10450, 0x1049d, 1},
+ {0x10800, 0x10805, 1},
+ {0x10808, 0x1080a, 2},
+ {0x1080b, 0x10835, 1},
+ {0x10837, 0x10838, 1},
+ {0x1083c, 0x1083f, 3},
+ {0x10840, 0x10855, 1},
+ {0x10900, 0x10915, 1},
+ {0x10920, 0x10939, 1},
+ {0x10a00, 0x10a10, 16},
+ {0x10a11, 0x10a13, 1},
+ {0x10a15, 0x10a17, 1},
+ {0x10a19, 0x10a33, 1},
+ {0x10a60, 0x10a7c, 1},
+ {0x10b00, 0x10b35, 1},
+ {0x10b40, 0x10b55, 1},
+ {0x10b60, 0x10b72, 1},
+ {0x10c00, 0x10c48, 1},
+ {0x11083, 0x110af, 1},
+ {0x12000, 0x1236e, 1},
+ {0x13000, 0x1342e, 1},
+ {0x20000, 0x2a6d6, 1},
+ {0x2a700, 0x2b734, 1},
+ {0x2f800, 0x2fa1d, 1},
}
var (
@@ -2058,935 +2058,935 @@ var Scripts = map[string][]Range{
}
var _Katakana = []Range{
- Range{0x30a1, 0x30fa, 1},
- Range{0x30fd, 0x30ff, 1},
- Range{0x31f0, 0x31ff, 1},
- Range{0x32d0, 0x32fe, 1},
- Range{0x3300, 0x3357, 1},
- Range{0xff66, 0xff6f, 1},
- Range{0xff71, 0xff9d, 1},
+ {0x30a1, 0x30fa, 1},
+ {0x30fd, 0x30ff, 1},
+ {0x31f0, 0x31ff, 1},
+ {0x32d0, 0x32fe, 1},
+ {0x3300, 0x3357, 1},
+ {0xff66, 0xff6f, 1},
+ {0xff71, 0xff9d, 1},
}
var _Malayalam = []Range{
- Range{0x0d02, 0x0d03, 1},
- Range{0x0d05, 0x0d0c, 1},
- Range{0x0d0e, 0x0d10, 1},
- Range{0x0d12, 0x0d28, 1},
- Range{0x0d2a, 0x0d39, 1},
- Range{0x0d3d, 0x0d44, 1},
- Range{0x0d46, 0x0d48, 1},
- Range{0x0d4a, 0x0d4d, 1},
- Range{0x0d57, 0x0d57, 1},
- Range{0x0d60, 0x0d63, 1},
- Range{0x0d66, 0x0d75, 1},
- Range{0x0d79, 0x0d7f, 1},
+ {0x0d02, 0x0d03, 1},
+ {0x0d05, 0x0d0c, 1},
+ {0x0d0e, 0x0d10, 1},
+ {0x0d12, 0x0d28, 1},
+ {0x0d2a, 0x0d39, 1},
+ {0x0d3d, 0x0d44, 1},
+ {0x0d46, 0x0d48, 1},
+ {0x0d4a, 0x0d4d, 1},
+ {0x0d57, 0x0d57, 1},
+ {0x0d60, 0x0d63, 1},
+ {0x0d66, 0x0d75, 1},
+ {0x0d79, 0x0d7f, 1},
}
var _Phags_Pa = []Range{
- Range{0xa840, 0xa877, 1},
+ {0xa840, 0xa877, 1},
}
var _Inscriptional_Parthian = []Range{
- Range{0x10b40, 0x10b55, 1},
- Range{0x10b58, 0x10b5f, 1},
+ {0x10b40, 0x10b55, 1},
+ {0x10b58, 0x10b5f, 1},
}
var _Latin = []Range{
- Range{0x0041, 0x005a, 1},
- Range{0x0061, 0x007a, 1},
- Range{0x00aa, 0x00aa, 1},
- Range{0x00ba, 0x00ba, 1},
- Range{0x00c0, 0x00d6, 1},
- Range{0x00d8, 0x00f6, 1},
- Range{0x00f8, 0x02b8, 1},
- Range{0x02e0, 0x02e4, 1},
- Range{0x1d00, 0x1d25, 1},
- Range{0x1d2c, 0x1d5c, 1},
- Range{0x1d62, 0x1d65, 1},
- Range{0x1d6b, 0x1d77, 1},
- Range{0x1d79, 0x1dbe, 1},
- Range{0x1e00, 0x1eff, 1},
- Range{0x2071, 0x2071, 1},
- Range{0x207f, 0x207f, 1},
- Range{0x2090, 0x2094, 1},
- Range{0x212a, 0x212b, 1},
- Range{0x2132, 0x2132, 1},
- Range{0x214e, 0x214e, 1},
- Range{0x2160, 0x2188, 1},
- Range{0x2c60, 0x2c7f, 1},
- Range{0xa722, 0xa787, 1},
- Range{0xa78b, 0xa78c, 1},
- Range{0xa7fb, 0xa7ff, 1},
- Range{0xfb00, 0xfb06, 1},
- Range{0xff21, 0xff3a, 1},
- Range{0xff41, 0xff5a, 1},
+ {0x0041, 0x005a, 1},
+ {0x0061, 0x007a, 1},
+ {0x00aa, 0x00aa, 1},
+ {0x00ba, 0x00ba, 1},
+ {0x00c0, 0x00d6, 1},
+ {0x00d8, 0x00f6, 1},
+ {0x00f8, 0x02b8, 1},
+ {0x02e0, 0x02e4, 1},
+ {0x1d00, 0x1d25, 1},
+ {0x1d2c, 0x1d5c, 1},
+ {0x1d62, 0x1d65, 1},
+ {0x1d6b, 0x1d77, 1},
+ {0x1d79, 0x1dbe, 1},
+ {0x1e00, 0x1eff, 1},
+ {0x2071, 0x2071, 1},
+ {0x207f, 0x207f, 1},
+ {0x2090, 0x2094, 1},
+ {0x212a, 0x212b, 1},
+ {0x2132, 0x2132, 1},
+ {0x214e, 0x214e, 1},
+ {0x2160, 0x2188, 1},
+ {0x2c60, 0x2c7f, 1},
+ {0xa722, 0xa787, 1},
+ {0xa78b, 0xa78c, 1},
+ {0xa7fb, 0xa7ff, 1},
+ {0xfb00, 0xfb06, 1},
+ {0xff21, 0xff3a, 1},
+ {0xff41, 0xff5a, 1},
}
var _Inscriptional_Pahlavi = []Range{
- Range{0x10b60, 0x10b72, 1},
- Range{0x10b78, 0x10b7f, 1},
+ {0x10b60, 0x10b72, 1},
+ {0x10b78, 0x10b7f, 1},
}
var _Osmanya = []Range{
- Range{0x10480, 0x1049d, 1},
- Range{0x104a0, 0x104a9, 1},
+ {0x10480, 0x1049d, 1},
+ {0x104a0, 0x104a9, 1},
}
var _Khmer = []Range{
- Range{0x1780, 0x17dd, 1},
- Range{0x17e0, 0x17e9, 1},
- Range{0x17f0, 0x17f9, 1},
- Range{0x19e0, 0x19ff, 1},
+ {0x1780, 0x17dd, 1},
+ {0x17e0, 0x17e9, 1},
+ {0x17f0, 0x17f9, 1},
+ {0x19e0, 0x19ff, 1},
}
var _Inherited = []Range{
- Range{0x0300, 0x036f, 1},
- Range{0x0485, 0x0486, 1},
- Range{0x064b, 0x0655, 1},
- Range{0x0670, 0x0670, 1},
- Range{0x0951, 0x0952, 1},
- Range{0x1cd0, 0x1cd2, 1},
- Range{0x1cd4, 0x1ce0, 1},
- Range{0x1ce2, 0x1ce8, 1},
- Range{0x1ced, 0x1ced, 1},
- Range{0x1dc0, 0x1de6, 1},
- Range{0x1dfd, 0x1dff, 1},
- Range{0x200c, 0x200d, 1},
- Range{0x20d0, 0x20f0, 1},
- Range{0x302a, 0x302f, 1},
- Range{0x3099, 0x309a, 1},
- Range{0xfe00, 0xfe0f, 1},
- Range{0xfe20, 0xfe26, 1},
- Range{0x101fd, 0x101fd, 1},
- Range{0x1d167, 0x1d169, 1},
- Range{0x1d17b, 0x1d182, 1},
- Range{0x1d185, 0x1d18b, 1},
- Range{0x1d1aa, 0x1d1ad, 1},
- Range{0xe0100, 0xe01ef, 1},
+ {0x0300, 0x036f, 1},
+ {0x0485, 0x0486, 1},
+ {0x064b, 0x0655, 1},
+ {0x0670, 0x0670, 1},
+ {0x0951, 0x0952, 1},
+ {0x1cd0, 0x1cd2, 1},
+ {0x1cd4, 0x1ce0, 1},
+ {0x1ce2, 0x1ce8, 1},
+ {0x1ced, 0x1ced, 1},
+ {0x1dc0, 0x1de6, 1},
+ {0x1dfd, 0x1dff, 1},
+ {0x200c, 0x200d, 1},
+ {0x20d0, 0x20f0, 1},
+ {0x302a, 0x302f, 1},
+ {0x3099, 0x309a, 1},
+ {0xfe00, 0xfe0f, 1},
+ {0xfe20, 0xfe26, 1},
+ {0x101fd, 0x101fd, 1},
+ {0x1d167, 0x1d169, 1},
+ {0x1d17b, 0x1d182, 1},
+ {0x1d185, 0x1d18b, 1},
+ {0x1d1aa, 0x1d1ad, 1},
+ {0xe0100, 0xe01ef, 1},
}
var _Telugu = []Range{
- Range{0x0c01, 0x0c03, 1},
- Range{0x0c05, 0x0c0c, 1},
- Range{0x0c0e, 0x0c10, 1},
- Range{0x0c12, 0x0c28, 1},
- Range{0x0c2a, 0x0c33, 1},
- Range{0x0c35, 0x0c39, 1},
- Range{0x0c3d, 0x0c44, 1},
- Range{0x0c46, 0x0c48, 1},
- Range{0x0c4a, 0x0c4d, 1},
- Range{0x0c55, 0x0c56, 1},
- Range{0x0c58, 0x0c59, 1},
- Range{0x0c60, 0x0c63, 1},
- Range{0x0c66, 0x0c6f, 1},
- Range{0x0c78, 0x0c7f, 1},
+ {0x0c01, 0x0c03, 1},
+ {0x0c05, 0x0c0c, 1},
+ {0x0c0e, 0x0c10, 1},
+ {0x0c12, 0x0c28, 1},
+ {0x0c2a, 0x0c33, 1},
+ {0x0c35, 0x0c39, 1},
+ {0x0c3d, 0x0c44, 1},
+ {0x0c46, 0x0c48, 1},
+ {0x0c4a, 0x0c4d, 1},
+ {0x0c55, 0x0c56, 1},
+ {0x0c58, 0x0c59, 1},
+ {0x0c60, 0x0c63, 1},
+ {0x0c66, 0x0c6f, 1},
+ {0x0c78, 0x0c7f, 1},
}
var _Samaritan = []Range{
- Range{0x0800, 0x082d, 1},
- Range{0x0830, 0x083e, 1},
+ {0x0800, 0x082d, 1},
+ {0x0830, 0x083e, 1},
}
var _Bopomofo = []Range{
- Range{0x3105, 0x312d, 1},
- Range{0x31a0, 0x31b7, 1},
+ {0x3105, 0x312d, 1},
+ {0x31a0, 0x31b7, 1},
}
var _Imperial_Aramaic = []Range{
- Range{0x10840, 0x10855, 1},
- Range{0x10857, 0x1085f, 1},
+ {0x10840, 0x10855, 1},
+ {0x10857, 0x1085f, 1},
}
var _Kaithi = []Range{
- Range{0x11080, 0x110c1, 1},
+ {0x11080, 0x110c1, 1},
}
var _Old_South_Arabian = []Range{
- Range{0x10a60, 0x10a7f, 1},
+ {0x10a60, 0x10a7f, 1},
}
var _Kayah_Li = []Range{
- Range{0xa900, 0xa92f, 1},
+ {0xa900, 0xa92f, 1},
}
var _New_Tai_Lue = []Range{
- Range{0x1980, 0x19ab, 1},
- Range{0x19b0, 0x19c9, 1},
- Range{0x19d0, 0x19da, 1},
- Range{0x19de, 0x19df, 1},
+ {0x1980, 0x19ab, 1},
+ {0x19b0, 0x19c9, 1},
+ {0x19d0, 0x19da, 1},
+ {0x19de, 0x19df, 1},
}
var _Tai_Le = []Range{
- Range{0x1950, 0x196d, 1},
- Range{0x1970, 0x1974, 1},
+ {0x1950, 0x196d, 1},
+ {0x1970, 0x1974, 1},
}
var _Kharoshthi = []Range{
- Range{0x10a00, 0x10a03, 1},
- Range{0x10a05, 0x10a06, 1},
- Range{0x10a0c, 0x10a13, 1},
- Range{0x10a15, 0x10a17, 1},
- Range{0x10a19, 0x10a33, 1},
- Range{0x10a38, 0x10a3a, 1},
- Range{0x10a3f, 0x10a47, 1},
- Range{0x10a50, 0x10a58, 1},
+ {0x10a00, 0x10a03, 1},
+ {0x10a05, 0x10a06, 1},
+ {0x10a0c, 0x10a13, 1},
+ {0x10a15, 0x10a17, 1},
+ {0x10a19, 0x10a33, 1},
+ {0x10a38, 0x10a3a, 1},
+ {0x10a3f, 0x10a47, 1},
+ {0x10a50, 0x10a58, 1},
}
var _Common = []Range{
- Range{0x0000, 0x0040, 1},
- Range{0x005b, 0x0060, 1},
- Range{0x007b, 0x00a9, 1},
- Range{0x00ab, 0x00b9, 1},
- Range{0x00bb, 0x00bf, 1},
- Range{0x00d7, 0x00d7, 1},
- Range{0x00f7, 0x00f7, 1},
- Range{0x02b9, 0x02df, 1},
- Range{0x02e5, 0x02ff, 1},
- Range{0x0374, 0x0374, 1},
- Range{0x037e, 0x037e, 1},
- Range{0x0385, 0x0385, 1},
- Range{0x0387, 0x0387, 1},
- Range{0x0589, 0x0589, 1},
- Range{0x0600, 0x0603, 1},
- Range{0x060c, 0x060c, 1},
- Range{0x061b, 0x061b, 1},
- Range{0x061f, 0x061f, 1},
- Range{0x0640, 0x0640, 1},
- Range{0x0660, 0x0669, 1},
- Range{0x06dd, 0x06dd, 1},
- Range{0x0964, 0x0965, 1},
- Range{0x0970, 0x0970, 1},
- Range{0x0cf1, 0x0cf2, 1},
- Range{0x0e3f, 0x0e3f, 1},
- Range{0x0fd5, 0x0fd8, 1},
- Range{0x10fb, 0x10fb, 1},
- Range{0x16eb, 0x16ed, 1},
- Range{0x1735, 0x1736, 1},
- Range{0x1802, 0x1803, 1},
- Range{0x1805, 0x1805, 1},
- Range{0x1cd3, 0x1cd3, 1},
- Range{0x1ce1, 0x1ce1, 1},
- Range{0x1ce9, 0x1cec, 1},
- Range{0x1cee, 0x1cf2, 1},
- Range{0x2000, 0x200b, 1},
- Range{0x200e, 0x2064, 1},
- Range{0x206a, 0x2070, 1},
- Range{0x2074, 0x207e, 1},
- Range{0x2080, 0x208e, 1},
- Range{0x20a0, 0x20b8, 1},
- Range{0x2100, 0x2125, 1},
- Range{0x2127, 0x2129, 1},
- Range{0x212c, 0x2131, 1},
- Range{0x2133, 0x214d, 1},
- Range{0x214f, 0x215f, 1},
- Range{0x2189, 0x2189, 1},
- Range{0x2190, 0x23e8, 1},
- Range{0x2400, 0x2426, 1},
- Range{0x2440, 0x244a, 1},
- Range{0x2460, 0x26cd, 1},
- Range{0x26cf, 0x26e1, 1},
- Range{0x26e3, 0x26e3, 1},
- Range{0x26e8, 0x26ff, 1},
- Range{0x2701, 0x2704, 1},
- Range{0x2706, 0x2709, 1},
- Range{0x270c, 0x2727, 1},
- Range{0x2729, 0x274b, 1},
- Range{0x274d, 0x274d, 1},
- Range{0x274f, 0x2752, 1},
- Range{0x2756, 0x275e, 1},
- Range{0x2761, 0x2794, 1},
- Range{0x2798, 0x27af, 1},
- Range{0x27b1, 0x27be, 1},
- Range{0x27c0, 0x27ca, 1},
- Range{0x27cc, 0x27cc, 1},
- Range{0x27d0, 0x27ff, 1},
- Range{0x2900, 0x2b4c, 1},
- Range{0x2b50, 0x2b59, 1},
- Range{0x2e00, 0x2e31, 1},
- Range{0x2ff0, 0x2ffb, 1},
- Range{0x3000, 0x3004, 1},
- Range{0x3006, 0x3006, 1},
- Range{0x3008, 0x3020, 1},
- Range{0x3030, 0x3037, 1},
- Range{0x303c, 0x303f, 1},
- Range{0x309b, 0x309c, 1},
- Range{0x30a0, 0x30a0, 1},
- Range{0x30fb, 0x30fc, 1},
- Range{0x3190, 0x319f, 1},
- Range{0x31c0, 0x31e3, 1},
- Range{0x3220, 0x325f, 1},
- Range{0x327f, 0x32cf, 1},
- Range{0x3358, 0x33ff, 1},
- Range{0x4dc0, 0x4dff, 1},
- Range{0xa700, 0xa721, 1},
- Range{0xa788, 0xa78a, 1},
- Range{0xa830, 0xa839, 1},
- Range{0xfd3e, 0xfd3f, 1},
- Range{0xfdfd, 0xfdfd, 1},
- Range{0xfe10, 0xfe19, 1},
- Range{0xfe30, 0xfe52, 1},
- Range{0xfe54, 0xfe66, 1},
- Range{0xfe68, 0xfe6b, 1},
- Range{0xfeff, 0xfeff, 1},
- Range{0xff01, 0xff20, 1},
- Range{0xff3b, 0xff40, 1},
- Range{0xff5b, 0xff65, 1},
- Range{0xff70, 0xff70, 1},
- Range{0xff9e, 0xff9f, 1},
- Range{0xffe0, 0xffe6, 1},
- Range{0xffe8, 0xffee, 1},
- Range{0xfff9, 0xfffd, 1},
- Range{0x10100, 0x10102, 1},
- Range{0x10107, 0x10133, 1},
- Range{0x10137, 0x1013f, 1},
- Range{0x10190, 0x1019b, 1},
- Range{0x101d0, 0x101fc, 1},
- Range{0x1d000, 0x1d0f5, 1},
- Range{0x1d100, 0x1d126, 1},
- Range{0x1d129, 0x1d166, 1},
- Range{0x1d16a, 0x1d17a, 1},
- Range{0x1d183, 0x1d184, 1},
- Range{0x1d18c, 0x1d1a9, 1},
- Range{0x1d1ae, 0x1d1dd, 1},
- Range{0x1d300, 0x1d356, 1},
- Range{0x1d360, 0x1d371, 1},
- Range{0x1d400, 0x1d454, 1},
- Range{0x1d456, 0x1d49c, 1},
- Range{0x1d49e, 0x1d49f, 1},
- Range{0x1d4a2, 0x1d4a2, 1},
- Range{0x1d4a5, 0x1d4a6, 1},
- Range{0x1d4a9, 0x1d4ac, 1},
- Range{0x1d4ae, 0x1d4b9, 1},
- Range{0x1d4bb, 0x1d4bb, 1},
- Range{0x1d4bd, 0x1d4c3, 1},
- Range{0x1d4c5, 0x1d505, 1},
- Range{0x1d507, 0x1d50a, 1},
- Range{0x1d50d, 0x1d514, 1},
- Range{0x1d516, 0x1d51c, 1},
- Range{0x1d51e, 0x1d539, 1},
- Range{0x1d53b, 0x1d53e, 1},
- Range{0x1d540, 0x1d544, 1},
- Range{0x1d546, 0x1d546, 1},
- Range{0x1d54a, 0x1d550, 1},
- Range{0x1d552, 0x1d6a5, 1},
- Range{0x1d6a8, 0x1d7cb, 1},
- Range{0x1d7ce, 0x1d7ff, 1},
- Range{0x1f000, 0x1f02b, 1},
- Range{0x1f030, 0x1f093, 1},
- Range{0x1f100, 0x1f10a, 1},
- Range{0x1f110, 0x1f12e, 1},
- Range{0x1f131, 0x1f131, 1},
- Range{0x1f13d, 0x1f13d, 1},
- Range{0x1f13f, 0x1f13f, 1},
- Range{0x1f142, 0x1f142, 1},
- Range{0x1f146, 0x1f146, 1},
- Range{0x1f14a, 0x1f14e, 1},
- Range{0x1f157, 0x1f157, 1},
- Range{0x1f15f, 0x1f15f, 1},
- Range{0x1f179, 0x1f179, 1},
- Range{0x1f17b, 0x1f17c, 1},
- Range{0x1f17f, 0x1f17f, 1},
- Range{0x1f18a, 0x1f18d, 1},
- Range{0x1f190, 0x1f190, 1},
- Range{0x1f210, 0x1f231, 1},
- Range{0x1f240, 0x1f248, 1},
- Range{0xe0001, 0xe0001, 1},
- Range{0xe0020, 0xe007f, 1},
+ {0x0000, 0x0040, 1},
+ {0x005b, 0x0060, 1},
+ {0x007b, 0x00a9, 1},
+ {0x00ab, 0x00b9, 1},
+ {0x00bb, 0x00bf, 1},
+ {0x00d7, 0x00d7, 1},
+ {0x00f7, 0x00f7, 1},
+ {0x02b9, 0x02df, 1},
+ {0x02e5, 0x02ff, 1},
+ {0x0374, 0x0374, 1},
+ {0x037e, 0x037e, 1},
+ {0x0385, 0x0385, 1},
+ {0x0387, 0x0387, 1},
+ {0x0589, 0x0589, 1},
+ {0x0600, 0x0603, 1},
+ {0x060c, 0x060c, 1},
+ {0x061b, 0x061b, 1},
+ {0x061f, 0x061f, 1},
+ {0x0640, 0x0640, 1},
+ {0x0660, 0x0669, 1},
+ {0x06dd, 0x06dd, 1},
+ {0x0964, 0x0965, 1},
+ {0x0970, 0x0970, 1},
+ {0x0cf1, 0x0cf2, 1},
+ {0x0e3f, 0x0e3f, 1},
+ {0x0fd5, 0x0fd8, 1},
+ {0x10fb, 0x10fb, 1},
+ {0x16eb, 0x16ed, 1},
+ {0x1735, 0x1736, 1},
+ {0x1802, 0x1803, 1},
+ {0x1805, 0x1805, 1},
+ {0x1cd3, 0x1cd3, 1},
+ {0x1ce1, 0x1ce1, 1},
+ {0x1ce9, 0x1cec, 1},
+ {0x1cee, 0x1cf2, 1},
+ {0x2000, 0x200b, 1},
+ {0x200e, 0x2064, 1},
+ {0x206a, 0x2070, 1},
+ {0x2074, 0x207e, 1},
+ {0x2080, 0x208e, 1},
+ {0x20a0, 0x20b8, 1},
+ {0x2100, 0x2125, 1},
+ {0x2127, 0x2129, 1},
+ {0x212c, 0x2131, 1},
+ {0x2133, 0x214d, 1},
+ {0x214f, 0x215f, 1},
+ {0x2189, 0x2189, 1},
+ {0x2190, 0x23e8, 1},
+ {0x2400, 0x2426, 1},
+ {0x2440, 0x244a, 1},
+ {0x2460, 0x26cd, 1},
+ {0x26cf, 0x26e1, 1},
+ {0x26e3, 0x26e3, 1},
+ {0x26e8, 0x26ff, 1},
+ {0x2701, 0x2704, 1},
+ {0x2706, 0x2709, 1},
+ {0x270c, 0x2727, 1},
+ {0x2729, 0x274b, 1},
+ {0x274d, 0x274d, 1},
+ {0x274f, 0x2752, 1},
+ {0x2756, 0x275e, 1},
+ {0x2761, 0x2794, 1},
+ {0x2798, 0x27af, 1},
+ {0x27b1, 0x27be, 1},
+ {0x27c0, 0x27ca, 1},
+ {0x27cc, 0x27cc, 1},
+ {0x27d0, 0x27ff, 1},
+ {0x2900, 0x2b4c, 1},
+ {0x2b50, 0x2b59, 1},
+ {0x2e00, 0x2e31, 1},
+ {0x2ff0, 0x2ffb, 1},
+ {0x3000, 0x3004, 1},
+ {0x3006, 0x3006, 1},
+ {0x3008, 0x3020, 1},
+ {0x3030, 0x3037, 1},
+ {0x303c, 0x303f, 1},
+ {0x309b, 0x309c, 1},
+ {0x30a0, 0x30a0, 1},
+ {0x30fb, 0x30fc, 1},
+ {0x3190, 0x319f, 1},
+ {0x31c0, 0x31e3, 1},
+ {0x3220, 0x325f, 1},
+ {0x327f, 0x32cf, 1},
+ {0x3358, 0x33ff, 1},
+ {0x4dc0, 0x4dff, 1},
+ {0xa700, 0xa721, 1},
+ {0xa788, 0xa78a, 1},
+ {0xa830, 0xa839, 1},
+ {0xfd3e, 0xfd3f, 1},
+ {0xfdfd, 0xfdfd, 1},
+ {0xfe10, 0xfe19, 1},
+ {0xfe30, 0xfe52, 1},
+ {0xfe54, 0xfe66, 1},
+ {0xfe68, 0xfe6b, 1},
+ {0xfeff, 0xfeff, 1},
+ {0xff01, 0xff20, 1},
+ {0xff3b, 0xff40, 1},
+ {0xff5b, 0xff65, 1},
+ {0xff70, 0xff70, 1},
+ {0xff9e, 0xff9f, 1},
+ {0xffe0, 0xffe6, 1},
+ {0xffe8, 0xffee, 1},
+ {0xfff9, 0xfffd, 1},
+ {0x10100, 0x10102, 1},
+ {0x10107, 0x10133, 1},
+ {0x10137, 0x1013f, 1},
+ {0x10190, 0x1019b, 1},
+ {0x101d0, 0x101fc, 1},
+ {0x1d000, 0x1d0f5, 1},
+ {0x1d100, 0x1d126, 1},
+ {0x1d129, 0x1d166, 1},
+ {0x1d16a, 0x1d17a, 1},
+ {0x1d183, 0x1d184, 1},
+ {0x1d18c, 0x1d1a9, 1},
+ {0x1d1ae, 0x1d1dd, 1},
+ {0x1d300, 0x1d356, 1},
+ {0x1d360, 0x1d371, 1},
+ {0x1d400, 0x1d454, 1},
+ {0x1d456, 0x1d49c, 1},
+ {0x1d49e, 0x1d49f, 1},
+ {0x1d4a2, 0x1d4a2, 1},
+ {0x1d4a5, 0x1d4a6, 1},
+ {0x1d4a9, 0x1d4ac, 1},
+ {0x1d4ae, 0x1d4b9, 1},
+ {0x1d4bb, 0x1d4bb, 1},
+ {0x1d4bd, 0x1d4c3, 1},
+ {0x1d4c5, 0x1d505, 1},
+ {0x1d507, 0x1d50a, 1},
+ {0x1d50d, 0x1d514, 1},
+ {0x1d516, 0x1d51c, 1},
+ {0x1d51e, 0x1d539, 1},
+ {0x1d53b, 0x1d53e, 1},
+ {0x1d540, 0x1d544, 1},
+ {0x1d546, 0x1d546, 1},
+ {0x1d54a, 0x1d550, 1},
+ {0x1d552, 0x1d6a5, 1},
+ {0x1d6a8, 0x1d7cb, 1},
+ {0x1d7ce, 0x1d7ff, 1},
+ {0x1f000, 0x1f02b, 1},
+ {0x1f030, 0x1f093, 1},
+ {0x1f100, 0x1f10a, 1},
+ {0x1f110, 0x1f12e, 1},
+ {0x1f131, 0x1f131, 1},
+ {0x1f13d, 0x1f13d, 1},
+ {0x1f13f, 0x1f13f, 1},
+ {0x1f142, 0x1f142, 1},
+ {0x1f146, 0x1f146, 1},
+ {0x1f14a, 0x1f14e, 1},
+ {0x1f157, 0x1f157, 1},
+ {0x1f15f, 0x1f15f, 1},
+ {0x1f179, 0x1f179, 1},
+ {0x1f17b, 0x1f17c, 1},
+ {0x1f17f, 0x1f17f, 1},
+ {0x1f18a, 0x1f18d, 1},
+ {0x1f190, 0x1f190, 1},
+ {0x1f210, 0x1f231, 1},
+ {0x1f240, 0x1f248, 1},
+ {0xe0001, 0xe0001, 1},
+ {0xe0020, 0xe007f, 1},
}
var _Kannada = []Range{
- Range{0x0c82, 0x0c83, 1},
- Range{0x0c85, 0x0c8c, 1},
- Range{0x0c8e, 0x0c90, 1},
- Range{0x0c92, 0x0ca8, 1},
- Range{0x0caa, 0x0cb3, 1},
- Range{0x0cb5, 0x0cb9, 1},
- Range{0x0cbc, 0x0cc4, 1},
- Range{0x0cc6, 0x0cc8, 1},
- Range{0x0cca, 0x0ccd, 1},
- Range{0x0cd5, 0x0cd6, 1},
- Range{0x0cde, 0x0cde, 1},
- Range{0x0ce0, 0x0ce3, 1},
- Range{0x0ce6, 0x0cef, 1},
+ {0x0c82, 0x0c83, 1},
+ {0x0c85, 0x0c8c, 1},
+ {0x0c8e, 0x0c90, 1},
+ {0x0c92, 0x0ca8, 1},
+ {0x0caa, 0x0cb3, 1},
+ {0x0cb5, 0x0cb9, 1},
+ {0x0cbc, 0x0cc4, 1},
+ {0x0cc6, 0x0cc8, 1},
+ {0x0cca, 0x0ccd, 1},
+ {0x0cd5, 0x0cd6, 1},
+ {0x0cde, 0x0cde, 1},
+ {0x0ce0, 0x0ce3, 1},
+ {0x0ce6, 0x0cef, 1},
}
var _Old_Turkic = []Range{
- Range{0x10c00, 0x10c48, 1},
+ {0x10c00, 0x10c48, 1},
}
var _Tamil = []Range{
- Range{0x0b82, 0x0b83, 1},
- Range{0x0b85, 0x0b8a, 1},
- Range{0x0b8e, 0x0b90, 1},
- Range{0x0b92, 0x0b95, 1},
- Range{0x0b99, 0x0b9a, 1},
- Range{0x0b9c, 0x0b9c, 1},
- Range{0x0b9e, 0x0b9f, 1},
- Range{0x0ba3, 0x0ba4, 1},
- Range{0x0ba8, 0x0baa, 1},
- Range{0x0bae, 0x0bb9, 1},
- Range{0x0bbe, 0x0bc2, 1},
- Range{0x0bc6, 0x0bc8, 1},
- Range{0x0bca, 0x0bcd, 1},
- Range{0x0bd0, 0x0bd0, 1},
- Range{0x0bd7, 0x0bd7, 1},
- Range{0x0be6, 0x0bfa, 1},
+ {0x0b82, 0x0b83, 1},
+ {0x0b85, 0x0b8a, 1},
+ {0x0b8e, 0x0b90, 1},
+ {0x0b92, 0x0b95, 1},
+ {0x0b99, 0x0b9a, 1},
+ {0x0b9c, 0x0b9c, 1},
+ {0x0b9e, 0x0b9f, 1},
+ {0x0ba3, 0x0ba4, 1},
+ {0x0ba8, 0x0baa, 1},
+ {0x0bae, 0x0bb9, 1},
+ {0x0bbe, 0x0bc2, 1},
+ {0x0bc6, 0x0bc8, 1},
+ {0x0bca, 0x0bcd, 1},
+ {0x0bd0, 0x0bd0, 1},
+ {0x0bd7, 0x0bd7, 1},
+ {0x0be6, 0x0bfa, 1},
}
var _Tagalog = []Range{
- Range{0x1700, 0x170c, 1},
- Range{0x170e, 0x1714, 1},
+ {0x1700, 0x170c, 1},
+ {0x170e, 0x1714, 1},
}
var _Arabic = []Range{
- Range{0x0606, 0x060b, 1},
- Range{0x060d, 0x061a, 1},
- Range{0x061e, 0x061e, 1},
- Range{0x0621, 0x063f, 1},
- Range{0x0641, 0x064a, 1},
- Range{0x0656, 0x065e, 1},
- Range{0x066a, 0x066f, 1},
- Range{0x0671, 0x06dc, 1},
- Range{0x06de, 0x06ff, 1},
- Range{0x0750, 0x077f, 1},
- Range{0xfb50, 0xfbb1, 1},
- Range{0xfbd3, 0xfd3d, 1},
- Range{0xfd50, 0xfd8f, 1},
- Range{0xfd92, 0xfdc7, 1},
- Range{0xfdf0, 0xfdfc, 1},
- Range{0xfe70, 0xfe74, 1},
- Range{0xfe76, 0xfefc, 1},
- Range{0x10e60, 0x10e7e, 1},
+ {0x0606, 0x060b, 1},
+ {0x060d, 0x061a, 1},
+ {0x061e, 0x061e, 1},
+ {0x0621, 0x063f, 1},
+ {0x0641, 0x064a, 1},
+ {0x0656, 0x065e, 1},
+ {0x066a, 0x066f, 1},
+ {0x0671, 0x06dc, 1},
+ {0x06de, 0x06ff, 1},
+ {0x0750, 0x077f, 1},
+ {0xfb50, 0xfbb1, 1},
+ {0xfbd3, 0xfd3d, 1},
+ {0xfd50, 0xfd8f, 1},
+ {0xfd92, 0xfdc7, 1},
+ {0xfdf0, 0xfdfc, 1},
+ {0xfe70, 0xfe74, 1},
+ {0xfe76, 0xfefc, 1},
+ {0x10e60, 0x10e7e, 1},
}
var _Tagbanwa = []Range{
- Range{0x1760, 0x176c, 1},
- Range{0x176e, 0x1770, 1},
- Range{0x1772, 0x1773, 1},
+ {0x1760, 0x176c, 1},
+ {0x176e, 0x1770, 1},
+ {0x1772, 0x1773, 1},
}
var _Canadian_Aboriginal = []Range{
- Range{0x1400, 0x167f, 1},
- Range{0x18b0, 0x18f5, 1},
+ {0x1400, 0x167f, 1},
+ {0x18b0, 0x18f5, 1},
}
var _Tibetan = []Range{
- Range{0x0f00, 0x0f47, 1},
- Range{0x0f49, 0x0f6c, 1},
- Range{0x0f71, 0x0f8b, 1},
- Range{0x0f90, 0x0f97, 1},
- Range{0x0f99, 0x0fbc, 1},
- Range{0x0fbe, 0x0fcc, 1},
- Range{0x0fce, 0x0fd4, 1},
+ {0x0f00, 0x0f47, 1},
+ {0x0f49, 0x0f6c, 1},
+ {0x0f71, 0x0f8b, 1},
+ {0x0f90, 0x0f97, 1},
+ {0x0f99, 0x0fbc, 1},
+ {0x0fbe, 0x0fcc, 1},
+ {0x0fce, 0x0fd4, 1},
}
var _Coptic = []Range{
- Range{0x03e2, 0x03ef, 1},
- Range{0x2c80, 0x2cf1, 1},
- Range{0x2cf9, 0x2cff, 1},
+ {0x03e2, 0x03ef, 1},
+ {0x2c80, 0x2cf1, 1},
+ {0x2cf9, 0x2cff, 1},
}
var _Hiragana = []Range{
- Range{0x3041, 0x3096, 1},
- Range{0x309d, 0x309f, 1},
- Range{0x1f200, 0x1f200, 1},
+ {0x3041, 0x3096, 1},
+ {0x309d, 0x309f, 1},
+ {0x1f200, 0x1f200, 1},
}
var _Limbu = []Range{
- Range{0x1900, 0x191c, 1},
- Range{0x1920, 0x192b, 1},
- Range{0x1930, 0x193b, 1},
- Range{0x1940, 0x1940, 1},
- Range{0x1944, 0x194f, 1},
+ {0x1900, 0x191c, 1},
+ {0x1920, 0x192b, 1},
+ {0x1930, 0x193b, 1},
+ {0x1940, 0x1940, 1},
+ {0x1944, 0x194f, 1},
}
var _Egyptian_Hieroglyphs = []Range{
- Range{0x13000, 0x1342e, 1},
+ {0x13000, 0x1342e, 1},
}
var _Avestan = []Range{
- Range{0x10b00, 0x10b35, 1},
- Range{0x10b39, 0x10b3f, 1},
+ {0x10b00, 0x10b35, 1},
+ {0x10b39, 0x10b3f, 1},
}
var _Myanmar = []Range{
- Range{0x1000, 0x109f, 1},
- Range{0xaa60, 0xaa7b, 1},
+ {0x1000, 0x109f, 1},
+ {0xaa60, 0xaa7b, 1},
}
var _Armenian = []Range{
- Range{0x0531, 0x0556, 1},
- Range{0x0559, 0x055f, 1},
- Range{0x0561, 0x0587, 1},
- Range{0x058a, 0x058a, 1},
- Range{0xfb13, 0xfb17, 1},
+ {0x0531, 0x0556, 1},
+ {0x0559, 0x055f, 1},
+ {0x0561, 0x0587, 1},
+ {0x058a, 0x058a, 1},
+ {0xfb13, 0xfb17, 1},
}
var _Sinhala = []Range{
- Range{0x0d82, 0x0d83, 1},
- Range{0x0d85, 0x0d96, 1},
- Range{0x0d9a, 0x0db1, 1},
- Range{0x0db3, 0x0dbb, 1},
- Range{0x0dbd, 0x0dbd, 1},
- Range{0x0dc0, 0x0dc6, 1},
- Range{0x0dca, 0x0dca, 1},
- Range{0x0dcf, 0x0dd4, 1},
- Range{0x0dd6, 0x0dd6, 1},
- Range{0x0dd8, 0x0ddf, 1},
- Range{0x0df2, 0x0df4, 1},
+ {0x0d82, 0x0d83, 1},
+ {0x0d85, 0x0d96, 1},
+ {0x0d9a, 0x0db1, 1},
+ {0x0db3, 0x0dbb, 1},
+ {0x0dbd, 0x0dbd, 1},
+ {0x0dc0, 0x0dc6, 1},
+ {0x0dca, 0x0dca, 1},
+ {0x0dcf, 0x0dd4, 1},
+ {0x0dd6, 0x0dd6, 1},
+ {0x0dd8, 0x0ddf, 1},
+ {0x0df2, 0x0df4, 1},
}
var _Bengali = []Range{
- Range{0x0981, 0x0983, 1},
- Range{0x0985, 0x098c, 1},
- Range{0x098f, 0x0990, 1},
- Range{0x0993, 0x09a8, 1},
- Range{0x09aa, 0x09b0, 1},
- Range{0x09b2, 0x09b2, 1},
- Range{0x09b6, 0x09b9, 1},
- Range{0x09bc, 0x09c4, 1},
- Range{0x09c7, 0x09c8, 1},
- Range{0x09cb, 0x09ce, 1},
- Range{0x09d7, 0x09d7, 1},
- Range{0x09dc, 0x09dd, 1},
- Range{0x09df, 0x09e3, 1},
- Range{0x09e6, 0x09fb, 1},
+ {0x0981, 0x0983, 1},
+ {0x0985, 0x098c, 1},
+ {0x098f, 0x0990, 1},
+ {0x0993, 0x09a8, 1},
+ {0x09aa, 0x09b0, 1},
+ {0x09b2, 0x09b2, 1},
+ {0x09b6, 0x09b9, 1},
+ {0x09bc, 0x09c4, 1},
+ {0x09c7, 0x09c8, 1},
+ {0x09cb, 0x09ce, 1},
+ {0x09d7, 0x09d7, 1},
+ {0x09dc, 0x09dd, 1},
+ {0x09df, 0x09e3, 1},
+ {0x09e6, 0x09fb, 1},
}
var _Greek = []Range{
- Range{0x0370, 0x0373, 1},
- Range{0x0375, 0x0377, 1},
- Range{0x037a, 0x037d, 1},
- Range{0x0384, 0x0384, 1},
- Range{0x0386, 0x0386, 1},
- Range{0x0388, 0x038a, 1},
- Range{0x038c, 0x038c, 1},
- Range{0x038e, 0x03a1, 1},
- Range{0x03a3, 0x03e1, 1},
- Range{0x03f0, 0x03ff, 1},
- Range{0x1d26, 0x1d2a, 1},
- Range{0x1d5d, 0x1d61, 1},
- Range{0x1d66, 0x1d6a, 1},
- Range{0x1dbf, 0x1dbf, 1},
- Range{0x1f00, 0x1f15, 1},
- Range{0x1f18, 0x1f1d, 1},
- Range{0x1f20, 0x1f45, 1},
- Range{0x1f48, 0x1f4d, 1},
- Range{0x1f50, 0x1f57, 1},
- Range{0x1f59, 0x1f59, 1},
- Range{0x1f5b, 0x1f5b, 1},
- Range{0x1f5d, 0x1f5d, 1},
- Range{0x1f5f, 0x1f7d, 1},
- Range{0x1f80, 0x1fb4, 1},
- Range{0x1fb6, 0x1fc4, 1},
- Range{0x1fc6, 0x1fd3, 1},
- Range{0x1fd6, 0x1fdb, 1},
- Range{0x1fdd, 0x1fef, 1},
- Range{0x1ff2, 0x1ff4, 1},
- Range{0x1ff6, 0x1ffe, 1},
- Range{0x2126, 0x2126, 1},
- Range{0x10140, 0x1018a, 1},
- Range{0x1d200, 0x1d245, 1},
+ {0x0370, 0x0373, 1},
+ {0x0375, 0x0377, 1},
+ {0x037a, 0x037d, 1},
+ {0x0384, 0x0384, 1},
+ {0x0386, 0x0386, 1},
+ {0x0388, 0x038a, 1},
+ {0x038c, 0x038c, 1},
+ {0x038e, 0x03a1, 1},
+ {0x03a3, 0x03e1, 1},
+ {0x03f0, 0x03ff, 1},
+ {0x1d26, 0x1d2a, 1},
+ {0x1d5d, 0x1d61, 1},
+ {0x1d66, 0x1d6a, 1},
+ {0x1dbf, 0x1dbf, 1},
+ {0x1f00, 0x1f15, 1},
+ {0x1f18, 0x1f1d, 1},
+ {0x1f20, 0x1f45, 1},
+ {0x1f48, 0x1f4d, 1},
+ {0x1f50, 0x1f57, 1},
+ {0x1f59, 0x1f59, 1},
+ {0x1f5b, 0x1f5b, 1},
+ {0x1f5d, 0x1f5d, 1},
+ {0x1f5f, 0x1f7d, 1},
+ {0x1f80, 0x1fb4, 1},
+ {0x1fb6, 0x1fc4, 1},
+ {0x1fc6, 0x1fd3, 1},
+ {0x1fd6, 0x1fdb, 1},
+ {0x1fdd, 0x1fef, 1},
+ {0x1ff2, 0x1ff4, 1},
+ {0x1ff6, 0x1ffe, 1},
+ {0x2126, 0x2126, 1},
+ {0x10140, 0x1018a, 1},
+ {0x1d200, 0x1d245, 1},
}
var _Cham = []Range{
- Range{0xaa00, 0xaa36, 1},
- Range{0xaa40, 0xaa4d, 1},
- Range{0xaa50, 0xaa59, 1},
- Range{0xaa5c, 0xaa5f, 1},
+ {0xaa00, 0xaa36, 1},
+ {0xaa40, 0xaa4d, 1},
+ {0xaa50, 0xaa59, 1},
+ {0xaa5c, 0xaa5f, 1},
}
var _Hebrew = []Range{
- Range{0x0591, 0x05c7, 1},
- Range{0x05d0, 0x05ea, 1},
- Range{0x05f0, 0x05f4, 1},
- Range{0xfb1d, 0xfb36, 1},
- Range{0xfb38, 0xfb3c, 1},
- Range{0xfb3e, 0xfb3e, 1},
- Range{0xfb40, 0xfb41, 1},
- Range{0xfb43, 0xfb44, 1},
- Range{0xfb46, 0xfb4f, 1},
+ {0x0591, 0x05c7, 1},
+ {0x05d0, 0x05ea, 1},
+ {0x05f0, 0x05f4, 1},
+ {0xfb1d, 0xfb36, 1},
+ {0xfb38, 0xfb3c, 1},
+ {0xfb3e, 0xfb3e, 1},
+ {0xfb40, 0xfb41, 1},
+ {0xfb43, 0xfb44, 1},
+ {0xfb46, 0xfb4f, 1},
}
var _Meetei_Mayek = []Range{
- Range{0xabc0, 0xabed, 1},
- Range{0xabf0, 0xabf9, 1},
+ {0xabc0, 0xabed, 1},
+ {0xabf0, 0xabf9, 1},
}
var _Saurashtra = []Range{
- Range{0xa880, 0xa8c4, 1},
- Range{0xa8ce, 0xa8d9, 1},
+ {0xa880, 0xa8c4, 1},
+ {0xa8ce, 0xa8d9, 1},
}
var _Hangul = []Range{
- Range{0x1100, 0x11ff, 1},
- Range{0x3131, 0x318e, 1},
- Range{0x3200, 0x321e, 1},
- Range{0x3260, 0x327e, 1},
- Range{0xa960, 0xa97c, 1},
- Range{0xac00, 0xd7a3, 1},
- Range{0xd7b0, 0xd7c6, 1},
- Range{0xd7cb, 0xd7fb, 1},
- Range{0xffa0, 0xffbe, 1},
- Range{0xffc2, 0xffc7, 1},
- Range{0xffca, 0xffcf, 1},
- Range{0xffd2, 0xffd7, 1},
- Range{0xffda, 0xffdc, 1},
+ {0x1100, 0x11ff, 1},
+ {0x3131, 0x318e, 1},
+ {0x3200, 0x321e, 1},
+ {0x3260, 0x327e, 1},
+ {0xa960, 0xa97c, 1},
+ {0xac00, 0xd7a3, 1},
+ {0xd7b0, 0xd7c6, 1},
+ {0xd7cb, 0xd7fb, 1},
+ {0xffa0, 0xffbe, 1},
+ {0xffc2, 0xffc7, 1},
+ {0xffca, 0xffcf, 1},
+ {0xffd2, 0xffd7, 1},
+ {0xffda, 0xffdc, 1},
}
var _Runic = []Range{
- Range{0x16a0, 0x16ea, 1},
- Range{0x16ee, 0x16f0, 1},
+ {0x16a0, 0x16ea, 1},
+ {0x16ee, 0x16f0, 1},
}
var _Deseret = []Range{
- Range{0x10400, 0x1044f, 1},
+ {0x10400, 0x1044f, 1},
}
var _Lisu = []Range{
- Range{0xa4d0, 0xa4ff, 1},
+ {0xa4d0, 0xa4ff, 1},
}
var _Sundanese = []Range{
- Range{0x1b80, 0x1baa, 1},
- Range{0x1bae, 0x1bb9, 1},
+ {0x1b80, 0x1baa, 1},
+ {0x1bae, 0x1bb9, 1},
}
var _Glagolitic = []Range{
- Range{0x2c00, 0x2c2e, 1},
- Range{0x2c30, 0x2c5e, 1},
+ {0x2c00, 0x2c2e, 1},
+ {0x2c30, 0x2c5e, 1},
}
var _Oriya = []Range{
- Range{0x0b01, 0x0b03, 1},
- Range{0x0b05, 0x0b0c, 1},
- Range{0x0b0f, 0x0b10, 1},
- Range{0x0b13, 0x0b28, 1},
- Range{0x0b2a, 0x0b30, 1},
- Range{0x0b32, 0x0b33, 1},
- Range{0x0b35, 0x0b39, 1},
- Range{0x0b3c, 0x0b44, 1},
- Range{0x0b47, 0x0b48, 1},
- Range{0x0b4b, 0x0b4d, 1},
- Range{0x0b56, 0x0b57, 1},
- Range{0x0b5c, 0x0b5d, 1},
- Range{0x0b5f, 0x0b63, 1},
- Range{0x0b66, 0x0b71, 1},
+ {0x0b01, 0x0b03, 1},
+ {0x0b05, 0x0b0c, 1},
+ {0x0b0f, 0x0b10, 1},
+ {0x0b13, 0x0b28, 1},
+ {0x0b2a, 0x0b30, 1},
+ {0x0b32, 0x0b33, 1},
+ {0x0b35, 0x0b39, 1},
+ {0x0b3c, 0x0b44, 1},
+ {0x0b47, 0x0b48, 1},
+ {0x0b4b, 0x0b4d, 1},
+ {0x0b56, 0x0b57, 1},
+ {0x0b5c, 0x0b5d, 1},
+ {0x0b5f, 0x0b63, 1},
+ {0x0b66, 0x0b71, 1},
}
var _Buhid = []Range{
- Range{0x1740, 0x1753, 1},
+ {0x1740, 0x1753, 1},
}
var _Ethiopic = []Range{
- Range{0x1200, 0x1248, 1},
- Range{0x124a, 0x124d, 1},
- Range{0x1250, 0x1256, 1},
- Range{0x1258, 0x1258, 1},
- Range{0x125a, 0x125d, 1},
- Range{0x1260, 0x1288, 1},
- Range{0x128a, 0x128d, 1},
- Range{0x1290, 0x12b0, 1},
- Range{0x12b2, 0x12b5, 1},
- Range{0x12b8, 0x12be, 1},
- Range{0x12c0, 0x12c0, 1},
- Range{0x12c2, 0x12c5, 1},
- Range{0x12c8, 0x12d6, 1},
- Range{0x12d8, 0x1310, 1},
- Range{0x1312, 0x1315, 1},
- Range{0x1318, 0x135a, 1},
- Range{0x135f, 0x137c, 1},
- Range{0x1380, 0x1399, 1},
- Range{0x2d80, 0x2d96, 1},
- Range{0x2da0, 0x2da6, 1},
- Range{0x2da8, 0x2dae, 1},
- Range{0x2db0, 0x2db6, 1},
- Range{0x2db8, 0x2dbe, 1},
- Range{0x2dc0, 0x2dc6, 1},
- Range{0x2dc8, 0x2dce, 1},
- Range{0x2dd0, 0x2dd6, 1},
- Range{0x2dd8, 0x2dde, 1},
+ {0x1200, 0x1248, 1},
+ {0x124a, 0x124d, 1},
+ {0x1250, 0x1256, 1},
+ {0x1258, 0x1258, 1},
+ {0x125a, 0x125d, 1},
+ {0x1260, 0x1288, 1},
+ {0x128a, 0x128d, 1},
+ {0x1290, 0x12b0, 1},
+ {0x12b2, 0x12b5, 1},
+ {0x12b8, 0x12be, 1},
+ {0x12c0, 0x12c0, 1},
+ {0x12c2, 0x12c5, 1},
+ {0x12c8, 0x12d6, 1},
+ {0x12d8, 0x1310, 1},
+ {0x1312, 0x1315, 1},
+ {0x1318, 0x135a, 1},
+ {0x135f, 0x137c, 1},
+ {0x1380, 0x1399, 1},
+ {0x2d80, 0x2d96, 1},
+ {0x2da0, 0x2da6, 1},
+ {0x2da8, 0x2dae, 1},
+ {0x2db0, 0x2db6, 1},
+ {0x2db8, 0x2dbe, 1},
+ {0x2dc0, 0x2dc6, 1},
+ {0x2dc8, 0x2dce, 1},
+ {0x2dd0, 0x2dd6, 1},
+ {0x2dd8, 0x2dde, 1},
}
var _Javanese = []Range{
- Range{0xa980, 0xa9cd, 1},
- Range{0xa9cf, 0xa9d9, 1},
- Range{0xa9de, 0xa9df, 1},
+ {0xa980, 0xa9cd, 1},
+ {0xa9cf, 0xa9d9, 1},
+ {0xa9de, 0xa9df, 1},
}
var _Syloti_Nagri = []Range{
- Range{0xa800, 0xa82b, 1},
+ {0xa800, 0xa82b, 1},
}
var _Vai = []Range{
- Range{0xa500, 0xa62b, 1},
+ {0xa500, 0xa62b, 1},
}
var _Cherokee = []Range{
- Range{0x13a0, 0x13f4, 1},
+ {0x13a0, 0x13f4, 1},
}
var _Ogham = []Range{
- Range{0x1680, 0x169c, 1},
+ {0x1680, 0x169c, 1},
}
var _Syriac = []Range{
- Range{0x0700, 0x070d, 1},
- Range{0x070f, 0x074a, 1},
- Range{0x074d, 0x074f, 1},
+ {0x0700, 0x070d, 1},
+ {0x070f, 0x074a, 1},
+ {0x074d, 0x074f, 1},
}
var _Gurmukhi = []Range{
- Range{0x0a01, 0x0a03, 1},
- Range{0x0a05, 0x0a0a, 1},
- Range{0x0a0f, 0x0a10, 1},
- Range{0x0a13, 0x0a28, 1},
- Range{0x0a2a, 0x0a30, 1},
- Range{0x0a32, 0x0a33, 1},
- Range{0x0a35, 0x0a36, 1},
- Range{0x0a38, 0x0a39, 1},
- Range{0x0a3c, 0x0a3c, 1},
- Range{0x0a3e, 0x0a42, 1},
- Range{0x0a47, 0x0a48, 1},
- Range{0x0a4b, 0x0a4d, 1},
- Range{0x0a51, 0x0a51, 1},
- Range{0x0a59, 0x0a5c, 1},
- Range{0x0a5e, 0x0a5e, 1},
- Range{0x0a66, 0x0a75, 1},
+ {0x0a01, 0x0a03, 1},
+ {0x0a05, 0x0a0a, 1},
+ {0x0a0f, 0x0a10, 1},
+ {0x0a13, 0x0a28, 1},
+ {0x0a2a, 0x0a30, 1},
+ {0x0a32, 0x0a33, 1},
+ {0x0a35, 0x0a36, 1},
+ {0x0a38, 0x0a39, 1},
+ {0x0a3c, 0x0a3c, 1},
+ {0x0a3e, 0x0a42, 1},
+ {0x0a47, 0x0a48, 1},
+ {0x0a4b, 0x0a4d, 1},
+ {0x0a51, 0x0a51, 1},
+ {0x0a59, 0x0a5c, 1},
+ {0x0a5e, 0x0a5e, 1},
+ {0x0a66, 0x0a75, 1},
}
var _Tai_Tham = []Range{
- Range{0x1a20, 0x1a5e, 1},
- Range{0x1a60, 0x1a7c, 1},
- Range{0x1a7f, 0x1a89, 1},
- Range{0x1a90, 0x1a99, 1},
- Range{0x1aa0, 0x1aad, 1},
+ {0x1a20, 0x1a5e, 1},
+ {0x1a60, 0x1a7c, 1},
+ {0x1a7f, 0x1a89, 1},
+ {0x1a90, 0x1a99, 1},
+ {0x1aa0, 0x1aad, 1},
}
var _Ol_Chiki = []Range{
- Range{0x1c50, 0x1c7f, 1},
+ {0x1c50, 0x1c7f, 1},
}
var _Mongolian = []Range{
- Range{0x1800, 0x1801, 1},
- Range{0x1804, 0x1804, 1},
- Range{0x1806, 0x180e, 1},
- Range{0x1810, 0x1819, 1},
- Range{0x1820, 0x1877, 1},
- Range{0x1880, 0x18aa, 1},
+ {0x1800, 0x1801, 1},
+ {0x1804, 0x1804, 1},
+ {0x1806, 0x180e, 1},
+ {0x1810, 0x1819, 1},
+ {0x1820, 0x1877, 1},
+ {0x1880, 0x18aa, 1},
}
var _Hanunoo = []Range{
- Range{0x1720, 0x1734, 1},
+ {0x1720, 0x1734, 1},
}
var _Cypriot = []Range{
- Range{0x10800, 0x10805, 1},
- Range{0x10808, 0x10808, 1},
- Range{0x1080a, 0x10835, 1},
- Range{0x10837, 0x10838, 1},
- Range{0x1083c, 0x1083c, 1},
- Range{0x1083f, 0x1083f, 1},
+ {0x10800, 0x10805, 1},
+ {0x10808, 0x10808, 1},
+ {0x1080a, 0x10835, 1},
+ {0x10837, 0x10838, 1},
+ {0x1083c, 0x1083c, 1},
+ {0x1083f, 0x1083f, 1},
}
var _Buginese = []Range{
- Range{0x1a00, 0x1a1b, 1},
- Range{0x1a1e, 0x1a1f, 1},
+ {0x1a00, 0x1a1b, 1},
+ {0x1a1e, 0x1a1f, 1},
}
var _Bamum = []Range{
- Range{0xa6a0, 0xa6f7, 1},
+ {0xa6a0, 0xa6f7, 1},
}
var _Lepcha = []Range{
- Range{0x1c00, 0x1c37, 1},
- Range{0x1c3b, 0x1c49, 1},
- Range{0x1c4d, 0x1c4f, 1},
+ {0x1c00, 0x1c37, 1},
+ {0x1c3b, 0x1c49, 1},
+ {0x1c4d, 0x1c4f, 1},
}
var _Thaana = []Range{
- Range{0x0780, 0x07b1, 1},
+ {0x0780, 0x07b1, 1},
}
var _Old_Persian = []Range{
- Range{0x103a0, 0x103c3, 1},
- Range{0x103c8, 0x103d5, 1},
+ {0x103a0, 0x103c3, 1},
+ {0x103c8, 0x103d5, 1},
}
var _Cuneiform = []Range{
- Range{0x12000, 0x1236e, 1},
- Range{0x12400, 0x12462, 1},
- Range{0x12470, 0x12473, 1},
+ {0x12000, 0x1236e, 1},
+ {0x12400, 0x12462, 1},
+ {0x12470, 0x12473, 1},
}
var _Rejang = []Range{
- Range{0xa930, 0xa953, 1},
- Range{0xa95f, 0xa95f, 1},
+ {0xa930, 0xa953, 1},
+ {0xa95f, 0xa95f, 1},
}
var _Georgian = []Range{
- Range{0x10a0, 0x10c5, 1},
- Range{0x10d0, 0x10fa, 1},
- Range{0x10fc, 0x10fc, 1},
- Range{0x2d00, 0x2d25, 1},
+ {0x10a0, 0x10c5, 1},
+ {0x10d0, 0x10fa, 1},
+ {0x10fc, 0x10fc, 1},
+ {0x2d00, 0x2d25, 1},
}
var _Shavian = []Range{
- Range{0x10450, 0x1047f, 1},
+ {0x10450, 0x1047f, 1},
}
var _Lycian = []Range{
- Range{0x10280, 0x1029c, 1},
+ {0x10280, 0x1029c, 1},
}
var _Nko = []Range{
- Range{0x07c0, 0x07fa, 1},
+ {0x07c0, 0x07fa, 1},
}
var _Yi = []Range{
- Range{0xa000, 0xa48c, 1},
- Range{0xa490, 0xa4c6, 1},
+ {0xa000, 0xa48c, 1},
+ {0xa490, 0xa4c6, 1},
}
var _Lao = []Range{
- Range{0x0e81, 0x0e82, 1},
- Range{0x0e84, 0x0e84, 1},
- Range{0x0e87, 0x0e88, 1},
- Range{0x0e8a, 0x0e8a, 1},
- Range{0x0e8d, 0x0e8d, 1},
- Range{0x0e94, 0x0e97, 1},
- Range{0x0e99, 0x0e9f, 1},
- Range{0x0ea1, 0x0ea3, 1},
- Range{0x0ea5, 0x0ea5, 1},
- Range{0x0ea7, 0x0ea7, 1},
- Range{0x0eaa, 0x0eab, 1},
- Range{0x0ead, 0x0eb9, 1},
- Range{0x0ebb, 0x0ebd, 1},
- Range{0x0ec0, 0x0ec4, 1},
- Range{0x0ec6, 0x0ec6, 1},
- Range{0x0ec8, 0x0ecd, 1},
- Range{0x0ed0, 0x0ed9, 1},
- Range{0x0edc, 0x0edd, 1},
+ {0x0e81, 0x0e82, 1},
+ {0x0e84, 0x0e84, 1},
+ {0x0e87, 0x0e88, 1},
+ {0x0e8a, 0x0e8a, 1},
+ {0x0e8d, 0x0e8d, 1},
+ {0x0e94, 0x0e97, 1},
+ {0x0e99, 0x0e9f, 1},
+ {0x0ea1, 0x0ea3, 1},
+ {0x0ea5, 0x0ea5, 1},
+ {0x0ea7, 0x0ea7, 1},
+ {0x0eaa, 0x0eab, 1},
+ {0x0ead, 0x0eb9, 1},
+ {0x0ebb, 0x0ebd, 1},
+ {0x0ec0, 0x0ec4, 1},
+ {0x0ec6, 0x0ec6, 1},
+ {0x0ec8, 0x0ecd, 1},
+ {0x0ed0, 0x0ed9, 1},
+ {0x0edc, 0x0edd, 1},
}
var _Linear_B = []Range{
- Range{0x10000, 0x1000b, 1},
- Range{0x1000d, 0x10026, 1},
- Range{0x10028, 0x1003a, 1},
- Range{0x1003c, 0x1003d, 1},
- Range{0x1003f, 0x1004d, 1},
- Range{0x10050, 0x1005d, 1},
- Range{0x10080, 0x100fa, 1},
+ {0x10000, 0x1000b, 1},
+ {0x1000d, 0x10026, 1},
+ {0x10028, 0x1003a, 1},
+ {0x1003c, 0x1003d, 1},
+ {0x1003f, 0x1004d, 1},
+ {0x10050, 0x1005d, 1},
+ {0x10080, 0x100fa, 1},
}
var _Old_Italic = []Range{
- Range{0x10300, 0x1031e, 1},
- Range{0x10320, 0x10323, 1},
+ {0x10300, 0x1031e, 1},
+ {0x10320, 0x10323, 1},
}
var _Tai_Viet = []Range{
- Range{0xaa80, 0xaac2, 1},
- Range{0xaadb, 0xaadf, 1},
+ {0xaa80, 0xaac2, 1},
+ {0xaadb, 0xaadf, 1},
}
var _Devanagari = []Range{
- Range{0x0900, 0x0939, 1},
- Range{0x093c, 0x094e, 1},
- Range{0x0950, 0x0950, 1},
- Range{0x0953, 0x0955, 1},
- Range{0x0958, 0x0963, 1},
- Range{0x0966, 0x096f, 1},
- Range{0x0971, 0x0972, 1},
- Range{0x0979, 0x097f, 1},
- Range{0xa8e0, 0xa8fb, 1},
+ {0x0900, 0x0939, 1},
+ {0x093c, 0x094e, 1},
+ {0x0950, 0x0950, 1},
+ {0x0953, 0x0955, 1},
+ {0x0958, 0x0963, 1},
+ {0x0966, 0x096f, 1},
+ {0x0971, 0x0972, 1},
+ {0x0979, 0x097f, 1},
+ {0xa8e0, 0xa8fb, 1},
}
var _Lydian = []Range{
- Range{0x10920, 0x10939, 1},
- Range{0x1093f, 0x1093f, 1},
+ {0x10920, 0x10939, 1},
+ {0x1093f, 0x1093f, 1},
}
var _Tifinagh = []Range{
- Range{0x2d30, 0x2d65, 1},
- Range{0x2d6f, 0x2d6f, 1},
+ {0x2d30, 0x2d65, 1},
+ {0x2d6f, 0x2d6f, 1},
}
var _Ugaritic = []Range{
- Range{0x10380, 0x1039d, 1},
- Range{0x1039f, 0x1039f, 1},
+ {0x10380, 0x1039d, 1},
+ {0x1039f, 0x1039f, 1},
}
var _Thai = []Range{
- Range{0x0e01, 0x0e3a, 1},
- Range{0x0e40, 0x0e5b, 1},
+ {0x0e01, 0x0e3a, 1},
+ {0x0e40, 0x0e5b, 1},
}
var _Cyrillic = []Range{
- Range{0x0400, 0x0484, 1},
- Range{0x0487, 0x0525, 1},
- Range{0x1d2b, 0x1d2b, 1},
- Range{0x1d78, 0x1d78, 1},
- Range{0x2de0, 0x2dff, 1},
- Range{0xa640, 0xa65f, 1},
- Range{0xa662, 0xa673, 1},
- Range{0xa67c, 0xa697, 1},
+ {0x0400, 0x0484, 1},
+ {0x0487, 0x0525, 1},
+ {0x1d2b, 0x1d2b, 1},
+ {0x1d78, 0x1d78, 1},
+ {0x2de0, 0x2dff, 1},
+ {0xa640, 0xa65f, 1},
+ {0xa662, 0xa673, 1},
+ {0xa67c, 0xa697, 1},
}
var _Gujarati = []Range{
- Range{0x0a81, 0x0a83, 1},
- Range{0x0a85, 0x0a8d, 1},
- Range{0x0a8f, 0x0a91, 1},
- Range{0x0a93, 0x0aa8, 1},
- Range{0x0aaa, 0x0ab0, 1},
- Range{0x0ab2, 0x0ab3, 1},
- Range{0x0ab5, 0x0ab9, 1},
- Range{0x0abc, 0x0ac5, 1},
- Range{0x0ac7, 0x0ac9, 1},
- Range{0x0acb, 0x0acd, 1},
- Range{0x0ad0, 0x0ad0, 1},
- Range{0x0ae0, 0x0ae3, 1},
- Range{0x0ae6, 0x0aef, 1},
- Range{0x0af1, 0x0af1, 1},
+ {0x0a81, 0x0a83, 1},
+ {0x0a85, 0x0a8d, 1},
+ {0x0a8f, 0x0a91, 1},
+ {0x0a93, 0x0aa8, 1},
+ {0x0aaa, 0x0ab0, 1},
+ {0x0ab2, 0x0ab3, 1},
+ {0x0ab5, 0x0ab9, 1},
+ {0x0abc, 0x0ac5, 1},
+ {0x0ac7, 0x0ac9, 1},
+ {0x0acb, 0x0acd, 1},
+ {0x0ad0, 0x0ad0, 1},
+ {0x0ae0, 0x0ae3, 1},
+ {0x0ae6, 0x0aef, 1},
+ {0x0af1, 0x0af1, 1},
}
var _Carian = []Range{
- Range{0x102a0, 0x102d0, 1},
+ {0x102a0, 0x102d0, 1},
}
var _Phoenician = []Range{
- Range{0x10900, 0x1091b, 1},
- Range{0x1091f, 0x1091f, 1},
+ {0x10900, 0x1091b, 1},
+ {0x1091f, 0x1091f, 1},
}
var _Balinese = []Range{
- Range{0x1b00, 0x1b4b, 1},
- Range{0x1b50, 0x1b7c, 1},
+ {0x1b00, 0x1b4b, 1},
+ {0x1b50, 0x1b7c, 1},
}
var _Braille = []Range{
- Range{0x2800, 0x28ff, 1},
+ {0x2800, 0x28ff, 1},
}
var _Han = []Range{
- Range{0x2e80, 0x2e99, 1},
- Range{0x2e9b, 0x2ef3, 1},
- Range{0x2f00, 0x2fd5, 1},
- Range{0x3005, 0x3005, 1},
- Range{0x3007, 0x3007, 1},
- Range{0x3021, 0x3029, 1},
- Range{0x3038, 0x303b, 1},
- Range{0x3400, 0x4db5, 1},
- Range{0x4e00, 0x9fcb, 1},
- Range{0xf900, 0xfa2d, 1},
- Range{0xfa30, 0xfa6d, 1},
- Range{0xfa70, 0xfad9, 1},
- Range{0x20000, 0x2a6d6, 1},
- Range{0x2a700, 0x2b734, 1},
- Range{0x2f800, 0x2fa1d, 1},
+ {0x2e80, 0x2e99, 1},
+ {0x2e9b, 0x2ef3, 1},
+ {0x2f00, 0x2fd5, 1},
+ {0x3005, 0x3005, 1},
+ {0x3007, 0x3007, 1},
+ {0x3021, 0x3029, 1},
+ {0x3038, 0x303b, 1},
+ {0x3400, 0x4db5, 1},
+ {0x4e00, 0x9fcb, 1},
+ {0xf900, 0xfa2d, 1},
+ {0xfa30, 0xfa6d, 1},
+ {0xfa70, 0xfad9, 1},
+ {0x20000, 0x2a6d6, 1},
+ {0x2a700, 0x2b734, 1},
+ {0x2f800, 0x2fa1d, 1},
}
var _Gothic = []Range{
- Range{0x10330, 0x1034a, 1},
+ {0x10330, 0x1034a, 1},
}
var (
@@ -3125,821 +3125,821 @@ var Properties = map[string][]Range{
}
var _Pattern_Syntax = []Range{
- Range{0x0021, 0x002f, 1},
- Range{0x003a, 0x0040, 1},
- Range{0x005b, 0x005e, 1},
- Range{0x0060, 0x0060, 1},
- Range{0x007b, 0x007e, 1},
- Range{0x00a1, 0x00a7, 1},
- Range{0x00a9, 0x00a9, 1},
- Range{0x00ab, 0x00ac, 1},
- Range{0x00ae, 0x00ae, 1},
- Range{0x00b0, 0x00b1, 1},
- Range{0x00b6, 0x00b6, 1},
- Range{0x00bb, 0x00bb, 1},
- Range{0x00bf, 0x00bf, 1},
- Range{0x00d7, 0x00d7, 1},
- Range{0x00f7, 0x00f7, 1},
- Range{0x2010, 0x2027, 1},
- Range{0x2030, 0x203e, 1},
- Range{0x2041, 0x2053, 1},
- Range{0x2055, 0x205e, 1},
- Range{0x2190, 0x245f, 1},
- Range{0x2500, 0x2775, 1},
- Range{0x2794, 0x2bff, 1},
- Range{0x2e00, 0x2e7f, 1},
- Range{0x3001, 0x3003, 1},
- Range{0x3008, 0x3020, 1},
- Range{0x3030, 0x3030, 1},
- Range{0xfd3e, 0xfd3f, 1},
- Range{0xfe45, 0xfe46, 1},
+ {0x0021, 0x002f, 1},
+ {0x003a, 0x0040, 1},
+ {0x005b, 0x005e, 1},
+ {0x0060, 0x0060, 1},
+ {0x007b, 0x007e, 1},
+ {0x00a1, 0x00a7, 1},
+ {0x00a9, 0x00a9, 1},
+ {0x00ab, 0x00ac, 1},
+ {0x00ae, 0x00ae, 1},
+ {0x00b0, 0x00b1, 1},
+ {0x00b6, 0x00b6, 1},
+ {0x00bb, 0x00bb, 1},
+ {0x00bf, 0x00bf, 1},
+ {0x00d7, 0x00d7, 1},
+ {0x00f7, 0x00f7, 1},
+ {0x2010, 0x2027, 1},
+ {0x2030, 0x203e, 1},
+ {0x2041, 0x2053, 1},
+ {0x2055, 0x205e, 1},
+ {0x2190, 0x245f, 1},
+ {0x2500, 0x2775, 1},
+ {0x2794, 0x2bff, 1},
+ {0x2e00, 0x2e7f, 1},
+ {0x3001, 0x3003, 1},
+ {0x3008, 0x3020, 1},
+ {0x3030, 0x3030, 1},
+ {0xfd3e, 0xfd3f, 1},
+ {0xfe45, 0xfe46, 1},
}
var _Other_ID_Start = []Range{
- Range{0x2118, 0x2118, 1},
- Range{0x212e, 0x212e, 1},
- Range{0x309b, 0x309c, 1},
+ {0x2118, 0x2118, 1},
+ {0x212e, 0x212e, 1},
+ {0x309b, 0x309c, 1},
}
var _Pattern_White_Space = []Range{
- Range{0x0009, 0x000d, 1},
- Range{0x0020, 0x0020, 1},
- Range{0x0085, 0x0085, 1},
- Range{0x200e, 0x200f, 1},
- Range{0x2028, 0x2029, 1},
+ {0x0009, 0x000d, 1},
+ {0x0020, 0x0020, 1},
+ {0x0085, 0x0085, 1},
+ {0x200e, 0x200f, 1},
+ {0x2028, 0x2029, 1},
}
var _Other_Lowercase = []Range{
- Range{0x02b0, 0x02b8, 1},
- Range{0x02c0, 0x02c1, 1},
- Range{0x02e0, 0x02e4, 1},
- Range{0x0345, 0x0345, 1},
- Range{0x037a, 0x037a, 1},
- Range{0x1d2c, 0x1d61, 1},
- Range{0x1d78, 0x1d78, 1},
- Range{0x1d9b, 0x1dbf, 1},
- Range{0x2090, 0x2094, 1},
- Range{0x2170, 0x217f, 1},
- Range{0x24d0, 0x24e9, 1},
- Range{0x2c7d, 0x2c7d, 1},
- Range{0xa770, 0xa770, 1},
+ {0x02b0, 0x02b8, 1},
+ {0x02c0, 0x02c1, 1},
+ {0x02e0, 0x02e4, 1},
+ {0x0345, 0x0345, 1},
+ {0x037a, 0x037a, 1},
+ {0x1d2c, 0x1d61, 1},
+ {0x1d78, 0x1d78, 1},
+ {0x1d9b, 0x1dbf, 1},
+ {0x2090, 0x2094, 1},
+ {0x2170, 0x217f, 1},
+ {0x24d0, 0x24e9, 1},
+ {0x2c7d, 0x2c7d, 1},
+ {0xa770, 0xa770, 1},
}
var _Soft_Dotted = []Range{
- Range{0x0069, 0x006a, 1},
- Range{0x012f, 0x012f, 1},
- Range{0x0249, 0x0249, 1},
- Range{0x0268, 0x0268, 1},
- Range{0x029d, 0x029d, 1},
- Range{0x02b2, 0x02b2, 1},
- Range{0x03f3, 0x03f3, 1},
- Range{0x0456, 0x0456, 1},
- Range{0x0458, 0x0458, 1},
- Range{0x1d62, 0x1d62, 1},
- Range{0x1d96, 0x1d96, 1},
- Range{0x1da4, 0x1da4, 1},
- Range{0x1da8, 0x1da8, 1},
- Range{0x1e2d, 0x1e2d, 1},
- Range{0x1ecb, 0x1ecb, 1},
- Range{0x2071, 0x2071, 1},
- Range{0x2148, 0x2149, 1},
- Range{0x2c7c, 0x2c7c, 1},
- Range{0x1d422, 0x1d423, 1},
- Range{0x1d456, 0x1d457, 1},
- Range{0x1d48a, 0x1d48b, 1},
- Range{0x1d4be, 0x1d4bf, 1},
- Range{0x1d4f2, 0x1d4f3, 1},
- Range{0x1d526, 0x1d527, 1},
- Range{0x1d55a, 0x1d55b, 1},
- Range{0x1d58e, 0x1d58f, 1},
- Range{0x1d5c2, 0x1d5c3, 1},
- Range{0x1d5f6, 0x1d5f7, 1},
- Range{0x1d62a, 0x1d62b, 1},
- Range{0x1d65e, 0x1d65f, 1},
- Range{0x1d692, 0x1d693, 1},
+ {0x0069, 0x006a, 1},
+ {0x012f, 0x012f, 1},
+ {0x0249, 0x0249, 1},
+ {0x0268, 0x0268, 1},
+ {0x029d, 0x029d, 1},
+ {0x02b2, 0x02b2, 1},
+ {0x03f3, 0x03f3, 1},
+ {0x0456, 0x0456, 1},
+ {0x0458, 0x0458, 1},
+ {0x1d62, 0x1d62, 1},
+ {0x1d96, 0x1d96, 1},
+ {0x1da4, 0x1da4, 1},
+ {0x1da8, 0x1da8, 1},
+ {0x1e2d, 0x1e2d, 1},
+ {0x1ecb, 0x1ecb, 1},
+ {0x2071, 0x2071, 1},
+ {0x2148, 0x2149, 1},
+ {0x2c7c, 0x2c7c, 1},
+ {0x1d422, 0x1d423, 1},
+ {0x1d456, 0x1d457, 1},
+ {0x1d48a, 0x1d48b, 1},
+ {0x1d4be, 0x1d4bf, 1},
+ {0x1d4f2, 0x1d4f3, 1},
+ {0x1d526, 0x1d527, 1},
+ {0x1d55a, 0x1d55b, 1},
+ {0x1d58e, 0x1d58f, 1},
+ {0x1d5c2, 0x1d5c3, 1},
+ {0x1d5f6, 0x1d5f7, 1},
+ {0x1d62a, 0x1d62b, 1},
+ {0x1d65e, 0x1d65f, 1},
+ {0x1d692, 0x1d693, 1},
}
var _Hex_Digit = []Range{
- Range{0x0030, 0x0039, 1},
- Range{0x0041, 0x0046, 1},
- Range{0x0061, 0x0066, 1},
- Range{0xff10, 0xff19, 1},
- Range{0xff21, 0xff26, 1},
- Range{0xff41, 0xff46, 1},
+ {0x0030, 0x0039, 1},
+ {0x0041, 0x0046, 1},
+ {0x0061, 0x0066, 1},
+ {0xff10, 0xff19, 1},
+ {0xff21, 0xff26, 1},
+ {0xff41, 0xff46, 1},
}
var _ASCII_Hex_Digit = []Range{
- Range{0x0030, 0x0039, 1},
- Range{0x0041, 0x0046, 1},
- Range{0x0061, 0x0066, 1},
+ {0x0030, 0x0039, 1},
+ {0x0041, 0x0046, 1},
+ {0x0061, 0x0066, 1},
}
var _Deprecated = []Range{
- Range{0x0149, 0x0149, 1},
- Range{0x0f77, 0x0f77, 1},
- Range{0x0f79, 0x0f79, 1},
- Range{0x17a3, 0x17a4, 1},
- Range{0x206a, 0x206f, 1},
- Range{0x2329, 0x232a, 1},
- Range{0xe0001, 0xe0001, 1},
- Range{0xe0020, 0xe007f, 1},
+ {0x0149, 0x0149, 1},
+ {0x0f77, 0x0f77, 1},
+ {0x0f79, 0x0f79, 1},
+ {0x17a3, 0x17a4, 1},
+ {0x206a, 0x206f, 1},
+ {0x2329, 0x232a, 1},
+ {0xe0001, 0xe0001, 1},
+ {0xe0020, 0xe007f, 1},
}
var _Terminal_Punctuation = []Range{
- Range{0x0021, 0x0021, 1},
- Range{0x002c, 0x002c, 1},
- Range{0x002e, 0x002e, 1},
- Range{0x003a, 0x003b, 1},
- Range{0x003f, 0x003f, 1},
- Range{0x037e, 0x037e, 1},
- Range{0x0387, 0x0387, 1},
- Range{0x0589, 0x0589, 1},
- Range{0x05c3, 0x05c3, 1},
- Range{0x060c, 0x060c, 1},
- Range{0x061b, 0x061b, 1},
- Range{0x061f, 0x061f, 1},
- Range{0x06d4, 0x06d4, 1},
- Range{0x0700, 0x070a, 1},
- Range{0x070c, 0x070c, 1},
- Range{0x07f8, 0x07f9, 1},
- Range{0x0830, 0x083e, 1},
- Range{0x0964, 0x0965, 1},
- Range{0x0e5a, 0x0e5b, 1},
- Range{0x0f08, 0x0f08, 1},
- Range{0x0f0d, 0x0f12, 1},
- Range{0x104a, 0x104b, 1},
- Range{0x1361, 0x1368, 1},
- Range{0x166d, 0x166e, 1},
- Range{0x16eb, 0x16ed, 1},
- Range{0x17d4, 0x17d6, 1},
- Range{0x17da, 0x17da, 1},
- Range{0x1802, 0x1805, 1},
- Range{0x1808, 0x1809, 1},
- Range{0x1944, 0x1945, 1},
- Range{0x1aa8, 0x1aab, 1},
- Range{0x1b5a, 0x1b5b, 1},
- Range{0x1b5d, 0x1b5f, 1},
- Range{0x1c3b, 0x1c3f, 1},
- Range{0x1c7e, 0x1c7f, 1},
- Range{0x203c, 0x203d, 1},
- Range{0x2047, 0x2049, 1},
- Range{0x2e2e, 0x2e2e, 1},
- Range{0x3001, 0x3002, 1},
- Range{0xa4fe, 0xa4ff, 1},
- Range{0xa60d, 0xa60f, 1},
- Range{0xa6f3, 0xa6f7, 1},
- Range{0xa876, 0xa877, 1},
- Range{0xa8ce, 0xa8cf, 1},
- Range{0xa92f, 0xa92f, 1},
- Range{0xa9c7, 0xa9c9, 1},
- Range{0xaa5d, 0xaa5f, 1},
- Range{0xaadf, 0xaadf, 1},
- Range{0xabeb, 0xabeb, 1},
- Range{0xfe50, 0xfe52, 1},
- Range{0xfe54, 0xfe57, 1},
- Range{0xff01, 0xff01, 1},
- Range{0xff0c, 0xff0c, 1},
- Range{0xff0e, 0xff0e, 1},
- Range{0xff1a, 0xff1b, 1},
- Range{0xff1f, 0xff1f, 1},
- Range{0xff61, 0xff61, 1},
- Range{0xff64, 0xff64, 1},
- Range{0x1039f, 0x1039f, 1},
- Range{0x103d0, 0x103d0, 1},
- Range{0x10857, 0x10857, 1},
- Range{0x1091f, 0x1091f, 1},
- Range{0x10b3a, 0x10b3f, 1},
- Range{0x110be, 0x110c1, 1},
- Range{0x12470, 0x12473, 1},
+ {0x0021, 0x0021, 1},
+ {0x002c, 0x002c, 1},
+ {0x002e, 0x002e, 1},
+ {0x003a, 0x003b, 1},
+ {0x003f, 0x003f, 1},
+ {0x037e, 0x037e, 1},
+ {0x0387, 0x0387, 1},
+ {0x0589, 0x0589, 1},
+ {0x05c3, 0x05c3, 1},
+ {0x060c, 0x060c, 1},
+ {0x061b, 0x061b, 1},
+ {0x061f, 0x061f, 1},
+ {0x06d4, 0x06d4, 1},
+ {0x0700, 0x070a, 1},
+ {0x070c, 0x070c, 1},
+ {0x07f8, 0x07f9, 1},
+ {0x0830, 0x083e, 1},
+ {0x0964, 0x0965, 1},
+ {0x0e5a, 0x0e5b, 1},
+ {0x0f08, 0x0f08, 1},
+ {0x0f0d, 0x0f12, 1},
+ {0x104a, 0x104b, 1},
+ {0x1361, 0x1368, 1},
+ {0x166d, 0x166e, 1},
+ {0x16eb, 0x16ed, 1},
+ {0x17d4, 0x17d6, 1},
+ {0x17da, 0x17da, 1},
+ {0x1802, 0x1805, 1},
+ {0x1808, 0x1809, 1},
+ {0x1944, 0x1945, 1},
+ {0x1aa8, 0x1aab, 1},
+ {0x1b5a, 0x1b5b, 1},
+ {0x1b5d, 0x1b5f, 1},
+ {0x1c3b, 0x1c3f, 1},
+ {0x1c7e, 0x1c7f, 1},
+ {0x203c, 0x203d, 1},
+ {0x2047, 0x2049, 1},
+ {0x2e2e, 0x2e2e, 1},
+ {0x3001, 0x3002, 1},
+ {0xa4fe, 0xa4ff, 1},
+ {0xa60d, 0xa60f, 1},
+ {0xa6f3, 0xa6f7, 1},
+ {0xa876, 0xa877, 1},
+ {0xa8ce, 0xa8cf, 1},
+ {0xa92f, 0xa92f, 1},
+ {0xa9c7, 0xa9c9, 1},
+ {0xaa5d, 0xaa5f, 1},
+ {0xaadf, 0xaadf, 1},
+ {0xabeb, 0xabeb, 1},
+ {0xfe50, 0xfe52, 1},
+ {0xfe54, 0xfe57, 1},
+ {0xff01, 0xff01, 1},
+ {0xff0c, 0xff0c, 1},
+ {0xff0e, 0xff0e, 1},
+ {0xff1a, 0xff1b, 1},
+ {0xff1f, 0xff1f, 1},
+ {0xff61, 0xff61, 1},
+ {0xff64, 0xff64, 1},
+ {0x1039f, 0x1039f, 1},
+ {0x103d0, 0x103d0, 1},
+ {0x10857, 0x10857, 1},
+ {0x1091f, 0x1091f, 1},
+ {0x10b3a, 0x10b3f, 1},
+ {0x110be, 0x110c1, 1},
+ {0x12470, 0x12473, 1},
}
var _Quotation_Mark = []Range{
- Range{0x0022, 0x0022, 1},
- Range{0x0027, 0x0027, 1},
- Range{0x00ab, 0x00ab, 1},
- Range{0x00bb, 0x00bb, 1},
- Range{0x2018, 0x201f, 1},
- Range{0x2039, 0x203a, 1},
- Range{0x300c, 0x300f, 1},
- Range{0x301d, 0x301f, 1},
- Range{0xfe41, 0xfe44, 1},
- Range{0xff02, 0xff02, 1},
- Range{0xff07, 0xff07, 1},
- Range{0xff62, 0xff63, 1},
+ {0x0022, 0x0022, 1},
+ {0x0027, 0x0027, 1},
+ {0x00ab, 0x00ab, 1},
+ {0x00bb, 0x00bb, 1},
+ {0x2018, 0x201f, 1},
+ {0x2039, 0x203a, 1},
+ {0x300c, 0x300f, 1},
+ {0x301d, 0x301f, 1},
+ {0xfe41, 0xfe44, 1},
+ {0xff02, 0xff02, 1},
+ {0xff07, 0xff07, 1},
+ {0xff62, 0xff63, 1},
}
var _Other_ID_Continue = []Range{
- Range{0x00b7, 0x00b7, 1},
- Range{0x0387, 0x0387, 1},
- Range{0x1369, 0x1371, 1},
+ {0x00b7, 0x00b7, 1},
+ {0x0387, 0x0387, 1},
+ {0x1369, 0x1371, 1},
}
var _Bidi_Control = []Range{
- Range{0x200e, 0x200f, 1},
- Range{0x202a, 0x202e, 1},
+ {0x200e, 0x200f, 1},
+ {0x202a, 0x202e, 1},
}
var _Variation_Selector = []Range{
- Range{0x180b, 0x180d, 1},
- Range{0xfe00, 0xfe0f, 1},
- Range{0xe0100, 0xe01ef, 1},
+ {0x180b, 0x180d, 1},
+ {0xfe00, 0xfe0f, 1},
+ {0xe0100, 0xe01ef, 1},
}
var _Noncharacter_Code_Point = []Range{
- Range{0xfdd0, 0xfdef, 1},
- Range{0xfffe, 0xffff, 1},
- Range{0x1fffe, 0x1ffff, 1},
- Range{0x2fffe, 0x2ffff, 1},
- Range{0x3fffe, 0x3ffff, 1},
- Range{0x4fffe, 0x4ffff, 1},
- Range{0x5fffe, 0x5ffff, 1},
- Range{0x6fffe, 0x6ffff, 1},
- Range{0x7fffe, 0x7ffff, 1},
- Range{0x8fffe, 0x8ffff, 1},
- Range{0x9fffe, 0x9ffff, 1},
- Range{0xafffe, 0xaffff, 1},
- Range{0xbfffe, 0xbffff, 1},
- Range{0xcfffe, 0xcffff, 1},
- Range{0xdfffe, 0xdffff, 1},
- Range{0xefffe, 0xeffff, 1},
- Range{0xffffe, 0xfffff, 1},
- Range{0x10fffe, 0x10ffff, 1},
+ {0xfdd0, 0xfdef, 1},
+ {0xfffe, 0xffff, 1},
+ {0x1fffe, 0x1ffff, 1},
+ {0x2fffe, 0x2ffff, 1},
+ {0x3fffe, 0x3ffff, 1},
+ {0x4fffe, 0x4ffff, 1},
+ {0x5fffe, 0x5ffff, 1},
+ {0x6fffe, 0x6ffff, 1},
+ {0x7fffe, 0x7ffff, 1},
+ {0x8fffe, 0x8ffff, 1},
+ {0x9fffe, 0x9ffff, 1},
+ {0xafffe, 0xaffff, 1},
+ {0xbfffe, 0xbffff, 1},
+ {0xcfffe, 0xcffff, 1},
+ {0xdfffe, 0xdffff, 1},
+ {0xefffe, 0xeffff, 1},
+ {0xffffe, 0xfffff, 1},
+ {0x10fffe, 0x10ffff, 1},
}
var _Other_Math = []Range{
- Range{0x005e, 0x005e, 1},
- Range{0x03d0, 0x03d2, 1},
- Range{0x03d5, 0x03d5, 1},
- Range{0x03f0, 0x03f1, 1},
- Range{0x03f4, 0x03f5, 1},
- Range{0x2016, 0x2016, 1},
- Range{0x2032, 0x2034, 1},
- Range{0x2040, 0x2040, 1},
- Range{0x2061, 0x2064, 1},
- Range{0x207d, 0x207e, 1},
- Range{0x208d, 0x208e, 1},
- Range{0x20d0, 0x20dc, 1},
- Range{0x20e1, 0x20e1, 1},
- Range{0x20e5, 0x20e6, 1},
- Range{0x20eb, 0x20ef, 1},
- Range{0x2102, 0x2102, 1},
- Range{0x210a, 0x2113, 1},
- Range{0x2115, 0x2115, 1},
- Range{0x2119, 0x211d, 1},
- Range{0x2124, 0x2124, 1},
- Range{0x2128, 0x2129, 1},
- Range{0x212c, 0x212d, 1},
- Range{0x212f, 0x2131, 1},
- Range{0x2133, 0x2138, 1},
- Range{0x213c, 0x213f, 1},
- Range{0x2145, 0x2149, 1},
- Range{0x2195, 0x2199, 1},
- Range{0x219c, 0x219f, 1},
- Range{0x21a1, 0x21a2, 1},
- Range{0x21a4, 0x21a5, 1},
- Range{0x21a7, 0x21a7, 1},
- Range{0x21a9, 0x21ad, 1},
- Range{0x21b0, 0x21b1, 1},
- Range{0x21b6, 0x21b7, 1},
- Range{0x21bc, 0x21cd, 1},
- Range{0x21d0, 0x21d1, 1},
- Range{0x21d3, 0x21d3, 1},
- Range{0x21d5, 0x21db, 1},
- Range{0x21dd, 0x21dd, 1},
- Range{0x21e4, 0x21e5, 1},
- Range{0x23b4, 0x23b5, 1},
- Range{0x23b7, 0x23b7, 1},
- Range{0x23d0, 0x23d0, 1},
- Range{0x23e2, 0x23e2, 1},
- Range{0x25a0, 0x25a1, 1},
- Range{0x25ae, 0x25b6, 1},
- Range{0x25bc, 0x25c0, 1},
- Range{0x25c6, 0x25c7, 1},
- Range{0x25ca, 0x25cb, 1},
- Range{0x25cf, 0x25d3, 1},
- Range{0x25e2, 0x25e2, 1},
- Range{0x25e4, 0x25e4, 1},
- Range{0x25e7, 0x25ec, 1},
- Range{0x2605, 0x2606, 1},
- Range{0x2640, 0x2640, 1},
- Range{0x2642, 0x2642, 1},
- Range{0x2660, 0x2663, 1},
- Range{0x266d, 0x266e, 1},
- Range{0x27c5, 0x27c6, 1},
- Range{0x27e6, 0x27ef, 1},
- Range{0x2983, 0x2998, 1},
- Range{0x29d8, 0x29db, 1},
- Range{0x29fc, 0x29fd, 1},
- Range{0xfe61, 0xfe61, 1},
- Range{0xfe63, 0xfe63, 1},
- Range{0xfe68, 0xfe68, 1},
- Range{0xff3c, 0xff3c, 1},
- Range{0xff3e, 0xff3e, 1},
- Range{0x1d400, 0x1d454, 1},
- Range{0x1d456, 0x1d49c, 1},
- Range{0x1d49e, 0x1d49f, 1},
- Range{0x1d4a2, 0x1d4a2, 1},
- Range{0x1d4a5, 0x1d4a6, 1},
- Range{0x1d4a9, 0x1d4ac, 1},
- Range{0x1d4ae, 0x1d4b9, 1},
- Range{0x1d4bb, 0x1d4bb, 1},
- Range{0x1d4bd, 0x1d4c3, 1},
- Range{0x1d4c5, 0x1d505, 1},
- Range{0x1d507, 0x1d50a, 1},
- Range{0x1d50d, 0x1d514, 1},
- Range{0x1d516, 0x1d51c, 1},
- Range{0x1d51e, 0x1d539, 1},
- Range{0x1d53b, 0x1d53e, 1},
- Range{0x1d540, 0x1d544, 1},
- Range{0x1d546, 0x1d546, 1},
- Range{0x1d54a, 0x1d550, 1},
- Range{0x1d552, 0x1d6a5, 1},
- Range{0x1d6a8, 0x1d6c0, 1},
- Range{0x1d6c2, 0x1d6da, 1},
- Range{0x1d6dc, 0x1d6fa, 1},
- Range{0x1d6fc, 0x1d714, 1},
- Range{0x1d716, 0x1d734, 1},
- Range{0x1d736, 0x1d74e, 1},
- Range{0x1d750, 0x1d76e, 1},
- Range{0x1d770, 0x1d788, 1},
- Range{0x1d78a, 0x1d7a8, 1},
- Range{0x1d7aa, 0x1d7c2, 1},
- Range{0x1d7c4, 0x1d7cb, 1},
- Range{0x1d7ce, 0x1d7ff, 1},
+ {0x005e, 0x005e, 1},
+ {0x03d0, 0x03d2, 1},
+ {0x03d5, 0x03d5, 1},
+ {0x03f0, 0x03f1, 1},
+ {0x03f4, 0x03f5, 1},
+ {0x2016, 0x2016, 1},
+ {0x2032, 0x2034, 1},
+ {0x2040, 0x2040, 1},
+ {0x2061, 0x2064, 1},
+ {0x207d, 0x207e, 1},
+ {0x208d, 0x208e, 1},
+ {0x20d0, 0x20dc, 1},
+ {0x20e1, 0x20e1, 1},
+ {0x20e5, 0x20e6, 1},
+ {0x20eb, 0x20ef, 1},
+ {0x2102, 0x2102, 1},
+ {0x210a, 0x2113, 1},
+ {0x2115, 0x2115, 1},
+ {0x2119, 0x211d, 1},
+ {0x2124, 0x2124, 1},
+ {0x2128, 0x2129, 1},
+ {0x212c, 0x212d, 1},
+ {0x212f, 0x2131, 1},
+ {0x2133, 0x2138, 1},
+ {0x213c, 0x213f, 1},
+ {0x2145, 0x2149, 1},
+ {0x2195, 0x2199, 1},
+ {0x219c, 0x219f, 1},
+ {0x21a1, 0x21a2, 1},
+ {0x21a4, 0x21a5, 1},
+ {0x21a7, 0x21a7, 1},
+ {0x21a9, 0x21ad, 1},
+ {0x21b0, 0x21b1, 1},
+ {0x21b6, 0x21b7, 1},
+ {0x21bc, 0x21cd, 1},
+ {0x21d0, 0x21d1, 1},
+ {0x21d3, 0x21d3, 1},
+ {0x21d5, 0x21db, 1},
+ {0x21dd, 0x21dd, 1},
+ {0x21e4, 0x21e5, 1},
+ {0x23b4, 0x23b5, 1},
+ {0x23b7, 0x23b7, 1},
+ {0x23d0, 0x23d0, 1},
+ {0x23e2, 0x23e2, 1},
+ {0x25a0, 0x25a1, 1},
+ {0x25ae, 0x25b6, 1},
+ {0x25bc, 0x25c0, 1},
+ {0x25c6, 0x25c7, 1},
+ {0x25ca, 0x25cb, 1},
+ {0x25cf, 0x25d3, 1},
+ {0x25e2, 0x25e2, 1},
+ {0x25e4, 0x25e4, 1},
+ {0x25e7, 0x25ec, 1},
+ {0x2605, 0x2606, 1},
+ {0x2640, 0x2640, 1},
+ {0x2642, 0x2642, 1},
+ {0x2660, 0x2663, 1},
+ {0x266d, 0x266e, 1},
+ {0x27c5, 0x27c6, 1},
+ {0x27e6, 0x27ef, 1},
+ {0x2983, 0x2998, 1},
+ {0x29d8, 0x29db, 1},
+ {0x29fc, 0x29fd, 1},
+ {0xfe61, 0xfe61, 1},
+ {0xfe63, 0xfe63, 1},
+ {0xfe68, 0xfe68, 1},
+ {0xff3c, 0xff3c, 1},
+ {0xff3e, 0xff3e, 1},
+ {0x1d400, 0x1d454, 1},
+ {0x1d456, 0x1d49c, 1},
+ {0x1d49e, 0x1d49f, 1},
+ {0x1d4a2, 0x1d4a2, 1},
+ {0x1d4a5, 0x1d4a6, 1},
+ {0x1d4a9, 0x1d4ac, 1},
+ {0x1d4ae, 0x1d4b9, 1},
+ {0x1d4bb, 0x1d4bb, 1},
+ {0x1d4bd, 0x1d4c3, 1},
+ {0x1d4c5, 0x1d505, 1},
+ {0x1d507, 0x1d50a, 1},
+ {0x1d50d, 0x1d514, 1},
+ {0x1d516, 0x1d51c, 1},
+ {0x1d51e, 0x1d539, 1},
+ {0x1d53b, 0x1d53e, 1},
+ {0x1d540, 0x1d544, 1},
+ {0x1d546, 0x1d546, 1},
+ {0x1d54a, 0x1d550, 1},
+ {0x1d552, 0x1d6a5, 1},
+ {0x1d6a8, 0x1d6c0, 1},
+ {0x1d6c2, 0x1d6da, 1},
+ {0x1d6dc, 0x1d6fa, 1},
+ {0x1d6fc, 0x1d714, 1},
+ {0x1d716, 0x1d734, 1},
+ {0x1d736, 0x1d74e, 1},
+ {0x1d750, 0x1d76e, 1},
+ {0x1d770, 0x1d788, 1},
+ {0x1d78a, 0x1d7a8, 1},
+ {0x1d7aa, 0x1d7c2, 1},
+ {0x1d7c4, 0x1d7cb, 1},
+ {0x1d7ce, 0x1d7ff, 1},
}
var _Unified_Ideograph = []Range{
- Range{0x3400, 0x4db5, 1},
- Range{0x4e00, 0x9fcb, 1},
- Range{0xfa0e, 0xfa0f, 1},
- Range{0xfa11, 0xfa11, 1},
- Range{0xfa13, 0xfa14, 1},
- Range{0xfa1f, 0xfa1f, 1},
- Range{0xfa21, 0xfa21, 1},
- Range{0xfa23, 0xfa24, 1},
- Range{0xfa27, 0xfa29, 1},
- Range{0x20000, 0x2a6d6, 1},
- Range{0x2a700, 0x2b734, 1},
+ {0x3400, 0x4db5, 1},
+ {0x4e00, 0x9fcb, 1},
+ {0xfa0e, 0xfa0f, 1},
+ {0xfa11, 0xfa11, 1},
+ {0xfa13, 0xfa14, 1},
+ {0xfa1f, 0xfa1f, 1},
+ {0xfa21, 0xfa21, 1},
+ {0xfa23, 0xfa24, 1},
+ {0xfa27, 0xfa29, 1},
+ {0x20000, 0x2a6d6, 1},
+ {0x2a700, 0x2b734, 1},
}
var _Hyphen = []Range{
- Range{0x002d, 0x002d, 1},
- Range{0x00ad, 0x00ad, 1},
- Range{0x058a, 0x058a, 1},
- Range{0x1806, 0x1806, 1},
- Range{0x2010, 0x2011, 1},
- Range{0x2e17, 0x2e17, 1},
- Range{0x30fb, 0x30fb, 1},
- Range{0xfe63, 0xfe63, 1},
- Range{0xff0d, 0xff0d, 1},
- Range{0xff65, 0xff65, 1},
+ {0x002d, 0x002d, 1},
+ {0x00ad, 0x00ad, 1},
+ {0x058a, 0x058a, 1},
+ {0x1806, 0x1806, 1},
+ {0x2010, 0x2011, 1},
+ {0x2e17, 0x2e17, 1},
+ {0x30fb, 0x30fb, 1},
+ {0xfe63, 0xfe63, 1},
+ {0xff0d, 0xff0d, 1},
+ {0xff65, 0xff65, 1},
}
var _IDS_Binary_Operator = []Range{
- Range{0x2ff0, 0x2ff1, 1},
- Range{0x2ff4, 0x2ffb, 1},
+ {0x2ff0, 0x2ff1, 1},
+ {0x2ff4, 0x2ffb, 1},
}
var _Logical_Order_Exception = []Range{
- Range{0x0e40, 0x0e44, 1},
- Range{0x0ec0, 0x0ec4, 1},
- Range{0xaab5, 0xaab6, 1},
- Range{0xaab9, 0xaab9, 1},
- Range{0xaabb, 0xaabc, 1},
+ {0x0e40, 0x0e44, 1},
+ {0x0ec0, 0x0ec4, 1},
+ {0xaab5, 0xaab6, 1},
+ {0xaab9, 0xaab9, 1},
+ {0xaabb, 0xaabc, 1},
}
var _Radical = []Range{
- Range{0x2e80, 0x2e99, 1},
- Range{0x2e9b, 0x2ef3, 1},
- Range{0x2f00, 0x2fd5, 1},
+ {0x2e80, 0x2e99, 1},
+ {0x2e9b, 0x2ef3, 1},
+ {0x2f00, 0x2fd5, 1},
}
var _Other_Uppercase = []Range{
- Range{0x2160, 0x216f, 1},
- Range{0x24b6, 0x24cf, 1},
+ {0x2160, 0x216f, 1},
+ {0x24b6, 0x24cf, 1},
}
var _STerm = []Range{
- Range{0x0021, 0x0021, 1},
- Range{0x002e, 0x002e, 1},
- Range{0x003f, 0x003f, 1},
- Range{0x055c, 0x055c, 1},
- Range{0x055e, 0x055e, 1},
- Range{0x0589, 0x0589, 1},
- Range{0x061f, 0x061f, 1},
- Range{0x06d4, 0x06d4, 1},
- Range{0x0700, 0x0702, 1},
- Range{0x07f9, 0x07f9, 1},
- Range{0x0964, 0x0965, 1},
- Range{0x104a, 0x104b, 1},
- Range{0x1362, 0x1362, 1},
- Range{0x1367, 0x1368, 1},
- Range{0x166e, 0x166e, 1},
- Range{0x1803, 0x1803, 1},
- Range{0x1809, 0x1809, 1},
- Range{0x1944, 0x1945, 1},
- Range{0x1b5a, 0x1b5b, 1},
- Range{0x1b5e, 0x1b5f, 1},
- Range{0x1c3b, 0x1c3c, 1},
- Range{0x1c7e, 0x1c7f, 1},
- Range{0x203c, 0x203d, 1},
- Range{0x2047, 0x2049, 1},
- Range{0x2e2e, 0x2e2e, 1},
- Range{0x3002, 0x3002, 1},
- Range{0xa4ff, 0xa4ff, 1},
- Range{0xa60e, 0xa60f, 1},
- Range{0xa6f3, 0xa6f3, 1},
- Range{0xa6f7, 0xa6f7, 1},
- Range{0xa876, 0xa877, 1},
- Range{0xa8ce, 0xa8cf, 1},
- Range{0xa92f, 0xa92f, 1},
- Range{0xa9c8, 0xa9c9, 1},
- Range{0xaa5d, 0xaa5f, 1},
- Range{0xabeb, 0xabeb, 1},
- Range{0xfe52, 0xfe52, 1},
- Range{0xfe56, 0xfe57, 1},
- Range{0xff01, 0xff01, 1},
- Range{0xff0e, 0xff0e, 1},
- Range{0xff1f, 0xff1f, 1},
- Range{0xff61, 0xff61, 1},
- Range{0x110be, 0x110c1, 1},
+ {0x0021, 0x0021, 1},
+ {0x002e, 0x002e, 1},
+ {0x003f, 0x003f, 1},
+ {0x055c, 0x055c, 1},
+ {0x055e, 0x055e, 1},
+ {0x0589, 0x0589, 1},
+ {0x061f, 0x061f, 1},
+ {0x06d4, 0x06d4, 1},
+ {0x0700, 0x0702, 1},
+ {0x07f9, 0x07f9, 1},
+ {0x0964, 0x0965, 1},
+ {0x104a, 0x104b, 1},
+ {0x1362, 0x1362, 1},
+ {0x1367, 0x1368, 1},
+ {0x166e, 0x166e, 1},
+ {0x1803, 0x1803, 1},
+ {0x1809, 0x1809, 1},
+ {0x1944, 0x1945, 1},
+ {0x1b5a, 0x1b5b, 1},
+ {0x1b5e, 0x1b5f, 1},
+ {0x1c3b, 0x1c3c, 1},
+ {0x1c7e, 0x1c7f, 1},
+ {0x203c, 0x203d, 1},
+ {0x2047, 0x2049, 1},
+ {0x2e2e, 0x2e2e, 1},
+ {0x3002, 0x3002, 1},
+ {0xa4ff, 0xa4ff, 1},
+ {0xa60e, 0xa60f, 1},
+ {0xa6f3, 0xa6f3, 1},
+ {0xa6f7, 0xa6f7, 1},
+ {0xa876, 0xa877, 1},
+ {0xa8ce, 0xa8cf, 1},
+ {0xa92f, 0xa92f, 1},
+ {0xa9c8, 0xa9c9, 1},
+ {0xaa5d, 0xaa5f, 1},
+ {0xabeb, 0xabeb, 1},
+ {0xfe52, 0xfe52, 1},
+ {0xfe56, 0xfe57, 1},
+ {0xff01, 0xff01, 1},
+ {0xff0e, 0xff0e, 1},
+ {0xff1f, 0xff1f, 1},
+ {0xff61, 0xff61, 1},
+ {0x110be, 0x110c1, 1},
}
var _Other_Alphabetic = []Range{
- Range{0x0345, 0x0345, 1},
- Range{0x05b0, 0x05bd, 1},
- Range{0x05bf, 0x05bf, 1},
- Range{0x05c1, 0x05c2, 1},
- Range{0x05c4, 0x05c5, 1},
- Range{0x05c7, 0x05c7, 1},
- Range{0x0610, 0x061a, 1},
- Range{0x064b, 0x0657, 1},
- Range{0x0659, 0x065e, 1},
- Range{0x0670, 0x0670, 1},
- Range{0x06d6, 0x06dc, 1},
- Range{0x06e1, 0x06e4, 1},
- Range{0x06e7, 0x06e8, 1},
- Range{0x06ed, 0x06ed, 1},
- Range{0x0711, 0x0711, 1},
- Range{0x0730, 0x073f, 1},
- Range{0x07a6, 0x07b0, 1},
- Range{0x0816, 0x0817, 1},
- Range{0x081b, 0x0823, 1},
- Range{0x0825, 0x0827, 1},
- Range{0x0829, 0x082c, 1},
- Range{0x0900, 0x0903, 1},
- Range{0x093e, 0x094c, 1},
- Range{0x094e, 0x094e, 1},
- Range{0x0955, 0x0955, 1},
- Range{0x0962, 0x0963, 1},
- Range{0x0981, 0x0983, 1},
- Range{0x09be, 0x09c4, 1},
- Range{0x09c7, 0x09c8, 1},
- Range{0x09cb, 0x09cc, 1},
- Range{0x09d7, 0x09d7, 1},
- Range{0x09e2, 0x09e3, 1},
- Range{0x0a01, 0x0a03, 1},
- Range{0x0a3e, 0x0a42, 1},
- Range{0x0a47, 0x0a48, 1},
- Range{0x0a4b, 0x0a4c, 1},
- Range{0x0a51, 0x0a51, 1},
- Range{0x0a70, 0x0a71, 1},
- Range{0x0a75, 0x0a75, 1},
- Range{0x0a81, 0x0a83, 1},
- Range{0x0abe, 0x0ac5, 1},
- Range{0x0ac7, 0x0ac9, 1},
- Range{0x0acb, 0x0acc, 1},
- Range{0x0ae2, 0x0ae3, 1},
- Range{0x0b01, 0x0b03, 1},
- Range{0x0b3e, 0x0b44, 1},
- Range{0x0b47, 0x0b48, 1},
- Range{0x0b4b, 0x0b4c, 1},
- Range{0x0b56, 0x0b57, 1},
- Range{0x0b62, 0x0b63, 1},
- Range{0x0b82, 0x0b82, 1},
- Range{0x0bbe, 0x0bc2, 1},
- Range{0x0bc6, 0x0bc8, 1},
- Range{0x0bca, 0x0bcc, 1},
- Range{0x0bd7, 0x0bd7, 1},
- Range{0x0c01, 0x0c03, 1},
- Range{0x0c3e, 0x0c44, 1},
- Range{0x0c46, 0x0c48, 1},
- Range{0x0c4a, 0x0c4c, 1},
- Range{0x0c55, 0x0c56, 1},
- Range{0x0c62, 0x0c63, 1},
- Range{0x0c82, 0x0c83, 1},
- Range{0x0cbe, 0x0cc4, 1},
- Range{0x0cc6, 0x0cc8, 1},
- Range{0x0cca, 0x0ccc, 1},
- Range{0x0cd5, 0x0cd6, 1},
- Range{0x0ce2, 0x0ce3, 1},
- Range{0x0d02, 0x0d03, 1},
- Range{0x0d3e, 0x0d44, 1},
- Range{0x0d46, 0x0d48, 1},
- Range{0x0d4a, 0x0d4c, 1},
- Range{0x0d57, 0x0d57, 1},
- Range{0x0d62, 0x0d63, 1},
- Range{0x0d82, 0x0d83, 1},
- Range{0x0dcf, 0x0dd4, 1},
- Range{0x0dd6, 0x0dd6, 1},
- Range{0x0dd8, 0x0ddf, 1},
- Range{0x0df2, 0x0df3, 1},
- Range{0x0e31, 0x0e31, 1},
- Range{0x0e34, 0x0e3a, 1},
- Range{0x0e4d, 0x0e4d, 1},
- Range{0x0eb1, 0x0eb1, 1},
- Range{0x0eb4, 0x0eb9, 1},
- Range{0x0ebb, 0x0ebc, 1},
- Range{0x0ecd, 0x0ecd, 1},
- Range{0x0f71, 0x0f81, 1},
- Range{0x0f90, 0x0f97, 1},
- Range{0x0f99, 0x0fbc, 1},
- Range{0x102b, 0x1036, 1},
- Range{0x1038, 0x1038, 1},
- Range{0x103b, 0x103e, 1},
- Range{0x1056, 0x1059, 1},
- Range{0x105e, 0x1060, 1},
- Range{0x1062, 0x1062, 1},
- Range{0x1067, 0x1068, 1},
- Range{0x1071, 0x1074, 1},
- Range{0x1082, 0x1086, 1},
- Range{0x109c, 0x109d, 1},
- Range{0x135f, 0x135f, 1},
- Range{0x1712, 0x1713, 1},
- Range{0x1732, 0x1733, 1},
- Range{0x1752, 0x1753, 1},
- Range{0x1772, 0x1773, 1},
- Range{0x17b6, 0x17c8, 1},
- Range{0x18a9, 0x18a9, 1},
- Range{0x1920, 0x192b, 1},
- Range{0x1930, 0x1938, 1},
- Range{0x19b0, 0x19c0, 1},
- Range{0x19c8, 0x19c9, 1},
- Range{0x1a17, 0x1a1b, 1},
- Range{0x1a55, 0x1a5e, 1},
- Range{0x1a61, 0x1a74, 1},
- Range{0x1b00, 0x1b04, 1},
- Range{0x1b35, 0x1b43, 1},
- Range{0x1b80, 0x1b82, 1},
- Range{0x1ba1, 0x1ba9, 1},
- Range{0x1c24, 0x1c35, 1},
- Range{0x1cf2, 0x1cf2, 1},
- Range{0x24b6, 0x24e9, 1},
- Range{0x2de0, 0x2dff, 1},
- Range{0xa823, 0xa827, 1},
- Range{0xa880, 0xa881, 1},
- Range{0xa8b4, 0xa8c3, 1},
- Range{0xa926, 0xa92a, 1},
- Range{0xa947, 0xa952, 1},
- Range{0xa980, 0xa983, 1},
- Range{0xa9b3, 0xa9bf, 1},
- Range{0xaa29, 0xaa36, 1},
- Range{0xaa43, 0xaa43, 1},
- Range{0xaa4c, 0xaa4d, 1},
- Range{0xaab0, 0xaab0, 1},
- Range{0xaab2, 0xaab4, 1},
- Range{0xaab7, 0xaab8, 1},
- Range{0xaabe, 0xaabe, 1},
- Range{0xabe3, 0xabea, 1},
- Range{0xfb1e, 0xfb1e, 1},
- Range{0x10a01, 0x10a03, 1},
- Range{0x10a05, 0x10a06, 1},
- Range{0x10a0c, 0x10a0f, 1},
- Range{0x11082, 0x11082, 1},
- Range{0x110b0, 0x110b8, 1},
+ {0x0345, 0x0345, 1},
+ {0x05b0, 0x05bd, 1},
+ {0x05bf, 0x05bf, 1},
+ {0x05c1, 0x05c2, 1},
+ {0x05c4, 0x05c5, 1},
+ {0x05c7, 0x05c7, 1},
+ {0x0610, 0x061a, 1},
+ {0x064b, 0x0657, 1},
+ {0x0659, 0x065e, 1},
+ {0x0670, 0x0670, 1},
+ {0x06d6, 0x06dc, 1},
+ {0x06e1, 0x06e4, 1},
+ {0x06e7, 0x06e8, 1},
+ {0x06ed, 0x06ed, 1},
+ {0x0711, 0x0711, 1},
+ {0x0730, 0x073f, 1},
+ {0x07a6, 0x07b0, 1},
+ {0x0816, 0x0817, 1},
+ {0x081b, 0x0823, 1},
+ {0x0825, 0x0827, 1},
+ {0x0829, 0x082c, 1},
+ {0x0900, 0x0903, 1},
+ {0x093e, 0x094c, 1},
+ {0x094e, 0x094e, 1},
+ {0x0955, 0x0955, 1},
+ {0x0962, 0x0963, 1},
+ {0x0981, 0x0983, 1},
+ {0x09be, 0x09c4, 1},
+ {0x09c7, 0x09c8, 1},
+ {0x09cb, 0x09cc, 1},
+ {0x09d7, 0x09d7, 1},
+ {0x09e2, 0x09e3, 1},
+ {0x0a01, 0x0a03, 1},
+ {0x0a3e, 0x0a42, 1},
+ {0x0a47, 0x0a48, 1},
+ {0x0a4b, 0x0a4c, 1},
+ {0x0a51, 0x0a51, 1},
+ {0x0a70, 0x0a71, 1},
+ {0x0a75, 0x0a75, 1},
+ {0x0a81, 0x0a83, 1},
+ {0x0abe, 0x0ac5, 1},
+ {0x0ac7, 0x0ac9, 1},
+ {0x0acb, 0x0acc, 1},
+ {0x0ae2, 0x0ae3, 1},
+ {0x0b01, 0x0b03, 1},
+ {0x0b3e, 0x0b44, 1},
+ {0x0b47, 0x0b48, 1},
+ {0x0b4b, 0x0b4c, 1},
+ {0x0b56, 0x0b57, 1},
+ {0x0b62, 0x0b63, 1},
+ {0x0b82, 0x0b82, 1},
+ {0x0bbe, 0x0bc2, 1},
+ {0x0bc6, 0x0bc8, 1},
+ {0x0bca, 0x0bcc, 1},
+ {0x0bd7, 0x0bd7, 1},
+ {0x0c01, 0x0c03, 1},
+ {0x0c3e, 0x0c44, 1},
+ {0x0c46, 0x0c48, 1},
+ {0x0c4a, 0x0c4c, 1},
+ {0x0c55, 0x0c56, 1},
+ {0x0c62, 0x0c63, 1},
+ {0x0c82, 0x0c83, 1},
+ {0x0cbe, 0x0cc4, 1},
+ {0x0cc6, 0x0cc8, 1},
+ {0x0cca, 0x0ccc, 1},
+ {0x0cd5, 0x0cd6, 1},
+ {0x0ce2, 0x0ce3, 1},
+ {0x0d02, 0x0d03, 1},
+ {0x0d3e, 0x0d44, 1},
+ {0x0d46, 0x0d48, 1},
+ {0x0d4a, 0x0d4c, 1},
+ {0x0d57, 0x0d57, 1},
+ {0x0d62, 0x0d63, 1},
+ {0x0d82, 0x0d83, 1},
+ {0x0dcf, 0x0dd4, 1},
+ {0x0dd6, 0x0dd6, 1},
+ {0x0dd8, 0x0ddf, 1},
+ {0x0df2, 0x0df3, 1},
+ {0x0e31, 0x0e31, 1},
+ {0x0e34, 0x0e3a, 1},
+ {0x0e4d, 0x0e4d, 1},
+ {0x0eb1, 0x0eb1, 1},
+ {0x0eb4, 0x0eb9, 1},
+ {0x0ebb, 0x0ebc, 1},
+ {0x0ecd, 0x0ecd, 1},
+ {0x0f71, 0x0f81, 1},
+ {0x0f90, 0x0f97, 1},
+ {0x0f99, 0x0fbc, 1},
+ {0x102b, 0x1036, 1},
+ {0x1038, 0x1038, 1},
+ {0x103b, 0x103e, 1},
+ {0x1056, 0x1059, 1},
+ {0x105e, 0x1060, 1},
+ {0x1062, 0x1062, 1},
+ {0x1067, 0x1068, 1},
+ {0x1071, 0x1074, 1},
+ {0x1082, 0x1086, 1},
+ {0x109c, 0x109d, 1},
+ {0x135f, 0x135f, 1},
+ {0x1712, 0x1713, 1},
+ {0x1732, 0x1733, 1},
+ {0x1752, 0x1753, 1},
+ {0x1772, 0x1773, 1},
+ {0x17b6, 0x17c8, 1},
+ {0x18a9, 0x18a9, 1},
+ {0x1920, 0x192b, 1},
+ {0x1930, 0x1938, 1},
+ {0x19b0, 0x19c0, 1},
+ {0x19c8, 0x19c9, 1},
+ {0x1a17, 0x1a1b, 1},
+ {0x1a55, 0x1a5e, 1},
+ {0x1a61, 0x1a74, 1},
+ {0x1b00, 0x1b04, 1},
+ {0x1b35, 0x1b43, 1},
+ {0x1b80, 0x1b82, 1},
+ {0x1ba1, 0x1ba9, 1},
+ {0x1c24, 0x1c35, 1},
+ {0x1cf2, 0x1cf2, 1},
+ {0x24b6, 0x24e9, 1},
+ {0x2de0, 0x2dff, 1},
+ {0xa823, 0xa827, 1},
+ {0xa880, 0xa881, 1},
+ {0xa8b4, 0xa8c3, 1},
+ {0xa926, 0xa92a, 1},
+ {0xa947, 0xa952, 1},
+ {0xa980, 0xa983, 1},
+ {0xa9b3, 0xa9bf, 1},
+ {0xaa29, 0xaa36, 1},
+ {0xaa43, 0xaa43, 1},
+ {0xaa4c, 0xaa4d, 1},
+ {0xaab0, 0xaab0, 1},
+ {0xaab2, 0xaab4, 1},
+ {0xaab7, 0xaab8, 1},
+ {0xaabe, 0xaabe, 1},
+ {0xabe3, 0xabea, 1},
+ {0xfb1e, 0xfb1e, 1},
+ {0x10a01, 0x10a03, 1},
+ {0x10a05, 0x10a06, 1},
+ {0x10a0c, 0x10a0f, 1},
+ {0x11082, 0x11082, 1},
+ {0x110b0, 0x110b8, 1},
}
var _Diacritic = []Range{
- Range{0x005e, 0x005e, 1},
- Range{0x0060, 0x0060, 1},
- Range{0x00a8, 0x00a8, 1},
- Range{0x00af, 0x00af, 1},
- Range{0x00b4, 0x00b4, 1},
- Range{0x00b7, 0x00b8, 1},
- Range{0x02b0, 0x034e, 1},
- Range{0x0350, 0x0357, 1},
- Range{0x035d, 0x0362, 1},
- Range{0x0374, 0x0375, 1},
- Range{0x037a, 0x037a, 1},
- Range{0x0384, 0x0385, 1},
- Range{0x0483, 0x0487, 1},
- Range{0x0559, 0x0559, 1},
- Range{0x0591, 0x05a1, 1},
- Range{0x05a3, 0x05bd, 1},
- Range{0x05bf, 0x05bf, 1},
- Range{0x05c1, 0x05c2, 1},
- Range{0x05c4, 0x05c4, 1},
- Range{0x064b, 0x0652, 1},
- Range{0x0657, 0x0658, 1},
- Range{0x06df, 0x06e0, 1},
- Range{0x06e5, 0x06e6, 1},
- Range{0x06ea, 0x06ec, 1},
- Range{0x0730, 0x074a, 1},
- Range{0x07a6, 0x07b0, 1},
- Range{0x07eb, 0x07f5, 1},
- Range{0x0818, 0x0819, 1},
- Range{0x093c, 0x093c, 1},
- Range{0x094d, 0x094d, 1},
- Range{0x0951, 0x0954, 1},
- Range{0x0971, 0x0971, 1},
- Range{0x09bc, 0x09bc, 1},
- Range{0x09cd, 0x09cd, 1},
- Range{0x0a3c, 0x0a3c, 1},
- Range{0x0a4d, 0x0a4d, 1},
- Range{0x0abc, 0x0abc, 1},
- Range{0x0acd, 0x0acd, 1},
- Range{0x0b3c, 0x0b3c, 1},
- Range{0x0b4d, 0x0b4d, 1},
- Range{0x0bcd, 0x0bcd, 1},
- Range{0x0c4d, 0x0c4d, 1},
- Range{0x0cbc, 0x0cbc, 1},
- Range{0x0ccd, 0x0ccd, 1},
- Range{0x0d4d, 0x0d4d, 1},
- Range{0x0dca, 0x0dca, 1},
- Range{0x0e47, 0x0e4c, 1},
- Range{0x0e4e, 0x0e4e, 1},
- Range{0x0ec8, 0x0ecc, 1},
- Range{0x0f18, 0x0f19, 1},
- Range{0x0f35, 0x0f35, 1},
- Range{0x0f37, 0x0f37, 1},
- Range{0x0f39, 0x0f39, 1},
- Range{0x0f3e, 0x0f3f, 1},
- Range{0x0f82, 0x0f84, 1},
- Range{0x0f86, 0x0f87, 1},
- Range{0x0fc6, 0x0fc6, 1},
- Range{0x1037, 0x1037, 1},
- Range{0x1039, 0x103a, 1},
- Range{0x1087, 0x108d, 1},
- Range{0x108f, 0x108f, 1},
- Range{0x109a, 0x109b, 1},
- Range{0x17c9, 0x17d3, 1},
- Range{0x17dd, 0x17dd, 1},
- Range{0x1939, 0x193b, 1},
- Range{0x1a75, 0x1a7c, 1},
- Range{0x1a7f, 0x1a7f, 1},
- Range{0x1b34, 0x1b34, 1},
- Range{0x1b44, 0x1b44, 1},
- Range{0x1b6b, 0x1b73, 1},
- Range{0x1baa, 0x1baa, 1},
- Range{0x1c36, 0x1c37, 1},
- Range{0x1c78, 0x1c7d, 1},
- Range{0x1cd0, 0x1ce8, 1},
- Range{0x1ced, 0x1ced, 1},
- Range{0x1d2c, 0x1d6a, 1},
- Range{0x1dc4, 0x1dcf, 1},
- Range{0x1dfd, 0x1dff, 1},
- Range{0x1fbd, 0x1fbd, 1},
- Range{0x1fbf, 0x1fc1, 1},
- Range{0x1fcd, 0x1fcf, 1},
- Range{0x1fdd, 0x1fdf, 1},
- Range{0x1fed, 0x1fef, 1},
- Range{0x1ffd, 0x1ffe, 1},
- Range{0x2cef, 0x2cf1, 1},
- Range{0x2e2f, 0x2e2f, 1},
- Range{0x302a, 0x302f, 1},
- Range{0x3099, 0x309c, 1},
- Range{0x30fc, 0x30fc, 1},
- Range{0xa66f, 0xa66f, 1},
- Range{0xa67c, 0xa67d, 1},
- Range{0xa67f, 0xa67f, 1},
- Range{0xa6f0, 0xa6f1, 1},
- Range{0xa717, 0xa721, 1},
- Range{0xa788, 0xa788, 1},
- Range{0xa8c4, 0xa8c4, 1},
- Range{0xa8e0, 0xa8f1, 1},
- Range{0xa92b, 0xa92e, 1},
- Range{0xa953, 0xa953, 1},
- Range{0xa9b3, 0xa9b3, 1},
- Range{0xa9c0, 0xa9c0, 1},
- Range{0xaa7b, 0xaa7b, 1},
- Range{0xaabf, 0xaac2, 1},
- Range{0xabec, 0xabed, 1},
- Range{0xfb1e, 0xfb1e, 1},
- Range{0xfe20, 0xfe26, 1},
- Range{0xff3e, 0xff3e, 1},
- Range{0xff40, 0xff40, 1},
- Range{0xff70, 0xff70, 1},
- Range{0xff9e, 0xff9f, 1},
- Range{0xffe3, 0xffe3, 1},
- Range{0x110b9, 0x110ba, 1},
- Range{0x1d167, 0x1d169, 1},
- Range{0x1d16d, 0x1d172, 1},
- Range{0x1d17b, 0x1d182, 1},
- Range{0x1d185, 0x1d18b, 1},
- Range{0x1d1aa, 0x1d1ad, 1},
+ {0x005e, 0x005e, 1},
+ {0x0060, 0x0060, 1},
+ {0x00a8, 0x00a8, 1},
+ {0x00af, 0x00af, 1},
+ {0x00b4, 0x00b4, 1},
+ {0x00b7, 0x00b8, 1},
+ {0x02b0, 0x034e, 1},
+ {0x0350, 0x0357, 1},
+ {0x035d, 0x0362, 1},
+ {0x0374, 0x0375, 1},
+ {0x037a, 0x037a, 1},
+ {0x0384, 0x0385, 1},
+ {0x0483, 0x0487, 1},
+ {0x0559, 0x0559, 1},
+ {0x0591, 0x05a1, 1},
+ {0x05a3, 0x05bd, 1},
+ {0x05bf, 0x05bf, 1},
+ {0x05c1, 0x05c2, 1},
+ {0x05c4, 0x05c4, 1},
+ {0x064b, 0x0652, 1},
+ {0x0657, 0x0658, 1},
+ {0x06df, 0x06e0, 1},
+ {0x06e5, 0x06e6, 1},
+ {0x06ea, 0x06ec, 1},
+ {0x0730, 0x074a, 1},
+ {0x07a6, 0x07b0, 1},
+ {0x07eb, 0x07f5, 1},
+ {0x0818, 0x0819, 1},
+ {0x093c, 0x093c, 1},
+ {0x094d, 0x094d, 1},
+ {0x0951, 0x0954, 1},
+ {0x0971, 0x0971, 1},
+ {0x09bc, 0x09bc, 1},
+ {0x09cd, 0x09cd, 1},
+ {0x0a3c, 0x0a3c, 1},
+ {0x0a4d, 0x0a4d, 1},
+ {0x0abc, 0x0abc, 1},
+ {0x0acd, 0x0acd, 1},
+ {0x0b3c, 0x0b3c, 1},
+ {0x0b4d, 0x0b4d, 1},
+ {0x0bcd, 0x0bcd, 1},
+ {0x0c4d, 0x0c4d, 1},
+ {0x0cbc, 0x0cbc, 1},
+ {0x0ccd, 0x0ccd, 1},
+ {0x0d4d, 0x0d4d, 1},
+ {0x0dca, 0x0dca, 1},
+ {0x0e47, 0x0e4c, 1},
+ {0x0e4e, 0x0e4e, 1},
+ {0x0ec8, 0x0ecc, 1},
+ {0x0f18, 0x0f19, 1},
+ {0x0f35, 0x0f35, 1},
+ {0x0f37, 0x0f37, 1},
+ {0x0f39, 0x0f39, 1},
+ {0x0f3e, 0x0f3f, 1},
+ {0x0f82, 0x0f84, 1},
+ {0x0f86, 0x0f87, 1},
+ {0x0fc6, 0x0fc6, 1},
+ {0x1037, 0x1037, 1},
+ {0x1039, 0x103a, 1},
+ {0x1087, 0x108d, 1},
+ {0x108f, 0x108f, 1},
+ {0x109a, 0x109b, 1},
+ {0x17c9, 0x17d3, 1},
+ {0x17dd, 0x17dd, 1},
+ {0x1939, 0x193b, 1},
+ {0x1a75, 0x1a7c, 1},
+ {0x1a7f, 0x1a7f, 1},
+ {0x1b34, 0x1b34, 1},
+ {0x1b44, 0x1b44, 1},
+ {0x1b6b, 0x1b73, 1},
+ {0x1baa, 0x1baa, 1},
+ {0x1c36, 0x1c37, 1},
+ {0x1c78, 0x1c7d, 1},
+ {0x1cd0, 0x1ce8, 1},
+ {0x1ced, 0x1ced, 1},
+ {0x1d2c, 0x1d6a, 1},
+ {0x1dc4, 0x1dcf, 1},
+ {0x1dfd, 0x1dff, 1},
+ {0x1fbd, 0x1fbd, 1},
+ {0x1fbf, 0x1fc1, 1},
+ {0x1fcd, 0x1fcf, 1},
+ {0x1fdd, 0x1fdf, 1},
+ {0x1fed, 0x1fef, 1},
+ {0x1ffd, 0x1ffe, 1},
+ {0x2cef, 0x2cf1, 1},
+ {0x2e2f, 0x2e2f, 1},
+ {0x302a, 0x302f, 1},
+ {0x3099, 0x309c, 1},
+ {0x30fc, 0x30fc, 1},
+ {0xa66f, 0xa66f, 1},
+ {0xa67c, 0xa67d, 1},
+ {0xa67f, 0xa67f, 1},
+ {0xa6f0, 0xa6f1, 1},
+ {0xa717, 0xa721, 1},
+ {0xa788, 0xa788, 1},
+ {0xa8c4, 0xa8c4, 1},
+ {0xa8e0, 0xa8f1, 1},
+ {0xa92b, 0xa92e, 1},
+ {0xa953, 0xa953, 1},
+ {0xa9b3, 0xa9b3, 1},
+ {0xa9c0, 0xa9c0, 1},
+ {0xaa7b, 0xaa7b, 1},
+ {0xaabf, 0xaac2, 1},
+ {0xabec, 0xabed, 1},
+ {0xfb1e, 0xfb1e, 1},
+ {0xfe20, 0xfe26, 1},
+ {0xff3e, 0xff3e, 1},
+ {0xff40, 0xff40, 1},
+ {0xff70, 0xff70, 1},
+ {0xff9e, 0xff9f, 1},
+ {0xffe3, 0xffe3, 1},
+ {0x110b9, 0x110ba, 1},
+ {0x1d167, 0x1d169, 1},
+ {0x1d16d, 0x1d172, 1},
+ {0x1d17b, 0x1d182, 1},
+ {0x1d185, 0x1d18b, 1},
+ {0x1d1aa, 0x1d1ad, 1},
}
var _Extender = []Range{
- Range{0x00b7, 0x00b7, 1},
- Range{0x02d0, 0x02d1, 1},
- Range{0x0640, 0x0640, 1},
- Range{0x07fa, 0x07fa, 1},
- Range{0x0e46, 0x0e46, 1},
- Range{0x0ec6, 0x0ec6, 1},
- Range{0x1843, 0x1843, 1},
- Range{0x1aa7, 0x1aa7, 1},
- Range{0x1c36, 0x1c36, 1},
- Range{0x1c7b, 0x1c7b, 1},
- Range{0x3005, 0x3005, 1},
- Range{0x3031, 0x3035, 1},
- Range{0x309d, 0x309e, 1},
- Range{0x30fc, 0x30fe, 1},
- Range{0xa015, 0xa015, 1},
- Range{0xa60c, 0xa60c, 1},
- Range{0xa9cf, 0xa9cf, 1},
- Range{0xaa70, 0xaa70, 1},
- Range{0xaadd, 0xaadd, 1},
- Range{0xff70, 0xff70, 1},
+ {0x00b7, 0x00b7, 1},
+ {0x02d0, 0x02d1, 1},
+ {0x0640, 0x0640, 1},
+ {0x07fa, 0x07fa, 1},
+ {0x0e46, 0x0e46, 1},
+ {0x0ec6, 0x0ec6, 1},
+ {0x1843, 0x1843, 1},
+ {0x1aa7, 0x1aa7, 1},
+ {0x1c36, 0x1c36, 1},
+ {0x1c7b, 0x1c7b, 1},
+ {0x3005, 0x3005, 1},
+ {0x3031, 0x3035, 1},
+ {0x309d, 0x309e, 1},
+ {0x30fc, 0x30fe, 1},
+ {0xa015, 0xa015, 1},
+ {0xa60c, 0xa60c, 1},
+ {0xa9cf, 0xa9cf, 1},
+ {0xaa70, 0xaa70, 1},
+ {0xaadd, 0xaadd, 1},
+ {0xff70, 0xff70, 1},
}
var _Join_Control = []Range{
- Range{0x200c, 0x200d, 1},
+ {0x200c, 0x200d, 1},
}
var _Ideographic = []Range{
- Range{0x3006, 0x3007, 1},
- Range{0x3021, 0x3029, 1},
- Range{0x3038, 0x303a, 1},
- Range{0x3400, 0x4db5, 1},
- Range{0x4e00, 0x9fcb, 1},
- Range{0xf900, 0xfa2d, 1},
- Range{0xfa30, 0xfa6d, 1},
- Range{0xfa70, 0xfad9, 1},
- Range{0x20000, 0x2a6d6, 1},
- Range{0x2a700, 0x2b734, 1},
- Range{0x2f800, 0x2fa1d, 1},
+ {0x3006, 0x3007, 1},
+ {0x3021, 0x3029, 1},
+ {0x3038, 0x303a, 1},
+ {0x3400, 0x4db5, 1},
+ {0x4e00, 0x9fcb, 1},
+ {0xf900, 0xfa2d, 1},
+ {0xfa30, 0xfa6d, 1},
+ {0xfa70, 0xfad9, 1},
+ {0x20000, 0x2a6d6, 1},
+ {0x2a700, 0x2b734, 1},
+ {0x2f800, 0x2fa1d, 1},
}
var _Dash = []Range{
- Range{0x002d, 0x002d, 1},
- Range{0x058a, 0x058a, 1},
- Range{0x05be, 0x05be, 1},
- Range{0x1400, 0x1400, 1},
- Range{0x1806, 0x1806, 1},
- Range{0x2010, 0x2015, 1},
- Range{0x2053, 0x2053, 1},
- Range{0x207b, 0x207b, 1},
- Range{0x208b, 0x208b, 1},
- Range{0x2212, 0x2212, 1},
- Range{0x2e17, 0x2e17, 1},
- Range{0x2e1a, 0x2e1a, 1},
- Range{0x301c, 0x301c, 1},
- Range{0x3030, 0x3030, 1},
- Range{0x30a0, 0x30a0, 1},
- Range{0xfe31, 0xfe32, 1},
- Range{0xfe58, 0xfe58, 1},
- Range{0xfe63, 0xfe63, 1},
- Range{0xff0d, 0xff0d, 1},
+ {0x002d, 0x002d, 1},
+ {0x058a, 0x058a, 1},
+ {0x05be, 0x05be, 1},
+ {0x1400, 0x1400, 1},
+ {0x1806, 0x1806, 1},
+ {0x2010, 0x2015, 1},
+ {0x2053, 0x2053, 1},
+ {0x207b, 0x207b, 1},
+ {0x208b, 0x208b, 1},
+ {0x2212, 0x2212, 1},
+ {0x2e17, 0x2e17, 1},
+ {0x2e1a, 0x2e1a, 1},
+ {0x301c, 0x301c, 1},
+ {0x3030, 0x3030, 1},
+ {0x30a0, 0x30a0, 1},
+ {0xfe31, 0xfe32, 1},
+ {0xfe58, 0xfe58, 1},
+ {0xfe63, 0xfe63, 1},
+ {0xff0d, 0xff0d, 1},
}
var _IDS_Trinary_Operator = []Range{
- Range{0x2ff2, 0x2ff3, 1},
+ {0x2ff2, 0x2ff3, 1},
}
var _Other_Grapheme_Extend = []Range{
- Range{0x09be, 0x09be, 1},
- Range{0x09d7, 0x09d7, 1},
- Range{0x0b3e, 0x0b3e, 1},
- Range{0x0b57, 0x0b57, 1},
- Range{0x0bbe, 0x0bbe, 1},
- Range{0x0bd7, 0x0bd7, 1},
- Range{0x0cc2, 0x0cc2, 1},
- Range{0x0cd5, 0x0cd6, 1},
- Range{0x0d3e, 0x0d3e, 1},
- Range{0x0d57, 0x0d57, 1},
- Range{0x0dcf, 0x0dcf, 1},
- Range{0x0ddf, 0x0ddf, 1},
- Range{0x200c, 0x200d, 1},
- Range{0xff9e, 0xff9f, 1},
- Range{0x1d165, 0x1d165, 1},
- Range{0x1d16e, 0x1d172, 1},
+ {0x09be, 0x09be, 1},
+ {0x09d7, 0x09d7, 1},
+ {0x0b3e, 0x0b3e, 1},
+ {0x0b57, 0x0b57, 1},
+ {0x0bbe, 0x0bbe, 1},
+ {0x0bd7, 0x0bd7, 1},
+ {0x0cc2, 0x0cc2, 1},
+ {0x0cd5, 0x0cd6, 1},
+ {0x0d3e, 0x0d3e, 1},
+ {0x0d57, 0x0d57, 1},
+ {0x0dcf, 0x0dcf, 1},
+ {0x0ddf, 0x0ddf, 1},
+ {0x200c, 0x200d, 1},
+ {0xff9e, 0xff9f, 1},
+ {0x1d165, 0x1d165, 1},
+ {0x1d16e, 0x1d172, 1},
}
var _Other_Default_Ignorable_Code_Point = []Range{
- Range{0x034f, 0x034f, 1},
- Range{0x115f, 0x1160, 1},
- Range{0x2065, 0x2069, 1},
- Range{0x3164, 0x3164, 1},
- Range{0xffa0, 0xffa0, 1},
- Range{0xfff0, 0xfff8, 1},
- Range{0xe0000, 0xe0000, 1},
- Range{0xe0002, 0xe001f, 1},
- Range{0xe0080, 0xe00ff, 1},
- Range{0xe01f0, 0xe0fff, 1},
+ {0x034f, 0x034f, 1},
+ {0x115f, 0x1160, 1},
+ {0x2065, 0x2069, 1},
+ {0x3164, 0x3164, 1},
+ {0xffa0, 0xffa0, 1},
+ {0xfff0, 0xfff8, 1},
+ {0xe0000, 0xe0000, 1},
+ {0xe0002, 0xe001f, 1},
+ {0xe0080, 0xe00ff, 1},
+ {0xe01f0, 0xe0fff, 1},
}
var _White_Space = []Range{
- Range{0x0009, 0x000d, 1},
- Range{0x0020, 0x0020, 1},
- Range{0x0085, 0x0085, 1},
- Range{0x00a0, 0x00a0, 1},
- Range{0x1680, 0x1680, 1},
- Range{0x180e, 0x180e, 1},
- Range{0x2000, 0x200a, 1},
- Range{0x2028, 0x2029, 1},
- Range{0x202f, 0x202f, 1},
- Range{0x205f, 0x205f, 1},
- Range{0x3000, 0x3000, 1},
+ {0x0009, 0x000d, 1},
+ {0x0020, 0x0020, 1},
+ {0x0085, 0x0085, 1},
+ {0x00a0, 0x00a0, 1},
+ {0x1680, 0x1680, 1},
+ {0x180e, 0x180e, 1},
+ {0x2000, 0x200a, 1},
+ {0x2028, 0x2029, 1},
+ {0x202f, 0x202f, 1},
+ {0x205f, 0x205f, 1},
+ {0x3000, 0x3000, 1},
}
var (
@@ -3985,254 +3985,254 @@ var (
// non-self mappings.
var CaseRanges = _CaseRanges
var _CaseRanges = []CaseRange{
- CaseRange{0x0041, 0x005A, d{0, 32, 0}},
- CaseRange{0x0061, 0x007A, d{-32, 0, -32}},
- CaseRange{0x00B5, 0x00B5, d{743, 0, 743}},
- CaseRange{0x00C0, 0x00D6, d{0, 32, 0}},
- CaseRange{0x00D8, 0x00DE, d{0, 32, 0}},
- CaseRange{0x00E0, 0x00F6, d{-32, 0, -32}},
- CaseRange{0x00F8, 0x00FE, d{-32, 0, -32}},
- CaseRange{0x00FF, 0x00FF, d{121, 0, 121}},
- CaseRange{0x0100, 0x012F, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0130, 0x0130, d{0, -199, 0}},
- CaseRange{0x0131, 0x0131, d{-232, 0, -232}},
- CaseRange{0x0132, 0x0137, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0139, 0x0148, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x014A, 0x0177, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0178, 0x0178, d{0, -121, 0}},
- CaseRange{0x0179, 0x017E, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x017F, 0x017F, d{-300, 0, -300}},
- CaseRange{0x0180, 0x0180, d{195, 0, 195}},
- CaseRange{0x0181, 0x0181, d{0, 210, 0}},
- CaseRange{0x0182, 0x0185, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0186, 0x0186, d{0, 206, 0}},
- CaseRange{0x0187, 0x0188, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0189, 0x018A, d{0, 205, 0}},
- CaseRange{0x018B, 0x018C, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x018E, 0x018E, d{0, 79, 0}},
- CaseRange{0x018F, 0x018F, d{0, 202, 0}},
- CaseRange{0x0190, 0x0190, d{0, 203, 0}},
- CaseRange{0x0191, 0x0192, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0193, 0x0193, d{0, 205, 0}},
- CaseRange{0x0194, 0x0194, d{0, 207, 0}},
- CaseRange{0x0195, 0x0195, d{97, 0, 97}},
- CaseRange{0x0196, 0x0196, d{0, 211, 0}},
- CaseRange{0x0197, 0x0197, d{0, 209, 0}},
- CaseRange{0x0198, 0x0199, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x019A, 0x019A, d{163, 0, 163}},
- CaseRange{0x019C, 0x019C, d{0, 211, 0}},
- CaseRange{0x019D, 0x019D, d{0, 213, 0}},
- CaseRange{0x019E, 0x019E, d{130, 0, 130}},
- CaseRange{0x019F, 0x019F, d{0, 214, 0}},
- CaseRange{0x01A0, 0x01A5, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01A6, 0x01A6, d{0, 218, 0}},
- CaseRange{0x01A7, 0x01A8, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01A9, 0x01A9, d{0, 218, 0}},
- CaseRange{0x01AC, 0x01AD, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01AE, 0x01AE, d{0, 218, 0}},
- CaseRange{0x01AF, 0x01B0, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01B1, 0x01B2, d{0, 217, 0}},
- CaseRange{0x01B3, 0x01B6, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01B7, 0x01B7, d{0, 219, 0}},
- CaseRange{0x01B8, 0x01B9, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01BC, 0x01BD, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01BF, 0x01BF, d{56, 0, 56}},
- CaseRange{0x01C4, 0x01C4, d{0, 2, 1}},
- CaseRange{0x01C5, 0x01C5, d{-1, 1, 0}},
- CaseRange{0x01C6, 0x01C6, d{-2, 0, -1}},
- CaseRange{0x01C7, 0x01C7, d{0, 2, 1}},
- CaseRange{0x01C8, 0x01C8, d{-1, 1, 0}},
- CaseRange{0x01C9, 0x01C9, d{-2, 0, -1}},
- CaseRange{0x01CA, 0x01CA, d{0, 2, 1}},
- CaseRange{0x01CB, 0x01CB, d{-1, 1, 0}},
- CaseRange{0x01CC, 0x01CC, d{-2, 0, -1}},
- CaseRange{0x01CD, 0x01DC, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01DD, 0x01DD, d{-79, 0, -79}},
- CaseRange{0x01DE, 0x01EF, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01F1, 0x01F1, d{0, 2, 1}},
- CaseRange{0x01F2, 0x01F2, d{-1, 1, 0}},
- CaseRange{0x01F3, 0x01F3, d{-2, 0, -1}},
- CaseRange{0x01F4, 0x01F5, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x01F6, 0x01F6, d{0, -97, 0}},
- CaseRange{0x01F7, 0x01F7, d{0, -56, 0}},
- CaseRange{0x01F8, 0x021F, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0220, 0x0220, d{0, -130, 0}},
- CaseRange{0x0222, 0x0233, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x023A, 0x023A, d{0, 10795, 0}},
- CaseRange{0x023B, 0x023C, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x023D, 0x023D, d{0, -163, 0}},
- CaseRange{0x023E, 0x023E, d{0, 10792, 0}},
- CaseRange{0x023F, 0x0240, d{10815, 0, 10815}},
- CaseRange{0x0241, 0x0242, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0243, 0x0243, d{0, -195, 0}},
- CaseRange{0x0244, 0x0244, d{0, 69, 0}},
- CaseRange{0x0245, 0x0245, d{0, 71, 0}},
- CaseRange{0x0246, 0x024F, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0250, 0x0250, d{10783, 0, 10783}},
- CaseRange{0x0251, 0x0251, d{10780, 0, 10780}},
- CaseRange{0x0252, 0x0252, d{10782, 0, 10782}},
- CaseRange{0x0253, 0x0253, d{-210, 0, -210}},
- CaseRange{0x0254, 0x0254, d{-206, 0, -206}},
- CaseRange{0x0256, 0x0257, d{-205, 0, -205}},
- CaseRange{0x0259, 0x0259, d{-202, 0, -202}},
- CaseRange{0x025B, 0x025B, d{-203, 0, -203}},
- CaseRange{0x0260, 0x0260, d{-205, 0, -205}},
- CaseRange{0x0263, 0x0263, d{-207, 0, -207}},
- CaseRange{0x0268, 0x0268, d{-209, 0, -209}},
- CaseRange{0x0269, 0x0269, d{-211, 0, -211}},
- CaseRange{0x026B, 0x026B, d{10743, 0, 10743}},
- CaseRange{0x026F, 0x026F, d{-211, 0, -211}},
- CaseRange{0x0271, 0x0271, d{10749, 0, 10749}},
- CaseRange{0x0272, 0x0272, d{-213, 0, -213}},
- CaseRange{0x0275, 0x0275, d{-214, 0, -214}},
- CaseRange{0x027D, 0x027D, d{10727, 0, 10727}},
- CaseRange{0x0280, 0x0280, d{-218, 0, -218}},
- CaseRange{0x0283, 0x0283, d{-218, 0, -218}},
- CaseRange{0x0288, 0x0288, d{-218, 0, -218}},
- CaseRange{0x0289, 0x0289, d{-69, 0, -69}},
- CaseRange{0x028A, 0x028B, d{-217, 0, -217}},
- CaseRange{0x028C, 0x028C, d{-71, 0, -71}},
- CaseRange{0x0292, 0x0292, d{-219, 0, -219}},
- CaseRange{0x0370, 0x0373, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0376, 0x0377, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x037B, 0x037D, d{130, 0, 130}},
- CaseRange{0x0386, 0x0386, d{0, 38, 0}},
- CaseRange{0x0388, 0x038A, d{0, 37, 0}},
- CaseRange{0x038C, 0x038C, d{0, 64, 0}},
- CaseRange{0x038E, 0x038F, d{0, 63, 0}},
- CaseRange{0x0391, 0x03A1, d{0, 32, 0}},
- CaseRange{0x03A3, 0x03AB, d{0, 32, 0}},
- CaseRange{0x03AC, 0x03AC, d{-38, 0, -38}},
- CaseRange{0x03AD, 0x03AF, d{-37, 0, -37}},
- CaseRange{0x03B1, 0x03C1, d{-32, 0, -32}},
- CaseRange{0x03C2, 0x03C2, d{-31, 0, -31}},
- CaseRange{0x03C3, 0x03CB, d{-32, 0, -32}},
- CaseRange{0x03CC, 0x03CC, d{-64, 0, -64}},
- CaseRange{0x03CD, 0x03CE, d{-63, 0, -63}},
- CaseRange{0x03CF, 0x03CF, d{0, 8, 0}},
- CaseRange{0x03D0, 0x03D0, d{-62, 0, -62}},
- CaseRange{0x03D1, 0x03D1, d{-57, 0, -57}},
- CaseRange{0x03D5, 0x03D5, d{-47, 0, -47}},
- CaseRange{0x03D6, 0x03D6, d{-54, 0, -54}},
- CaseRange{0x03D7, 0x03D7, d{-8, 0, -8}},
- CaseRange{0x03D8, 0x03EF, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x03F0, 0x03F0, d{-86, 0, -86}},
- CaseRange{0x03F1, 0x03F1, d{-80, 0, -80}},
- CaseRange{0x03F2, 0x03F2, d{7, 0, 7}},
- CaseRange{0x03F4, 0x03F4, d{0, -60, 0}},
- CaseRange{0x03F5, 0x03F5, d{-96, 0, -96}},
- CaseRange{0x03F7, 0x03F8, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x03F9, 0x03F9, d{0, -7, 0}},
- CaseRange{0x03FA, 0x03FB, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x03FD, 0x03FF, d{0, -130, 0}},
- CaseRange{0x0400, 0x040F, d{0, 80, 0}},
- CaseRange{0x0410, 0x042F, d{0, 32, 0}},
- CaseRange{0x0430, 0x044F, d{-32, 0, -32}},
- CaseRange{0x0450, 0x045F, d{-80, 0, -80}},
- CaseRange{0x0460, 0x0481, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x048A, 0x04BF, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x04C0, 0x04C0, d{0, 15, 0}},
- CaseRange{0x04C1, 0x04CE, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x04CF, 0x04CF, d{-15, 0, -15}},
- CaseRange{0x04D0, 0x0525, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x0531, 0x0556, d{0, 48, 0}},
- CaseRange{0x0561, 0x0586, d{-48, 0, -48}},
- CaseRange{0x10A0, 0x10C5, d{0, 7264, 0}},
- CaseRange{0x1D79, 0x1D79, d{35332, 0, 35332}},
- CaseRange{0x1D7D, 0x1D7D, d{3814, 0, 3814}},
- CaseRange{0x1E00, 0x1E95, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x1E9B, 0x1E9B, d{-59, 0, -59}},
- CaseRange{0x1E9E, 0x1E9E, d{0, -7615, 0}},
- CaseRange{0x1EA0, 0x1EFF, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x1F00, 0x1F07, d{8, 0, 8}},
- CaseRange{0x1F08, 0x1F0F, d{0, -8, 0}},
- CaseRange{0x1F10, 0x1F15, d{8, 0, 8}},
- CaseRange{0x1F18, 0x1F1D, d{0, -8, 0}},
- CaseRange{0x1F20, 0x1F27, d{8, 0, 8}},
- CaseRange{0x1F28, 0x1F2F, d{0, -8, 0}},
- CaseRange{0x1F30, 0x1F37, d{8, 0, 8}},
- CaseRange{0x1F38, 0x1F3F, d{0, -8, 0}},
- CaseRange{0x1F40, 0x1F45, d{8, 0, 8}},
- CaseRange{0x1F48, 0x1F4D, d{0, -8, 0}},
- CaseRange{0x1F51, 0x1F51, d{8, 0, 8}},
- CaseRange{0x1F53, 0x1F53, d{8, 0, 8}},
- CaseRange{0x1F55, 0x1F55, d{8, 0, 8}},
- CaseRange{0x1F57, 0x1F57, d{8, 0, 8}},
- CaseRange{0x1F59, 0x1F59, d{0, -8, 0}},
- CaseRange{0x1F5B, 0x1F5B, d{0, -8, 0}},
- CaseRange{0x1F5D, 0x1F5D, d{0, -8, 0}},
- CaseRange{0x1F5F, 0x1F5F, d{0, -8, 0}},
- CaseRange{0x1F60, 0x1F67, d{8, 0, 8}},
- CaseRange{0x1F68, 0x1F6F, d{0, -8, 0}},
- CaseRange{0x1F70, 0x1F71, d{74, 0, 74}},
- CaseRange{0x1F72, 0x1F75, d{86, 0, 86}},
- CaseRange{0x1F76, 0x1F77, d{100, 0, 100}},
- CaseRange{0x1F78, 0x1F79, d{128, 0, 128}},
- CaseRange{0x1F7A, 0x1F7B, d{112, 0, 112}},
- CaseRange{0x1F7C, 0x1F7D, d{126, 0, 126}},
- CaseRange{0x1F80, 0x1F87, d{8, 0, 8}},
- CaseRange{0x1F88, 0x1F8F, d{0, -8, 0}},
- CaseRange{0x1F90, 0x1F97, d{8, 0, 8}},
- CaseRange{0x1F98, 0x1F9F, d{0, -8, 0}},
- CaseRange{0x1FA0, 0x1FA7, d{8, 0, 8}},
- CaseRange{0x1FA8, 0x1FAF, d{0, -8, 0}},
- CaseRange{0x1FB0, 0x1FB1, d{8, 0, 8}},
- CaseRange{0x1FB3, 0x1FB3, d{9, 0, 9}},
- CaseRange{0x1FB8, 0x1FB9, d{0, -8, 0}},
- CaseRange{0x1FBA, 0x1FBB, d{0, -74, 0}},
- CaseRange{0x1FBC, 0x1FBC, d{0, -9, 0}},
- CaseRange{0x1FBE, 0x1FBE, d{-7205, 0, -7205}},
- CaseRange{0x1FC3, 0x1FC3, d{9, 0, 9}},
- CaseRange{0x1FC8, 0x1FCB, d{0, -86, 0}},
- CaseRange{0x1FCC, 0x1FCC, d{0, -9, 0}},
- CaseRange{0x1FD0, 0x1FD1, d{8, 0, 8}},
- CaseRange{0x1FD8, 0x1FD9, d{0, -8, 0}},
- CaseRange{0x1FDA, 0x1FDB, d{0, -100, 0}},
- CaseRange{0x1FE0, 0x1FE1, d{8, 0, 8}},
- CaseRange{0x1FE5, 0x1FE5, d{7, 0, 7}},
- CaseRange{0x1FE8, 0x1FE9, d{0, -8, 0}},
- CaseRange{0x1FEA, 0x1FEB, d{0, -112, 0}},
- CaseRange{0x1FEC, 0x1FEC, d{0, -7, 0}},
- CaseRange{0x1FF3, 0x1FF3, d{9, 0, 9}},
- CaseRange{0x1FF8, 0x1FF9, d{0, -128, 0}},
- CaseRange{0x1FFA, 0x1FFB, d{0, -126, 0}},
- CaseRange{0x1FFC, 0x1FFC, d{0, -9, 0}},
- CaseRange{0x2126, 0x2126, d{0, -7517, 0}},
- CaseRange{0x212A, 0x212A, d{0, -8383, 0}},
- CaseRange{0x212B, 0x212B, d{0, -8262, 0}},
- CaseRange{0x2132, 0x2132, d{0, 28, 0}},
- CaseRange{0x214E, 0x214E, d{-28, 0, -28}},
- CaseRange{0x2183, 0x2184, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2C00, 0x2C2E, d{0, 48, 0}},
- CaseRange{0x2C30, 0x2C5E, d{-48, 0, -48}},
- CaseRange{0x2C60, 0x2C61, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2C62, 0x2C62, d{0, -10743, 0}},
- CaseRange{0x2C63, 0x2C63, d{0, -3814, 0}},
- CaseRange{0x2C64, 0x2C64, d{0, -10727, 0}},
- CaseRange{0x2C65, 0x2C65, d{-10795, 0, -10795}},
- CaseRange{0x2C66, 0x2C66, d{-10792, 0, -10792}},
- CaseRange{0x2C67, 0x2C6C, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2C6D, 0x2C6D, d{0, -10780, 0}},
- CaseRange{0x2C6E, 0x2C6E, d{0, -10749, 0}},
- CaseRange{0x2C6F, 0x2C6F, d{0, -10783, 0}},
- CaseRange{0x2C70, 0x2C70, d{0, -10782, 0}},
- CaseRange{0x2C72, 0x2C73, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2C75, 0x2C76, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2C7E, 0x2C7F, d{0, -10815, 0}},
- CaseRange{0x2C80, 0x2CE3, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2CEB, 0x2CEE, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0x2D00, 0x2D25, d{-7264, 0, -7264}},
- CaseRange{0xA640, 0xA65F, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA662, 0xA66D, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA680, 0xA697, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA722, 0xA72F, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA732, 0xA76F, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA779, 0xA77C, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA77D, 0xA77D, d{0, -35332, 0}},
- CaseRange{0xA77E, 0xA787, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xA78B, 0xA78C, d{UpperLower, UpperLower, UpperLower}},
- CaseRange{0xFF21, 0xFF3A, d{0, 32, 0}},
- CaseRange{0xFF41, 0xFF5A, d{-32, 0, -32}},
- CaseRange{0x10400, 0x10427, d{0, 40, 0}},
- CaseRange{0x10428, 0x1044F, d{-40, 0, -40}},
+ {0x0041, 0x005A, d{0, 32, 0}},
+ {0x0061, 0x007A, d{-32, 0, -32}},
+ {0x00B5, 0x00B5, d{743, 0, 743}},
+ {0x00C0, 0x00D6, d{0, 32, 0}},
+ {0x00D8, 0x00DE, d{0, 32, 0}},
+ {0x00E0, 0x00F6, d{-32, 0, -32}},
+ {0x00F8, 0x00FE, d{-32, 0, -32}},
+ {0x00FF, 0x00FF, d{121, 0, 121}},
+ {0x0100, 0x012F, d{UpperLower, UpperLower, UpperLower}},
+ {0x0130, 0x0130, d{0, -199, 0}},
+ {0x0131, 0x0131, d{-232, 0, -232}},
+ {0x0132, 0x0137, d{UpperLower, UpperLower, UpperLower}},
+ {0x0139, 0x0148, d{UpperLower, UpperLower, UpperLower}},
+ {0x014A, 0x0177, d{UpperLower, UpperLower, UpperLower}},
+ {0x0178, 0x0178, d{0, -121, 0}},
+ {0x0179, 0x017E, d{UpperLower, UpperLower, UpperLower}},
+ {0x017F, 0x017F, d{-300, 0, -300}},
+ {0x0180, 0x0180, d{195, 0, 195}},
+ {0x0181, 0x0181, d{0, 210, 0}},
+ {0x0182, 0x0185, d{UpperLower, UpperLower, UpperLower}},
+ {0x0186, 0x0186, d{0, 206, 0}},
+ {0x0187, 0x0188, d{UpperLower, UpperLower, UpperLower}},
+ {0x0189, 0x018A, d{0, 205, 0}},
+ {0x018B, 0x018C, d{UpperLower, UpperLower, UpperLower}},
+ {0x018E, 0x018E, d{0, 79, 0}},
+ {0x018F, 0x018F, d{0, 202, 0}},
+ {0x0190, 0x0190, d{0, 203, 0}},
+ {0x0191, 0x0192, d{UpperLower, UpperLower, UpperLower}},
+ {0x0193, 0x0193, d{0, 205, 0}},
+ {0x0194, 0x0194, d{0, 207, 0}},
+ {0x0195, 0x0195, d{97, 0, 97}},
+ {0x0196, 0x0196, d{0, 211, 0}},
+ {0x0197, 0x0197, d{0, 209, 0}},
+ {0x0198, 0x0199, d{UpperLower, UpperLower, UpperLower}},
+ {0x019A, 0x019A, d{163, 0, 163}},
+ {0x019C, 0x019C, d{0, 211, 0}},
+ {0x019D, 0x019D, d{0, 213, 0}},
+ {0x019E, 0x019E, d{130, 0, 130}},
+ {0x019F, 0x019F, d{0, 214, 0}},
+ {0x01A0, 0x01A5, d{UpperLower, UpperLower, UpperLower}},
+ {0x01A6, 0x01A6, d{0, 218, 0}},
+ {0x01A7, 0x01A8, d{UpperLower, UpperLower, UpperLower}},
+ {0x01A9, 0x01A9, d{0, 218, 0}},
+ {0x01AC, 0x01AD, d{UpperLower, UpperLower, UpperLower}},
+ {0x01AE, 0x01AE, d{0, 218, 0}},
+ {0x01AF, 0x01B0, d{UpperLower, UpperLower, UpperLower}},
+ {0x01B1, 0x01B2, d{0, 217, 0}},
+ {0x01B3, 0x01B6, d{UpperLower, UpperLower, UpperLower}},
+ {0x01B7, 0x01B7, d{0, 219, 0}},
+ {0x01B8, 0x01B9, d{UpperLower, UpperLower, UpperLower}},
+ {0x01BC, 0x01BD, d{UpperLower, UpperLower, UpperLower}},
+ {0x01BF, 0x01BF, d{56, 0, 56}},
+ {0x01C4, 0x01C4, d{0, 2, 1}},
+ {0x01C5, 0x01C5, d{-1, 1, 0}},
+ {0x01C6, 0x01C6, d{-2, 0, -1}},
+ {0x01C7, 0x01C7, d{0, 2, 1}},
+ {0x01C8, 0x01C8, d{-1, 1, 0}},
+ {0x01C9, 0x01C9, d{-2, 0, -1}},
+ {0x01CA, 0x01CA, d{0, 2, 1}},
+ {0x01CB, 0x01CB, d{-1, 1, 0}},
+ {0x01CC, 0x01CC, d{-2, 0, -1}},
+ {0x01CD, 0x01DC, d{UpperLower, UpperLower, UpperLower}},
+ {0x01DD, 0x01DD, d{-79, 0, -79}},
+ {0x01DE, 0x01EF, d{UpperLower, UpperLower, UpperLower}},
+ {0x01F1, 0x01F1, d{0, 2, 1}},
+ {0x01F2, 0x01F2, d{-1, 1, 0}},
+ {0x01F3, 0x01F3, d{-2, 0, -1}},
+ {0x01F4, 0x01F5, d{UpperLower, UpperLower, UpperLower}},
+ {0x01F6, 0x01F6, d{0, -97, 0}},
+ {0x01F7, 0x01F7, d{0, -56, 0}},
+ {0x01F8, 0x021F, d{UpperLower, UpperLower, UpperLower}},
+ {0x0220, 0x0220, d{0, -130, 0}},
+ {0x0222, 0x0233, d{UpperLower, UpperLower, UpperLower}},
+ {0x023A, 0x023A, d{0, 10795, 0}},
+ {0x023B, 0x023C, d{UpperLower, UpperLower, UpperLower}},
+ {0x023D, 0x023D, d{0, -163, 0}},
+ {0x023E, 0x023E, d{0, 10792, 0}},
+ {0x023F, 0x0240, d{10815, 0, 10815}},
+ {0x0241, 0x0242, d{UpperLower, UpperLower, UpperLower}},
+ {0x0243, 0x0243, d{0, -195, 0}},
+ {0x0244, 0x0244, d{0, 69, 0}},
+ {0x0245, 0x0245, d{0, 71, 0}},
+ {0x0246, 0x024F, d{UpperLower, UpperLower, UpperLower}},
+ {0x0250, 0x0250, d{10783, 0, 10783}},
+ {0x0251, 0x0251, d{10780, 0, 10780}},
+ {0x0252, 0x0252, d{10782, 0, 10782}},
+ {0x0253, 0x0253, d{-210, 0, -210}},
+ {0x0254, 0x0254, d{-206, 0, -206}},
+ {0x0256, 0x0257, d{-205, 0, -205}},
+ {0x0259, 0x0259, d{-202, 0, -202}},
+ {0x025B, 0x025B, d{-203, 0, -203}},
+ {0x0260, 0x0260, d{-205, 0, -205}},
+ {0x0263, 0x0263, d{-207, 0, -207}},
+ {0x0268, 0x0268, d{-209, 0, -209}},
+ {0x0269, 0x0269, d{-211, 0, -211}},
+ {0x026B, 0x026B, d{10743, 0, 10743}},
+ {0x026F, 0x026F, d{-211, 0, -211}},
+ {0x0271, 0x0271, d{10749, 0, 10749}},
+ {0x0272, 0x0272, d{-213, 0, -213}},
+ {0x0275, 0x0275, d{-214, 0, -214}},
+ {0x027D, 0x027D, d{10727, 0, 10727}},
+ {0x0280, 0x0280, d{-218, 0, -218}},
+ {0x0283, 0x0283, d{-218, 0, -218}},
+ {0x0288, 0x0288, d{-218, 0, -218}},
+ {0x0289, 0x0289, d{-69, 0, -69}},
+ {0x028A, 0x028B, d{-217, 0, -217}},
+ {0x028C, 0x028C, d{-71, 0, -71}},
+ {0x0292, 0x0292, d{-219, 0, -219}},
+ {0x0370, 0x0373, d{UpperLower, UpperLower, UpperLower}},
+ {0x0376, 0x0377, d{UpperLower, UpperLower, UpperLower}},
+ {0x037B, 0x037D, d{130, 0, 130}},
+ {0x0386, 0x0386, d{0, 38, 0}},
+ {0x0388, 0x038A, d{0, 37, 0}},
+ {0x038C, 0x038C, d{0, 64, 0}},
+ {0x038E, 0x038F, d{0, 63, 0}},
+ {0x0391, 0x03A1, d{0, 32, 0}},
+ {0x03A3, 0x03AB, d{0, 32, 0}},
+ {0x03AC, 0x03AC, d{-38, 0, -38}},
+ {0x03AD, 0x03AF, d{-37, 0, -37}},
+ {0x03B1, 0x03C1, d{-32, 0, -32}},
+ {0x03C2, 0x03C2, d{-31, 0, -31}},
+ {0x03C3, 0x03CB, d{-32, 0, -32}},
+ {0x03CC, 0x03CC, d{-64, 0, -64}},
+ {0x03CD, 0x03CE, d{-63, 0, -63}},
+ {0x03CF, 0x03CF, d{0, 8, 0}},
+ {0x03D0, 0x03D0, d{-62, 0, -62}},
+ {0x03D1, 0x03D1, d{-57, 0, -57}},
+ {0x03D5, 0x03D5, d{-47, 0, -47}},
+ {0x03D6, 0x03D6, d{-54, 0, -54}},
+ {0x03D7, 0x03D7, d{-8, 0, -8}},
+ {0x03D8, 0x03EF, d{UpperLower, UpperLower, UpperLower}},
+ {0x03F0, 0x03F0, d{-86, 0, -86}},
+ {0x03F1, 0x03F1, d{-80, 0, -80}},
+ {0x03F2, 0x03F2, d{7, 0, 7}},
+ {0x03F4, 0x03F4, d{0, -60, 0}},
+ {0x03F5, 0x03F5, d{-96, 0, -96}},
+ {0x03F7, 0x03F8, d{UpperLower, UpperLower, UpperLower}},
+ {0x03F9, 0x03F9, d{0, -7, 0}},
+ {0x03FA, 0x03FB, d{UpperLower, UpperLower, UpperLower}},
+ {0x03FD, 0x03FF, d{0, -130, 0}},
+ {0x0400, 0x040F, d{0, 80, 0}},
+ {0x0410, 0x042F, d{0, 32, 0}},
+ {0x0430, 0x044F, d{-32, 0, -32}},
+ {0x0450, 0x045F, d{-80, 0, -80}},
+ {0x0460, 0x0481, d{UpperLower, UpperLower, UpperLower}},
+ {0x048A, 0x04BF, d{UpperLower, UpperLower, UpperLower}},
+ {0x04C0, 0x04C0, d{0, 15, 0}},
+ {0x04C1, 0x04CE, d{UpperLower, UpperLower, UpperLower}},
+ {0x04CF, 0x04CF, d{-15, 0, -15}},
+ {0x04D0, 0x0525, d{UpperLower, UpperLower, UpperLower}},
+ {0x0531, 0x0556, d{0, 48, 0}},
+ {0x0561, 0x0586, d{-48, 0, -48}},
+ {0x10A0, 0x10C5, d{0, 7264, 0}},
+ {0x1D79, 0x1D79, d{35332, 0, 35332}},
+ {0x1D7D, 0x1D7D, d{3814, 0, 3814}},
+ {0x1E00, 0x1E95, d{UpperLower, UpperLower, UpperLower}},
+ {0x1E9B, 0x1E9B, d{-59, 0, -59}},
+ {0x1E9E, 0x1E9E, d{0, -7615, 0}},
+ {0x1EA0, 0x1EFF, d{UpperLower, UpperLower, UpperLower}},
+ {0x1F00, 0x1F07, d{8, 0, 8}},
+ {0x1F08, 0x1F0F, d{0, -8, 0}},
+ {0x1F10, 0x1F15, d{8, 0, 8}},
+ {0x1F18, 0x1F1D, d{0, -8, 0}},
+ {0x1F20, 0x1F27, d{8, 0, 8}},
+ {0x1F28, 0x1F2F, d{0, -8, 0}},
+ {0x1F30, 0x1F37, d{8, 0, 8}},
+ {0x1F38, 0x1F3F, d{0, -8, 0}},
+ {0x1F40, 0x1F45, d{8, 0, 8}},
+ {0x1F48, 0x1F4D, d{0, -8, 0}},
+ {0x1F51, 0x1F51, d{8, 0, 8}},
+ {0x1F53, 0x1F53, d{8, 0, 8}},
+ {0x1F55, 0x1F55, d{8, 0, 8}},
+ {0x1F57, 0x1F57, d{8, 0, 8}},
+ {0x1F59, 0x1F59, d{0, -8, 0}},
+ {0x1F5B, 0x1F5B, d{0, -8, 0}},
+ {0x1F5D, 0x1F5D, d{0, -8, 0}},
+ {0x1F5F, 0x1F5F, d{0, -8, 0}},
+ {0x1F60, 0x1F67, d{8, 0, 8}},
+ {0x1F68, 0x1F6F, d{0, -8, 0}},
+ {0x1F70, 0x1F71, d{74, 0, 74}},
+ {0x1F72, 0x1F75, d{86, 0, 86}},
+ {0x1F76, 0x1F77, d{100, 0, 100}},
+ {0x1F78, 0x1F79, d{128, 0, 128}},
+ {0x1F7A, 0x1F7B, d{112, 0, 112}},
+ {0x1F7C, 0x1F7D, d{126, 0, 126}},
+ {0x1F80, 0x1F87, d{8, 0, 8}},
+ {0x1F88, 0x1F8F, d{0, -8, 0}},
+ {0x1F90, 0x1F97, d{8, 0, 8}},
+ {0x1F98, 0x1F9F, d{0, -8, 0}},
+ {0x1FA0, 0x1FA7, d{8, 0, 8}},
+ {0x1FA8, 0x1FAF, d{0, -8, 0}},
+ {0x1FB0, 0x1FB1, d{8, 0, 8}},
+ {0x1FB3, 0x1FB3, d{9, 0, 9}},
+ {0x1FB8, 0x1FB9, d{0, -8, 0}},
+ {0x1FBA, 0x1FBB, d{0, -74, 0}},
+ {0x1FBC, 0x1FBC, d{0, -9, 0}},
+ {0x1FBE, 0x1FBE, d{-7205, 0, -7205}},
+ {0x1FC3, 0x1FC3, d{9, 0, 9}},
+ {0x1FC8, 0x1FCB, d{0, -86, 0}},
+ {0x1FCC, 0x1FCC, d{0, -9, 0}},
+ {0x1FD0, 0x1FD1, d{8, 0, 8}},
+ {0x1FD8, 0x1FD9, d{0, -8, 0}},
+ {0x1FDA, 0x1FDB, d{0, -100, 0}},
+ {0x1FE0, 0x1FE1, d{8, 0, 8}},
+ {0x1FE5, 0x1FE5, d{7, 0, 7}},
+ {0x1FE8, 0x1FE9, d{0, -8, 0}},
+ {0x1FEA, 0x1FEB, d{0, -112, 0}},
+ {0x1FEC, 0x1FEC, d{0, -7, 0}},
+ {0x1FF3, 0x1FF3, d{9, 0, 9}},
+ {0x1FF8, 0x1FF9, d{0, -128, 0}},
+ {0x1FFA, 0x1FFB, d{0, -126, 0}},
+ {0x1FFC, 0x1FFC, d{0, -9, 0}},
+ {0x2126, 0x2126, d{0, -7517, 0}},
+ {0x212A, 0x212A, d{0, -8383, 0}},
+ {0x212B, 0x212B, d{0, -8262, 0}},
+ {0x2132, 0x2132, d{0, 28, 0}},
+ {0x214E, 0x214E, d{-28, 0, -28}},
+ {0x2183, 0x2184, d{UpperLower, UpperLower, UpperLower}},
+ {0x2C00, 0x2C2E, d{0, 48, 0}},
+ {0x2C30, 0x2C5E, d{-48, 0, -48}},
+ {0x2C60, 0x2C61, d{UpperLower, UpperLower, UpperLower}},
+ {0x2C62, 0x2C62, d{0, -10743, 0}},
+ {0x2C63, 0x2C63, d{0, -3814, 0}},
+ {0x2C64, 0x2C64, d{0, -10727, 0}},
+ {0x2C65, 0x2C65, d{-10795, 0, -10795}},
+ {0x2C66, 0x2C66, d{-10792, 0, -10792}},
+ {0x2C67, 0x2C6C, d{UpperLower, UpperLower, UpperLower}},
+ {0x2C6D, 0x2C6D, d{0, -10780, 0}},
+ {0x2C6E, 0x2C6E, d{0, -10749, 0}},
+ {0x2C6F, 0x2C6F, d{0, -10783, 0}},
+ {0x2C70, 0x2C70, d{0, -10782, 0}},
+ {0x2C72, 0x2C73, d{UpperLower, UpperLower, UpperLower}},
+ {0x2C75, 0x2C76, d{UpperLower, UpperLower, UpperLower}},
+ {0x2C7E, 0x2C7F, d{0, -10815, 0}},
+ {0x2C80, 0x2CE3, d{UpperLower, UpperLower, UpperLower}},
+ {0x2CEB, 0x2CEE, d{UpperLower, UpperLower, UpperLower}},
+ {0x2D00, 0x2D25, d{-7264, 0, -7264}},
+ {0xA640, 0xA65F, d{UpperLower, UpperLower, UpperLower}},
+ {0xA662, 0xA66D, d{UpperLower, UpperLower, UpperLower}},
+ {0xA680, 0xA697, d{UpperLower, UpperLower, UpperLower}},
+ {0xA722, 0xA72F, d{UpperLower, UpperLower, UpperLower}},
+ {0xA732, 0xA76F, d{UpperLower, UpperLower, UpperLower}},
+ {0xA779, 0xA77C, d{UpperLower, UpperLower, UpperLower}},
+ {0xA77D, 0xA77D, d{0, -35332, 0}},
+ {0xA77E, 0xA787, d{UpperLower, UpperLower, UpperLower}},
+ {0xA78B, 0xA78C, d{UpperLower, UpperLower, UpperLower}},
+ {0xFF21, 0xFF3A, d{0, 32, 0}},
+ {0xFF41, 0xFF5A, d{-32, 0, -32}},
+ {0x10400, 0x10427, d{0, 40, 0}},
+ {0x10428, 0x1044F, d{-40, 0, -40}},
}
diff --git a/src/pkg/utf16/utf16_test.go b/src/pkg/utf16/utf16_test.go
index 87e38126e9..2b9fb3d87d 100644
--- a/src/pkg/utf16/utf16_test.go
+++ b/src/pkg/utf16/utf16_test.go
@@ -18,10 +18,10 @@ type encodeTest struct {
}
var encodeTests = []encodeTest{
- encodeTest{[]int{1, 2, 3, 4}, []uint16{1, 2, 3, 4}},
- encodeTest{[]int{0xffff, 0x10000, 0x10001, 0x12345, 0x10ffff},
+ {[]int{1, 2, 3, 4}, []uint16{1, 2, 3, 4}},
+ {[]int{0xffff, 0x10000, 0x10001, 0x12345, 0x10ffff},
[]uint16{0xffff, 0xd800, 0xdc00, 0xd800, 0xdc01, 0xd808, 0xdf45, 0xdbff, 0xdfff}},
- encodeTest{[]int{'a', 'b', 0xd7ff, 0xd800, 0xdfff, 0xe000, 0x110000, -1},
+ {[]int{'a', 'b', 0xd7ff, 0xd800, 0xdfff, 0xe000, 0x110000, -1},
[]uint16{'a', 'b', 0xd7ff, 0xfffd, 0xfffd, 0xe000, 0xfffd, 0xfffd}},
}
@@ -75,11 +75,11 @@ type decodeTest struct {
}
var decodeTests = []decodeTest{
- decodeTest{[]uint16{1, 2, 3, 4}, []int{1, 2, 3, 4}},
- decodeTest{[]uint16{0xffff, 0xd800, 0xdc00, 0xd800, 0xdc01, 0xd808, 0xdf45, 0xdbff, 0xdfff},
+ {[]uint16{1, 2, 3, 4}, []int{1, 2, 3, 4}},
+ {[]uint16{0xffff, 0xd800, 0xdc00, 0xd800, 0xdc01, 0xd808, 0xdf45, 0xdbff, 0xdfff},
[]int{0xffff, 0x10000, 0x10001, 0x12345, 0x10ffff}},
- decodeTest{[]uint16{0xd800, 'a'}, []int{0xfffd, 'a'}},
- decodeTest{[]uint16{0xdfff}, []int{0xfffd}},
+ {[]uint16{0xd800, 'a'}, []int{0xfffd, 'a'}},
+ {[]uint16{0xdfff}, []int{0xfffd}},
}
func TestDecode(t *testing.T) {
diff --git a/src/pkg/utf8/utf8_test.go b/src/pkg/utf8/utf8_test.go
index 92e6bd3aab..dc130f606f 100644
--- a/src/pkg/utf8/utf8_test.go
+++ b/src/pkg/utf8/utf8_test.go
@@ -16,32 +16,32 @@ type Utf8Map struct {
}
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"},
- Utf8Map{0xFFFD, "\xef\xbf\xbd"},
+ {0x0000, "\x00"},
+ {0x0001, "\x01"},
+ {0x007e, "\x7e"},
+ {0x007f, "\x7f"},
+ {0x0080, "\xc2\x80"},
+ {0x0081, "\xc2\x81"},
+ {0x00bf, "\xc2\xbf"},
+ {0x00c0, "\xc3\x80"},
+ {0x00c1, "\xc3\x81"},
+ {0x00c8, "\xc3\x88"},
+ {0x00d0, "\xc3\x90"},
+ {0x00e0, "\xc3\xa0"},
+ {0x00f0, "\xc3\xb0"},
+ {0x00f8, "\xc3\xb8"},
+ {0x00ff, "\xc3\xbf"},
+ {0x0100, "\xc4\x80"},
+ {0x07ff, "\xdf\xbf"},
+ {0x0800, "\xe0\xa0\x80"},
+ {0x0801, "\xe0\xa0\x81"},
+ {0xfffe, "\xef\xbf\xbe"},
+ {0xffff, "\xef\xbf\xbf"},
+ {0x10000, "\xf0\x90\x80\x80"},
+ {0x10001, "\xf0\x90\x80\x81"},
+ {0x10fffe, "\xf4\x8f\xbf\xbe"},
+ {0x10ffff, "\xf4\x8f\xbf\xbf"},
+ {0xFFFD, "\xef\xbf\xbd"},
}
var testStrings = []string{
@@ -256,10 +256,10 @@ type RuneCountTest struct {
}
var runecounttests = []RuneCountTest{
- RuneCountTest{"abcd", 4},
- RuneCountTest{"☺☻☹", 3},
- RuneCountTest{"1,2,3,4", 7},
- RuneCountTest{"\xe2\x00", 2},
+ {"abcd", 4},
+ {"☺☻☹", 3},
+ {"1,2,3,4", 7},
+ {"\xe2\x00", 2},
}
func TestRuneCount(t *testing.T) {
diff --git a/src/pkg/xml/read_test.go b/src/pkg/xml/read_test.go
index a080c016fb..9ec1065c23 100644
--- a/src/pkg/xml/read_test.go
+++ b/src/pkg/xml/read_test.go
@@ -119,8 +119,8 @@ var rssFeed = Feed{
XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
Title: "Code Review - My issues",
Link: []Link{
- Link{Rel: "alternate", Href: "http://codereview.appspot.com/"},
- Link{Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"},
+ {Rel: "alternate", Href: "http://codereview.appspot.com/"},
+ {Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"},
},
Id: "http://codereview.appspot.com/",
Updated: "2009-10-04T01:35:58+00:00",
@@ -129,10 +129,10 @@ var rssFeed = Feed{
InnerXML: "<name>rietveld&lt;&gt;</name>",
},
Entry: []Entry{
- Entry{
+ {
Title: "rietveld: an attempt at pubsubhubbub\n",
Link: []Link{
- Link{Rel: "alternate", Href: "http://codereview.appspot.com/126085"},
+ {Rel: "alternate", Href: "http://codereview.appspot.com/126085"},
},
Updated: "2009-10-04T01:35:58+00:00",
Author: Person{
@@ -176,10 +176,10 @@ the top of feeds.py marked NOTE(rsc).
`,
},
},
- Entry{
+ {
Title: "rietveld: correct tab handling\n",
Link: []Link{
- Link{Rel: "alternate", Href: "http://codereview.appspot.com/124106"},
+ {Rel: "alternate", Href: "http://codereview.appspot.com/124106"},
},
Updated: "2009-10-03T23:02:17+00:00",
Author: Person{
@@ -218,8 +218,8 @@ type FieldNameTest struct {
}
var FieldNameTests = []FieldNameTest{
- FieldNameTest{"Profile-Image", "profileimage"},
- FieldNameTest{"_score", "score"},
+ {"Profile-Image", "profileimage"},
+ {"_score", "score"},
}
func TestFieldName(t *testing.T) {
diff --git a/src/pkg/xml/xml.go b/src/pkg/xml/xml.go
index 29fc739497..0a43393ecc 100644
--- a/src/pkg/xml/xml.go
+++ b/src/pkg/xml/xml.go
@@ -957,311 +957,311 @@ func isNameByte(c byte) bool {
// and second corresponds to NameChar.
var first = []unicode.Range{
- unicode.Range{0x003A, 0x003A, 1},
- unicode.Range{0x0041, 0x005A, 1},
- unicode.Range{0x005F, 0x005F, 1},
- unicode.Range{0x0061, 0x007A, 1},
- unicode.Range{0x00C0, 0x00D6, 1},
- unicode.Range{0x00D8, 0x00F6, 1},
- unicode.Range{0x00F8, 0x00FF, 1},
- unicode.Range{0x0100, 0x0131, 1},
- unicode.Range{0x0134, 0x013E, 1},
- unicode.Range{0x0141, 0x0148, 1},
- unicode.Range{0x014A, 0x017E, 1},
- unicode.Range{0x0180, 0x01C3, 1},
- unicode.Range{0x01CD, 0x01F0, 1},
- unicode.Range{0x01F4, 0x01F5, 1},
- unicode.Range{0x01FA, 0x0217, 1},
- unicode.Range{0x0250, 0x02A8, 1},
- unicode.Range{0x02BB, 0x02C1, 1},
- unicode.Range{0x0386, 0x0386, 1},
- unicode.Range{0x0388, 0x038A, 1},
- unicode.Range{0x038C, 0x038C, 1},
- unicode.Range{0x038E, 0x03A1, 1},
- unicode.Range{0x03A3, 0x03CE, 1},
- unicode.Range{0x03D0, 0x03D6, 1},
- unicode.Range{0x03DA, 0x03E0, 2},
- unicode.Range{0x03E2, 0x03F3, 1},
- unicode.Range{0x0401, 0x040C, 1},
- unicode.Range{0x040E, 0x044F, 1},
- unicode.Range{0x0451, 0x045C, 1},
- unicode.Range{0x045E, 0x0481, 1},
- unicode.Range{0x0490, 0x04C4, 1},
- unicode.Range{0x04C7, 0x04C8, 1},
- unicode.Range{0x04CB, 0x04CC, 1},
- unicode.Range{0x04D0, 0x04EB, 1},
- unicode.Range{0x04EE, 0x04F5, 1},
- unicode.Range{0x04F8, 0x04F9, 1},
- unicode.Range{0x0531, 0x0556, 1},
- unicode.Range{0x0559, 0x0559, 1},
- unicode.Range{0x0561, 0x0586, 1},
- unicode.Range{0x05D0, 0x05EA, 1},
- unicode.Range{0x05F0, 0x05F2, 1},
- unicode.Range{0x0621, 0x063A, 1},
- unicode.Range{0x0641, 0x064A, 1},
- unicode.Range{0x0671, 0x06B7, 1},
- unicode.Range{0x06BA, 0x06BE, 1},
- unicode.Range{0x06C0, 0x06CE, 1},
- unicode.Range{0x06D0, 0x06D3, 1},
- unicode.Range{0x06D5, 0x06D5, 1},
- unicode.Range{0x06E5, 0x06E6, 1},
- unicode.Range{0x0905, 0x0939, 1},
- unicode.Range{0x093D, 0x093D, 1},
- unicode.Range{0x0958, 0x0961, 1},
- unicode.Range{0x0985, 0x098C, 1},
- unicode.Range{0x098F, 0x0990, 1},
- unicode.Range{0x0993, 0x09A8, 1},
- unicode.Range{0x09AA, 0x09B0, 1},
- unicode.Range{0x09B2, 0x09B2, 1},
- unicode.Range{0x09B6, 0x09B9, 1},
- unicode.Range{0x09DC, 0x09DD, 1},
- unicode.Range{0x09DF, 0x09E1, 1},
- unicode.Range{0x09F0, 0x09F1, 1},
- unicode.Range{0x0A05, 0x0A0A, 1},
- unicode.Range{0x0A0F, 0x0A10, 1},
- unicode.Range{0x0A13, 0x0A28, 1},
- unicode.Range{0x0A2A, 0x0A30, 1},
- unicode.Range{0x0A32, 0x0A33, 1},
- unicode.Range{0x0A35, 0x0A36, 1},
- unicode.Range{0x0A38, 0x0A39, 1},
- unicode.Range{0x0A59, 0x0A5C, 1},
- unicode.Range{0x0A5E, 0x0A5E, 1},
- unicode.Range{0x0A72, 0x0A74, 1},
- unicode.Range{0x0A85, 0x0A8B, 1},
- unicode.Range{0x0A8D, 0x0A8D, 1},
- unicode.Range{0x0A8F, 0x0A91, 1},
- unicode.Range{0x0A93, 0x0AA8, 1},
- unicode.Range{0x0AAA, 0x0AB0, 1},
- unicode.Range{0x0AB2, 0x0AB3, 1},
- unicode.Range{0x0AB5, 0x0AB9, 1},
- unicode.Range{0x0ABD, 0x0AE0, 0x23},
- unicode.Range{0x0B05, 0x0B0C, 1},
- unicode.Range{0x0B0F, 0x0B10, 1},
- unicode.Range{0x0B13, 0x0B28, 1},
- unicode.Range{0x0B2A, 0x0B30, 1},
- unicode.Range{0x0B32, 0x0B33, 1},
- unicode.Range{0x0B36, 0x0B39, 1},
- unicode.Range{0x0B3D, 0x0B3D, 1},
- unicode.Range{0x0B5C, 0x0B5D, 1},
- unicode.Range{0x0B5F, 0x0B61, 1},
- unicode.Range{0x0B85, 0x0B8A, 1},
- unicode.Range{0x0B8E, 0x0B90, 1},
- unicode.Range{0x0B92, 0x0B95, 1},
- unicode.Range{0x0B99, 0x0B9A, 1},
- unicode.Range{0x0B9C, 0x0B9C, 1},
- unicode.Range{0x0B9E, 0x0B9F, 1},
- unicode.Range{0x0BA3, 0x0BA4, 1},
- unicode.Range{0x0BA8, 0x0BAA, 1},
- unicode.Range{0x0BAE, 0x0BB5, 1},
- unicode.Range{0x0BB7, 0x0BB9, 1},
- unicode.Range{0x0C05, 0x0C0C, 1},
- unicode.Range{0x0C0E, 0x0C10, 1},
- unicode.Range{0x0C12, 0x0C28, 1},
- unicode.Range{0x0C2A, 0x0C33, 1},
- unicode.Range{0x0C35, 0x0C39, 1},
- unicode.Range{0x0C60, 0x0C61, 1},
- unicode.Range{0x0C85, 0x0C8C, 1},
- unicode.Range{0x0C8E, 0x0C90, 1},
- unicode.Range{0x0C92, 0x0CA8, 1},
- unicode.Range{0x0CAA, 0x0CB3, 1},
- unicode.Range{0x0CB5, 0x0CB9, 1},
- unicode.Range{0x0CDE, 0x0CDE, 1},
- unicode.Range{0x0CE0, 0x0CE1, 1},
- unicode.Range{0x0D05, 0x0D0C, 1},
- unicode.Range{0x0D0E, 0x0D10, 1},
- unicode.Range{0x0D12, 0x0D28, 1},
- unicode.Range{0x0D2A, 0x0D39, 1},
- unicode.Range{0x0D60, 0x0D61, 1},
- unicode.Range{0x0E01, 0x0E2E, 1},
- unicode.Range{0x0E30, 0x0E30, 1},
- unicode.Range{0x0E32, 0x0E33, 1},
- unicode.Range{0x0E40, 0x0E45, 1},
- unicode.Range{0x0E81, 0x0E82, 1},
- unicode.Range{0x0E84, 0x0E84, 1},
- unicode.Range{0x0E87, 0x0E88, 1},
- unicode.Range{0x0E8A, 0x0E8D, 3},
- unicode.Range{0x0E94, 0x0E97, 1},
- unicode.Range{0x0E99, 0x0E9F, 1},
- unicode.Range{0x0EA1, 0x0EA3, 1},
- unicode.Range{0x0EA5, 0x0EA7, 2},
- unicode.Range{0x0EAA, 0x0EAB, 1},
- unicode.Range{0x0EAD, 0x0EAE, 1},
- unicode.Range{0x0EB0, 0x0EB0, 1},
- unicode.Range{0x0EB2, 0x0EB3, 1},
- unicode.Range{0x0EBD, 0x0EBD, 1},
- unicode.Range{0x0EC0, 0x0EC4, 1},
- unicode.Range{0x0F40, 0x0F47, 1},
- unicode.Range{0x0F49, 0x0F69, 1},
- unicode.Range{0x10A0, 0x10C5, 1},
- unicode.Range{0x10D0, 0x10F6, 1},
- unicode.Range{0x1100, 0x1100, 1},
- unicode.Range{0x1102, 0x1103, 1},
- unicode.Range{0x1105, 0x1107, 1},
- unicode.Range{0x1109, 0x1109, 1},
- unicode.Range{0x110B, 0x110C, 1},
- unicode.Range{0x110E, 0x1112, 1},
- unicode.Range{0x113C, 0x1140, 2},
- unicode.Range{0x114C, 0x1150, 2},
- unicode.Range{0x1154, 0x1155, 1},
- unicode.Range{0x1159, 0x1159, 1},
- unicode.Range{0x115F, 0x1161, 1},
- unicode.Range{0x1163, 0x1169, 2},
- unicode.Range{0x116D, 0x116E, 1},
- unicode.Range{0x1172, 0x1173, 1},
- unicode.Range{0x1175, 0x119E, 0x119E - 0x1175},
- unicode.Range{0x11A8, 0x11AB, 0x11AB - 0x11A8},
- unicode.Range{0x11AE, 0x11AF, 1},
- unicode.Range{0x11B7, 0x11B8, 1},
- unicode.Range{0x11BA, 0x11BA, 1},
- unicode.Range{0x11BC, 0x11C2, 1},
- unicode.Range{0x11EB, 0x11F0, 0x11F0 - 0x11EB},
- unicode.Range{0x11F9, 0x11F9, 1},
- unicode.Range{0x1E00, 0x1E9B, 1},
- unicode.Range{0x1EA0, 0x1EF9, 1},
- unicode.Range{0x1F00, 0x1F15, 1},
- unicode.Range{0x1F18, 0x1F1D, 1},
- unicode.Range{0x1F20, 0x1F45, 1},
- unicode.Range{0x1F48, 0x1F4D, 1},
- unicode.Range{0x1F50, 0x1F57, 1},
- unicode.Range{0x1F59, 0x1F5B, 0x1F5B - 0x1F59},
- unicode.Range{0x1F5D, 0x1F5D, 1},
- unicode.Range{0x1F5F, 0x1F7D, 1},
- unicode.Range{0x1F80, 0x1FB4, 1},
- unicode.Range{0x1FB6, 0x1FBC, 1},
- unicode.Range{0x1FBE, 0x1FBE, 1},
- unicode.Range{0x1FC2, 0x1FC4, 1},
- unicode.Range{0x1FC6, 0x1FCC, 1},
- unicode.Range{0x1FD0, 0x1FD3, 1},
- unicode.Range{0x1FD6, 0x1FDB, 1},
- unicode.Range{0x1FE0, 0x1FEC, 1},
- unicode.Range{0x1FF2, 0x1FF4, 1},
- unicode.Range{0x1FF6, 0x1FFC, 1},
- unicode.Range{0x2126, 0x2126, 1},
- unicode.Range{0x212A, 0x212B, 1},
- unicode.Range{0x212E, 0x212E, 1},
- unicode.Range{0x2180, 0x2182, 1},
- unicode.Range{0x3007, 0x3007, 1},
- unicode.Range{0x3021, 0x3029, 1},
- unicode.Range{0x3041, 0x3094, 1},
- unicode.Range{0x30A1, 0x30FA, 1},
- unicode.Range{0x3105, 0x312C, 1},
- unicode.Range{0x4E00, 0x9FA5, 1},
- unicode.Range{0xAC00, 0xD7A3, 1},
+ {0x003A, 0x003A, 1},
+ {0x0041, 0x005A, 1},
+ {0x005F, 0x005F, 1},
+ {0x0061, 0x007A, 1},
+ {0x00C0, 0x00D6, 1},
+ {0x00D8, 0x00F6, 1},
+ {0x00F8, 0x00FF, 1},
+ {0x0100, 0x0131, 1},
+ {0x0134, 0x013E, 1},
+ {0x0141, 0x0148, 1},
+ {0x014A, 0x017E, 1},
+ {0x0180, 0x01C3, 1},
+ {0x01CD, 0x01F0, 1},
+ {0x01F4, 0x01F5, 1},
+ {0x01FA, 0x0217, 1},
+ {0x0250, 0x02A8, 1},
+ {0x02BB, 0x02C1, 1},
+ {0x0386, 0x0386, 1},
+ {0x0388, 0x038A, 1},
+ {0x038C, 0x038C, 1},
+ {0x038E, 0x03A1, 1},
+ {0x03A3, 0x03CE, 1},
+ {0x03D0, 0x03D6, 1},
+ {0x03DA, 0x03E0, 2},
+ {0x03E2, 0x03F3, 1},
+ {0x0401, 0x040C, 1},
+ {0x040E, 0x044F, 1},
+ {0x0451, 0x045C, 1},
+ {0x045E, 0x0481, 1},
+ {0x0490, 0x04C4, 1},
+ {0x04C7, 0x04C8, 1},
+ {0x04CB, 0x04CC, 1},
+ {0x04D0, 0x04EB, 1},
+ {0x04EE, 0x04F5, 1},
+ {0x04F8, 0x04F9, 1},
+ {0x0531, 0x0556, 1},
+ {0x0559, 0x0559, 1},
+ {0x0561, 0x0586, 1},
+ {0x05D0, 0x05EA, 1},
+ {0x05F0, 0x05F2, 1},
+ {0x0621, 0x063A, 1},
+ {0x0641, 0x064A, 1},
+ {0x0671, 0x06B7, 1},
+ {0x06BA, 0x06BE, 1},
+ {0x06C0, 0x06CE, 1},
+ {0x06D0, 0x06D3, 1},
+ {0x06D5, 0x06D5, 1},
+ {0x06E5, 0x06E6, 1},
+ {0x0905, 0x0939, 1},
+ {0x093D, 0x093D, 1},
+ {0x0958, 0x0961, 1},
+ {0x0985, 0x098C, 1},
+ {0x098F, 0x0990, 1},
+ {0x0993, 0x09A8, 1},
+ {0x09AA, 0x09B0, 1},
+ {0x09B2, 0x09B2, 1},
+ {0x09B6, 0x09B9, 1},
+ {0x09DC, 0x09DD, 1},
+ {0x09DF, 0x09E1, 1},
+ {0x09F0, 0x09F1, 1},
+ {0x0A05, 0x0A0A, 1},
+ {0x0A0F, 0x0A10, 1},
+ {0x0A13, 0x0A28, 1},
+ {0x0A2A, 0x0A30, 1},
+ {0x0A32, 0x0A33, 1},
+ {0x0A35, 0x0A36, 1},
+ {0x0A38, 0x0A39, 1},
+ {0x0A59, 0x0A5C, 1},
+ {0x0A5E, 0x0A5E, 1},
+ {0x0A72, 0x0A74, 1},
+ {0x0A85, 0x0A8B, 1},
+ {0x0A8D, 0x0A8D, 1},
+ {0x0A8F, 0x0A91, 1},
+ {0x0A93, 0x0AA8, 1},
+ {0x0AAA, 0x0AB0, 1},
+ {0x0AB2, 0x0AB3, 1},
+ {0x0AB5, 0x0AB9, 1},
+ {0x0ABD, 0x0AE0, 0x23},
+ {0x0B05, 0x0B0C, 1},
+ {0x0B0F, 0x0B10, 1},
+ {0x0B13, 0x0B28, 1},
+ {0x0B2A, 0x0B30, 1},
+ {0x0B32, 0x0B33, 1},
+ {0x0B36, 0x0B39, 1},
+ {0x0B3D, 0x0B3D, 1},
+ {0x0B5C, 0x0B5D, 1},
+ {0x0B5F, 0x0B61, 1},
+ {0x0B85, 0x0B8A, 1},
+ {0x0B8E, 0x0B90, 1},
+ {0x0B92, 0x0B95, 1},
+ {0x0B99, 0x0B9A, 1},
+ {0x0B9C, 0x0B9C, 1},
+ {0x0B9E, 0x0B9F, 1},
+ {0x0BA3, 0x0BA4, 1},
+ {0x0BA8, 0x0BAA, 1},
+ {0x0BAE, 0x0BB5, 1},
+ {0x0BB7, 0x0BB9, 1},
+ {0x0C05, 0x0C0C, 1},
+ {0x0C0E, 0x0C10, 1},
+ {0x0C12, 0x0C28, 1},
+ {0x0C2A, 0x0C33, 1},
+ {0x0C35, 0x0C39, 1},
+ {0x0C60, 0x0C61, 1},
+ {0x0C85, 0x0C8C, 1},
+ {0x0C8E, 0x0C90, 1},
+ {0x0C92, 0x0CA8, 1},
+ {0x0CAA, 0x0CB3, 1},
+ {0x0CB5, 0x0CB9, 1},
+ {0x0CDE, 0x0CDE, 1},
+ {0x0CE0, 0x0CE1, 1},
+ {0x0D05, 0x0D0C, 1},
+ {0x0D0E, 0x0D10, 1},
+ {0x0D12, 0x0D28, 1},
+ {0x0D2A, 0x0D39, 1},
+ {0x0D60, 0x0D61, 1},
+ {0x0E01, 0x0E2E, 1},
+ {0x0E30, 0x0E30, 1},
+ {0x0E32, 0x0E33, 1},
+ {0x0E40, 0x0E45, 1},
+ {0x0E81, 0x0E82, 1},
+ {0x0E84, 0x0E84, 1},
+ {0x0E87, 0x0E88, 1},
+ {0x0E8A, 0x0E8D, 3},
+ {0x0E94, 0x0E97, 1},
+ {0x0E99, 0x0E9F, 1},
+ {0x0EA1, 0x0EA3, 1},
+ {0x0EA5, 0x0EA7, 2},
+ {0x0EAA, 0x0EAB, 1},
+ {0x0EAD, 0x0EAE, 1},
+ {0x0EB0, 0x0EB0, 1},
+ {0x0EB2, 0x0EB3, 1},
+ {0x0EBD, 0x0EBD, 1},
+ {0x0EC0, 0x0EC4, 1},
+ {0x0F40, 0x0F47, 1},
+ {0x0F49, 0x0F69, 1},
+ {0x10A0, 0x10C5, 1},
+ {0x10D0, 0x10F6, 1},
+ {0x1100, 0x1100, 1},
+ {0x1102, 0x1103, 1},
+ {0x1105, 0x1107, 1},
+ {0x1109, 0x1109, 1},
+ {0x110B, 0x110C, 1},
+ {0x110E, 0x1112, 1},
+ {0x113C, 0x1140, 2},
+ {0x114C, 0x1150, 2},
+ {0x1154, 0x1155, 1},
+ {0x1159, 0x1159, 1},
+ {0x115F, 0x1161, 1},
+ {0x1163, 0x1169, 2},
+ {0x116D, 0x116E, 1},
+ {0x1172, 0x1173, 1},
+ {0x1175, 0x119E, 0x119E - 0x1175},
+ {0x11A8, 0x11AB, 0x11AB - 0x11A8},
+ {0x11AE, 0x11AF, 1},
+ {0x11B7, 0x11B8, 1},
+ {0x11BA, 0x11BA, 1},
+ {0x11BC, 0x11C2, 1},
+ {0x11EB, 0x11F0, 0x11F0 - 0x11EB},
+ {0x11F9, 0x11F9, 1},
+ {0x1E00, 0x1E9B, 1},
+ {0x1EA0, 0x1EF9, 1},
+ {0x1F00, 0x1F15, 1},
+ {0x1F18, 0x1F1D, 1},
+ {0x1F20, 0x1F45, 1},
+ {0x1F48, 0x1F4D, 1},
+ {0x1F50, 0x1F57, 1},
+ {0x1F59, 0x1F5B, 0x1F5B - 0x1F59},
+ {0x1F5D, 0x1F5D, 1},
+ {0x1F5F, 0x1F7D, 1},
+ {0x1F80, 0x1FB4, 1},
+ {0x1FB6, 0x1FBC, 1},
+ {0x1FBE, 0x1FBE, 1},
+ {0x1FC2, 0x1FC4, 1},
+ {0x1FC6, 0x1FCC, 1},
+ {0x1FD0, 0x1FD3, 1},
+ {0x1FD6, 0x1FDB, 1},
+ {0x1FE0, 0x1FEC, 1},
+ {0x1FF2, 0x1FF4, 1},
+ {0x1FF6, 0x1FFC, 1},
+ {0x2126, 0x2126, 1},
+ {0x212A, 0x212B, 1},
+ {0x212E, 0x212E, 1},
+ {0x2180, 0x2182, 1},
+ {0x3007, 0x3007, 1},
+ {0x3021, 0x3029, 1},
+ {0x3041, 0x3094, 1},
+ {0x30A1, 0x30FA, 1},
+ {0x3105, 0x312C, 1},
+ {0x4E00, 0x9FA5, 1},
+ {0xAC00, 0xD7A3, 1},
}
var second = []unicode.Range{
- unicode.Range{0x002D, 0x002E, 1},
- unicode.Range{0x0030, 0x0039, 1},
- unicode.Range{0x00B7, 0x00B7, 1},
- unicode.Range{0x02D0, 0x02D1, 1},
- unicode.Range{0x0300, 0x0345, 1},
- unicode.Range{0x0360, 0x0361, 1},
- unicode.Range{0x0387, 0x0387, 1},
- unicode.Range{0x0483, 0x0486, 1},
- unicode.Range{0x0591, 0x05A1, 1},
- unicode.Range{0x05A3, 0x05B9, 1},
- unicode.Range{0x05BB, 0x05BD, 1},
- unicode.Range{0x05BF, 0x05BF, 1},
- unicode.Range{0x05C1, 0x05C2, 1},
- unicode.Range{0x05C4, 0x0640, 0x0640 - 0x05C4},
- unicode.Range{0x064B, 0x0652, 1},
- unicode.Range{0x0660, 0x0669, 1},
- unicode.Range{0x0670, 0x0670, 1},
- unicode.Range{0x06D6, 0x06DC, 1},
- unicode.Range{0x06DD, 0x06DF, 1},
- unicode.Range{0x06E0, 0x06E4, 1},
- unicode.Range{0x06E7, 0x06E8, 1},
- unicode.Range{0x06EA, 0x06ED, 1},
- unicode.Range{0x06F0, 0x06F9, 1},
- unicode.Range{0x0901, 0x0903, 1},
- unicode.Range{0x093C, 0x093C, 1},
- unicode.Range{0x093E, 0x094C, 1},
- unicode.Range{0x094D, 0x094D, 1},
- unicode.Range{0x0951, 0x0954, 1},
- unicode.Range{0x0962, 0x0963, 1},
- unicode.Range{0x0966, 0x096F, 1},
- unicode.Range{0x0981, 0x0983, 1},
- unicode.Range{0x09BC, 0x09BC, 1},
- unicode.Range{0x09BE, 0x09BF, 1},
- unicode.Range{0x09C0, 0x09C4, 1},
- unicode.Range{0x09C7, 0x09C8, 1},
- unicode.Range{0x09CB, 0x09CD, 1},
- unicode.Range{0x09D7, 0x09D7, 1},
- unicode.Range{0x09E2, 0x09E3, 1},
- unicode.Range{0x09E6, 0x09EF, 1},
- unicode.Range{0x0A02, 0x0A3C, 0x3A},
- unicode.Range{0x0A3E, 0x0A3F, 1},
- unicode.Range{0x0A40, 0x0A42, 1},
- unicode.Range{0x0A47, 0x0A48, 1},
- unicode.Range{0x0A4B, 0x0A4D, 1},
- unicode.Range{0x0A66, 0x0A6F, 1},
- unicode.Range{0x0A70, 0x0A71, 1},
- unicode.Range{0x0A81, 0x0A83, 1},
- unicode.Range{0x0ABC, 0x0ABC, 1},
- unicode.Range{0x0ABE, 0x0AC5, 1},
- unicode.Range{0x0AC7, 0x0AC9, 1},
- unicode.Range{0x0ACB, 0x0ACD, 1},
- unicode.Range{0x0AE6, 0x0AEF, 1},
- unicode.Range{0x0B01, 0x0B03, 1},
- unicode.Range{0x0B3C, 0x0B3C, 1},
- unicode.Range{0x0B3E, 0x0B43, 1},
- unicode.Range{0x0B47, 0x0B48, 1},
- unicode.Range{0x0B4B, 0x0B4D, 1},
- unicode.Range{0x0B56, 0x0B57, 1},
- unicode.Range{0x0B66, 0x0B6F, 1},
- unicode.Range{0x0B82, 0x0B83, 1},
- unicode.Range{0x0BBE, 0x0BC2, 1},
- unicode.Range{0x0BC6, 0x0BC8, 1},
- unicode.Range{0x0BCA, 0x0BCD, 1},
- unicode.Range{0x0BD7, 0x0BD7, 1},
- unicode.Range{0x0BE7, 0x0BEF, 1},
- unicode.Range{0x0C01, 0x0C03, 1},
- unicode.Range{0x0C3E, 0x0C44, 1},
- unicode.Range{0x0C46, 0x0C48, 1},
- unicode.Range{0x0C4A, 0x0C4D, 1},
- unicode.Range{0x0C55, 0x0C56, 1},
- unicode.Range{0x0C66, 0x0C6F, 1},
- unicode.Range{0x0C82, 0x0C83, 1},
- unicode.Range{0x0CBE, 0x0CC4, 1},
- unicode.Range{0x0CC6, 0x0CC8, 1},
- unicode.Range{0x0CCA, 0x0CCD, 1},
- unicode.Range{0x0CD5, 0x0CD6, 1},
- unicode.Range{0x0CE6, 0x0CEF, 1},
- unicode.Range{0x0D02, 0x0D03, 1},
- unicode.Range{0x0D3E, 0x0D43, 1},
- unicode.Range{0x0D46, 0x0D48, 1},
- unicode.Range{0x0D4A, 0x0D4D, 1},
- unicode.Range{0x0D57, 0x0D57, 1},
- unicode.Range{0x0D66, 0x0D6F, 1},
- unicode.Range{0x0E31, 0x0E31, 1},
- unicode.Range{0x0E34, 0x0E3A, 1},
- unicode.Range{0x0E46, 0x0E46, 1},
- unicode.Range{0x0E47, 0x0E4E, 1},
- unicode.Range{0x0E50, 0x0E59, 1},
- unicode.Range{0x0EB1, 0x0EB1, 1},
- unicode.Range{0x0EB4, 0x0EB9, 1},
- unicode.Range{0x0EBB, 0x0EBC, 1},
- unicode.Range{0x0EC6, 0x0EC6, 1},
- unicode.Range{0x0EC8, 0x0ECD, 1},
- unicode.Range{0x0ED0, 0x0ED9, 1},
- unicode.Range{0x0F18, 0x0F19, 1},
- unicode.Range{0x0F20, 0x0F29, 1},
- unicode.Range{0x0F35, 0x0F39, 2},
- unicode.Range{0x0F3E, 0x0F3F, 1},
- unicode.Range{0x0F71, 0x0F84, 1},
- unicode.Range{0x0F86, 0x0F8B, 1},
- unicode.Range{0x0F90, 0x0F95, 1},
- unicode.Range{0x0F97, 0x0F97, 1},
- unicode.Range{0x0F99, 0x0FAD, 1},
- unicode.Range{0x0FB1, 0x0FB7, 1},
- unicode.Range{0x0FB9, 0x0FB9, 1},
- unicode.Range{0x20D0, 0x20DC, 1},
- unicode.Range{0x20E1, 0x3005, 0x3005 - 0x20E1},
- unicode.Range{0x302A, 0x302F, 1},
- unicode.Range{0x3031, 0x3035, 1},
- unicode.Range{0x3099, 0x309A, 1},
- unicode.Range{0x309D, 0x309E, 1},
- unicode.Range{0x30FC, 0x30FE, 1},
+ {0x002D, 0x002E, 1},
+ {0x0030, 0x0039, 1},
+ {0x00B7, 0x00B7, 1},
+ {0x02D0, 0x02D1, 1},
+ {0x0300, 0x0345, 1},
+ {0x0360, 0x0361, 1},
+ {0x0387, 0x0387, 1},
+ {0x0483, 0x0486, 1},
+ {0x0591, 0x05A1, 1},
+ {0x05A3, 0x05B9, 1},
+ {0x05BB, 0x05BD, 1},
+ {0x05BF, 0x05BF, 1},
+ {0x05C1, 0x05C2, 1},
+ {0x05C4, 0x0640, 0x0640 - 0x05C4},
+ {0x064B, 0x0652, 1},
+ {0x0660, 0x0669, 1},
+ {0x0670, 0x0670, 1},
+ {0x06D6, 0x06DC, 1},
+ {0x06DD, 0x06DF, 1},
+ {0x06E0, 0x06E4, 1},
+ {0x06E7, 0x06E8, 1},
+ {0x06EA, 0x06ED, 1},
+ {0x06F0, 0x06F9, 1},
+ {0x0901, 0x0903, 1},
+ {0x093C, 0x093C, 1},
+ {0x093E, 0x094C, 1},
+ {0x094D, 0x094D, 1},
+ {0x0951, 0x0954, 1},
+ {0x0962, 0x0963, 1},
+ {0x0966, 0x096F, 1},
+ {0x0981, 0x0983, 1},
+ {0x09BC, 0x09BC, 1},
+ {0x09BE, 0x09BF, 1},
+ {0x09C0, 0x09C4, 1},
+ {0x09C7, 0x09C8, 1},
+ {0x09CB, 0x09CD, 1},
+ {0x09D7, 0x09D7, 1},
+ {0x09E2, 0x09E3, 1},
+ {0x09E6, 0x09EF, 1},
+ {0x0A02, 0x0A3C, 0x3A},
+ {0x0A3E, 0x0A3F, 1},
+ {0x0A40, 0x0A42, 1},
+ {0x0A47, 0x0A48, 1},
+ {0x0A4B, 0x0A4D, 1},
+ {0x0A66, 0x0A6F, 1},
+ {0x0A70, 0x0A71, 1},
+ {0x0A81, 0x0A83, 1},
+ {0x0ABC, 0x0ABC, 1},
+ {0x0ABE, 0x0AC5, 1},
+ {0x0AC7, 0x0AC9, 1},
+ {0x0ACB, 0x0ACD, 1},
+ {0x0AE6, 0x0AEF, 1},
+ {0x0B01, 0x0B03, 1},
+ {0x0B3C, 0x0B3C, 1},
+ {0x0B3E, 0x0B43, 1},
+ {0x0B47, 0x0B48, 1},
+ {0x0B4B, 0x0B4D, 1},
+ {0x0B56, 0x0B57, 1},
+ {0x0B66, 0x0B6F, 1},
+ {0x0B82, 0x0B83, 1},
+ {0x0BBE, 0x0BC2, 1},
+ {0x0BC6, 0x0BC8, 1},
+ {0x0BCA, 0x0BCD, 1},
+ {0x0BD7, 0x0BD7, 1},
+ {0x0BE7, 0x0BEF, 1},
+ {0x0C01, 0x0C03, 1},
+ {0x0C3E, 0x0C44, 1},
+ {0x0C46, 0x0C48, 1},
+ {0x0C4A, 0x0C4D, 1},
+ {0x0C55, 0x0C56, 1},
+ {0x0C66, 0x0C6F, 1},
+ {0x0C82, 0x0C83, 1},
+ {0x0CBE, 0x0CC4, 1},
+ {0x0CC6, 0x0CC8, 1},
+ {0x0CCA, 0x0CCD, 1},
+ {0x0CD5, 0x0CD6, 1},
+ {0x0CE6, 0x0CEF, 1},
+ {0x0D02, 0x0D03, 1},
+ {0x0D3E, 0x0D43, 1},
+ {0x0D46, 0x0D48, 1},
+ {0x0D4A, 0x0D4D, 1},
+ {0x0D57, 0x0D57, 1},
+ {0x0D66, 0x0D6F, 1},
+ {0x0E31, 0x0E31, 1},
+ {0x0E34, 0x0E3A, 1},
+ {0x0E46, 0x0E46, 1},
+ {0x0E47, 0x0E4E, 1},
+ {0x0E50, 0x0E59, 1},
+ {0x0EB1, 0x0EB1, 1},
+ {0x0EB4, 0x0EB9, 1},
+ {0x0EBB, 0x0EBC, 1},
+ {0x0EC6, 0x0EC6, 1},
+ {0x0EC8, 0x0ECD, 1},
+ {0x0ED0, 0x0ED9, 1},
+ {0x0F18, 0x0F19, 1},
+ {0x0F20, 0x0F29, 1},
+ {0x0F35, 0x0F39, 2},
+ {0x0F3E, 0x0F3F, 1},
+ {0x0F71, 0x0F84, 1},
+ {0x0F86, 0x0F8B, 1},
+ {0x0F90, 0x0F95, 1},
+ {0x0F97, 0x0F97, 1},
+ {0x0F99, 0x0FAD, 1},
+ {0x0FB1, 0x0FB7, 1},
+ {0x0FB9, 0x0FB9, 1},
+ {0x20D0, 0x20DC, 1},
+ {0x20E1, 0x3005, 0x3005 - 0x20E1},
+ {0x302A, 0x302F, 1},
+ {0x3031, 0x3035, 1},
+ {0x3099, 0x309A, 1},
+ {0x309D, 0x309E, 1},
+ {0x30FC, 0x30FE, 1},
}
// HTMLEntity is an entity map containing translations for the
diff --git a/src/pkg/xml/xml_test.go b/src/pkg/xml/xml_test.go
index c1688088e6..00688969f2 100644
--- a/src/pkg/xml/xml_test.go
+++ b/src/pkg/xml/xml_test.go
@@ -36,16 +36,16 @@ var rawTokens = []Token{
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`),
),
CharData([]byte("\n")),
- StartElement{Name{"", "body"}, []Attr{Attr{Name{"xmlns", "foo"}, "ns1"}, Attr{Name{"", "xmlns"}, "ns2"}, Attr{Name{"xmlns", "tag"}, "ns3"}}},
+ StartElement{Name{"", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}},
CharData([]byte("\n ")),
- StartElement{Name{"", "hello"}, []Attr{Attr{Name{"", "lang"}, "en"}}},
+ StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}},
CharData([]byte("World <>'\" 白鵬翔")),
EndElement{Name{"", "hello"}},
CharData([]byte("\n ")),
StartElement{Name{"", "goodbye"}, nil},
EndElement{Name{"", "goodbye"}},
CharData([]byte("\n ")),
- StartElement{Name{"", "outer"}, []Attr{Attr{Name{"foo", "attr"}, "value"}, Attr{Name{"xmlns", "tag"}, "ns4"}}},
+ StartElement{Name{"", "outer"}, []Attr{{Name{"foo", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}},
CharData([]byte("\n ")),
StartElement{Name{"", "inner"}, nil},
EndElement{Name{"", "inner"}},
@@ -70,16 +70,16 @@ var cookedTokens = []Token{
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`),
),
CharData([]byte("\n")),
- StartElement{Name{"ns2", "body"}, []Attr{Attr{Name{"xmlns", "foo"}, "ns1"}, Attr{Name{"", "xmlns"}, "ns2"}, Attr{Name{"xmlns", "tag"}, "ns3"}}},
+ StartElement{Name{"ns2", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}},
CharData([]byte("\n ")),
- StartElement{Name{"ns2", "hello"}, []Attr{Attr{Name{"", "lang"}, "en"}}},
+ StartElement{Name{"ns2", "hello"}, []Attr{{Name{"", "lang"}, "en"}}},
CharData([]byte("World <>'\" 白鵬翔")),
EndElement{Name{"ns2", "hello"}},
CharData([]byte("\n ")),
StartElement{Name{"ns2", "goodbye"}, nil},
EndElement{Name{"ns2", "goodbye"}},
CharData([]byte("\n ")),
- StartElement{Name{"ns2", "outer"}, []Attr{Attr{Name{"ns1", "attr"}, "value"}, Attr{Name{"xmlns", "tag"}, "ns4"}}},
+ StartElement{Name{"ns2", "outer"}, []Attr{{Name{"ns1", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}},
CharData([]byte("\n ")),
StartElement{Name{"ns2", "inner"}, nil},
EndElement{Name{"ns2", "inner"}},
@@ -339,7 +339,7 @@ func TestCopyTokenCharData(t *testing.T) {
}
func TestCopyTokenStartElement(t *testing.T) {
- elt := StartElement{Name{"", "hello"}, []Attr{Attr{Name{"", "lang"}, "en"}}}
+ elt := StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}
var tok1 Token = elt
tok2 := CopyToken(tok1)
if !reflect.DeepEqual(tok1, tok2) {