1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 var testDigit = []int{
71 var testLetter = []int{
106 func TestDigit(t *testing.T) {
107 for _, r := range testDigit {
109 t.Errorf("IsDigit(U+%04X) = false, want true", r)
112 for _, r := range testLetter {
114 t.Errorf("IsDigit(U+%04X) = true, want false", r)
119 // Test that the special case in IsDigit agrees with the table
120 func TestDigitOptimization(t *testing.T) {
121 for i := 0; i < 0x100; i++ {
122 if Is(Digit, i) != IsDigit(i) {
123 t.Errorf("IsDigit(U+%04X) disagrees with Is(Digit)", i)