mirror of
https://github.com/golang/go.git
synced 2025-11-07 20:21:01 +00:00
use the new %U format for runes
R=rsc CC=golang-dev https://golang.org/cl/3483041
This commit is contained in:
parent
53eaf40eba
commit
42cfe48ffc
5 changed files with 15 additions and 15 deletions
|
|
@ -21,7 +21,7 @@ func TestScanForwards(t *testing.T) {
|
|||
for i, expect := range runes {
|
||||
got := str.At(i)
|
||||
if got != expect {
|
||||
t.Errorf("%s[%d]: expected %c (U+%04x); got %c (U+%04x)", s, i, expect, expect, got, got)
|
||||
t.Errorf("%s[%d]: expected %c (%U); got %c (%U)", s, i, expect, expect, got, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ func TestScanBackwards(t *testing.T) {
|
|||
expect := runes[i]
|
||||
got := str.At(i)
|
||||
if got != expect {
|
||||
t.Errorf("%s[%d]: expected %c (U+%04x); got %c (U+%04x)", s, i, expect, expect, got, got)
|
||||
t.Errorf("%s[%d]: expected %c (%U); got %c (%U)", s, i, expect, expect, got, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ func TestRandomAccess(t *testing.T) {
|
|||
expect := runes[i]
|
||||
got := str.At(i)
|
||||
if got != expect {
|
||||
t.Errorf("%s[%d]: expected %c (U+%04x); got %c (U+%04x)", s, i, expect, expect, got, got)
|
||||
t.Errorf("%s[%d]: expected %c (%U); got %c (%U)", s, i, expect, expect, got, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue