diff options
Diffstat (limited to 'libgo/go/encoding/xml/xml_test.go')
-rw-r--r-- | libgo/go/encoding/xml/xml_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libgo/go/encoding/xml/xml_test.go b/libgo/go/encoding/xml/xml_test.go index 7a3511d5832..ee4ffa24208 100644 --- a/libgo/go/encoding/xml/xml_test.go +++ b/libgo/go/encoding/xml/xml_test.go @@ -650,6 +650,20 @@ func TestDisallowedCharacters(t *testing.T) { } } +func TestIsInCharacterRange(t *testing.T) { + invalid := []rune{ + utf8.MaxRune + 1, + 0xD800, // surrogate min + 0xDFFF, // surrogate max + -1, + } + for _, r := range invalid { + if isInCharacterRange(r) { + t.Errorf("rune %U considered valid", r) + } + } +} + var procInstTests = []struct { input string expect [2]string |