aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/unicode/utf8/utf8_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/unicode/utf8/utf8_test.go')
-rw-r--r--src/pkg/unicode/utf8/utf8_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pkg/unicode/utf8/utf8_test.go b/src/pkg/unicode/utf8/utf8_test.go
index 63514265bb..abf5a468ea 100644
--- a/src/pkg/unicode/utf8/utf8_test.go
+++ b/src/pkg/unicode/utf8/utf8_test.go
@@ -7,9 +7,20 @@ package utf8_test
import (
"bytes"
"testing"
+ "unicode"
. "unicode/utf8"
)
+// Validate the constants redefined from unicode.
+func init() {
+ if MaxRune != unicode.MaxRune {
+ panic("utf8.MaxRune is wrong")
+ }
+ if RuneError != unicode.ReplacementChar {
+ panic("utf8.RuneError is wrong")
+ }
+}
+
type Utf8Map struct {
r rune
str string