Commit 79b3daa9 authored by Rui Ueyama's avatar Rui Ueyama Committed by Brad Fitzpatrick

unicode: minor cleanup

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
parent a509026f
...@@ -387,32 +387,20 @@ func TestTurkishCase(t *testing.T) { ...@@ -387,32 +387,20 @@ func TestTurkishCase(t *testing.T) {
} }
var simpleFoldTests = []string{ var simpleFoldTests = []string{
// SimpleFold could order its returned slices in any order it wants, // SimpleFold(x) returns the next equivalent rune > x or wraps
// but we know it orders them in increasing order starting at in // around to smaller values.
// and looping around from MaxRune to 0.
// Easy cases. // Easy cases.
"Aa", "Aa",
"aA",
"δΔ", "δΔ",
"Δδ",
// ASCII special cases. // ASCII special cases.
"KkK", "KkK",
"kKK",
"KKk",
"Ssſ", "Ssſ",
"sſS",
"ſSs",
// Non-ASCII special cases. // Non-ASCII special cases.
"ρϱΡ", "ρϱΡ",
"ϱΡρ",
"Ρρϱ",
"ͅΙιι", "ͅΙιι",
"Ιιιͅ",
"ιιͅΙ",
"ιͅΙι",
// Extra special cases: has lower/upper but no case fold. // Extra special cases: has lower/upper but no case fold.
"İ", "İ",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment