summaryrefslogtreecommitdiff
path: root/src/pkg/utf16
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/utf16')
-rw-r--r--src/pkg/utf16/Makefile2
-rw-r--r--src/pkg/utf16/utf16_test.go17
2 files changed, 10 insertions, 9 deletions
diff --git a/src/pkg/utf16/Makefile b/src/pkg/utf16/Makefile
index 29e400503..8a564fb0f 100644
--- a/src/pkg/utf16/Makefile
+++ b/src/pkg/utf16/Makefile
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include ../../Make.$(GOARCH)
+include ../../Make.inc
TARG=utf16
GOFILES=\
diff --git a/src/pkg/utf16/utf16_test.go b/src/pkg/utf16/utf16_test.go
index c0848aa38..2b9fb3d87 100644
--- a/src/pkg/utf16/utf16_test.go
+++ b/src/pkg/utf16/utf16_test.go
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package utf16
+package utf16_test
import (
"fmt"
"reflect"
"testing"
"unicode"
+ . "utf16"
)
type encodeTest struct {
@@ -17,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}},
}
@@ -74,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) {