summaryrefslogtreecommitdiff
path: root/libgo/go/unicode/utf16/utf16_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/unicode/utf16/utf16_test.go')
-rw-r--r--libgo/go/unicode/utf16/utf16_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/libgo/go/unicode/utf16/utf16_test.go b/libgo/go/unicode/utf16/utf16_test.go
index d453b2f984d..ee16a303df3 100644
--- a/libgo/go/unicode/utf16/utf16_test.go
+++ b/libgo/go/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