Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1680)

Side by Side Diff: src/pkg/unicode/digit_test.go

Issue 4539109: code review 4539109: unicode: for consistency with MaxRune, s/Latin1Max/MaxL... (Closed)
Patch Set: diff -r 23c4961fcea2 https://go.googlecode.com/hg/ Created 13 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/unicode/digit.go ('k') | src/pkg/unicode/graphic.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package unicode_test 5 package unicode_test
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 . "unicode" 9 . "unicode"
10 ) 10 )
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 for _, r := range testLetter { 112 for _, r := range testLetter {
113 if IsDigit(r) { 113 if IsDigit(r) {
114 t.Errorf("IsDigit(U+%04X) = true, want false", r) 114 t.Errorf("IsDigit(U+%04X) = true, want false", r)
115 } 115 }
116 } 116 }
117 } 117 }
118 118
119 // Test that the special case in IsDigit agrees with the table 119 // Test that the special case in IsDigit agrees with the table
120 func TestDigitOptimization(t *testing.T) { 120 func TestDigitOptimization(t *testing.T) {
121 » for i := 0; i < Latin1Max; i++ { 121 » for i := 0; i <= MaxLatin1; i++ {
122 if Is(Digit, i) != IsDigit(i) { 122 if Is(Digit, i) != IsDigit(i) {
123 t.Errorf("IsDigit(U+%04X) disagrees with Is(Digit)", i) 123 t.Errorf("IsDigit(U+%04X) disagrees with Is(Digit)", i)
124 } 124 }
125 } 125 }
126 } 126 }
OLDNEW
« no previous file with comments | « src/pkg/unicode/digit.go ('k') | src/pkg/unicode/graphic.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b