]> Cypherpunks repositories - gostls13.git/commitdiff
unicode: minor cleanup
authorRui Ueyama <ruiu@google.com>
Wed, 19 Mar 2014 17:14:04 +0000 (10:14 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 19 Mar 2014 17:14:04 +0000 (10:14 -0700)
These test cases are redundant because TestSimpleFold tests
all possible rotations of test data, so no need to add
rotated strings.

Also updated the comment as it's guaranteed that SimpleFold
returns values in increasing order.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/77730043

src/pkg/unicode/letter_test.go

index e4d5572a0fecae31eb8e9c65794647a182a1aae8..4ee11fb364f58dab8ea41e237651992473977fe1 100644 (file)
@@ -387,32 +387,20 @@ func TestTurkishCase(t *testing.T) {
 }
 
 var simpleFoldTests = []string{
-       // SimpleFold could order its returned slices in any order it wants,
-       // but we know it orders them in increasing order starting at in
-       // and looping around from MaxRune to 0.
+       // SimpleFold(x) returns the next equivalent rune > x or wraps
+       // around to smaller values.
 
        // Easy cases.
        "Aa",
-       "aA",
        "δΔ",
-       "Δδ",
 
        // ASCII special cases.
        "KkK",
-       "kKK",
-       "KKk",
        "Ssſ",
-       "sſS",
-       "ſSs",
 
        // Non-ASCII special cases.
        "ρϱΡ",
-       "ϱΡρ",
-       "Ρρϱ",
        "ͅΙιι",
-       "Ιιιͅ",
-       "ιιͅΙ",
-       "ιͅΙι",
 
        // Extra special cases: has lower/upper but no case fold.
        "İ",