summaryrefslogtreecommitdiff
path: root/src/pkg/unicode/utf16/utf16_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/unicode/utf16/utf16_test.go')
-rw-r--r--src/pkg/unicode/utf16/utf16_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pkg/unicode/utf16/utf16_test.go b/src/pkg/unicode/utf16/utf16_test.go
index d453b2f98..ee16a303d 100644
--- a/src/pkg/unicode/utf16/utf16_test.go
+++ b/src/pkg/unicode/utf16/utf16_test.go
@@ -11,6 +11,16 @@ import (
. "unicode/utf16"
)
+// Validate the constants redefined from unicode.
+func TestConstants(t *testing.T) {
+ if MaxRune != unicode.MaxRune {
+ t.Errorf("utf16.maxRune is wrong: %x should be %x", MaxRune, unicode.MaxRune)
+ }
+ if ReplacementChar != unicode.ReplacementChar {
+ t.Errorf("utf16.replacementChar is wrong: %x should be %x", ReplacementChar, unicode.ReplacementChar)
+ }
+}
+
type encodeTest struct {
in []rune
out []uint16