Len() -> RuneLength()
parent
ae00f4e838
commit
3cd00adfc5
|
@ -601,7 +601,7 @@ func TestReadRunes(t *testing.T) {
|
|||
t.Errorf("\tACTUAL: %s", FormatBinary(actualRune))
|
||||
continue TestLoop
|
||||
}
|
||||
if expected, actual := Len(test.Expected[runeNumber]), actualInt; expected != actual {
|
||||
if expected, actual := RuneLength(test.Expected[runeNumber]), actualInt; expected != actual {
|
||||
t.Errorf("For test #%d and rune #%d, expected %d, but actually got %d.", testNumber, runeNumber, expected, actual)
|
||||
t.Errorf("\tEXPECTED: %s", FormatBinary(test.Expected[runeNumber]))
|
||||
t.Errorf("\tACTUAL: %s", FormatBinary(actualRune))
|
||||
|
|
|
@ -585,7 +585,7 @@ func TestRuneReaders(t *testing.T) {
|
|||
t.Errorf("\tACTUAL: %s", FormatBinary(actualRune))
|
||||
continue TestLoop
|
||||
}
|
||||
if expected, actual := Len(test.Expected[runeNumber]), actualInt; expected != actual {
|
||||
if expected, actual := RuneLength(test.Expected[runeNumber]), actualInt; expected != actual {
|
||||
t.Errorf("For test #%d and rune #%d, expected %d, but actually got %d.", testNumber, runeNumber, expected, actual)
|
||||
t.Errorf("\tEXPECTED: %s", FormatBinary(test.Expected[runeNumber]))
|
||||
t.Errorf("\tACTUAL: %s", FormatBinary(actualRune))
|
||||
|
|
|
@ -585,7 +585,7 @@ func TestRuneScanners(t *testing.T) {
|
|||
t.Errorf("\tACTUAL: %s", FormatBinary(actualRune))
|
||||
continue TestLoop
|
||||
}
|
||||
if expected, actual := Len(test.Expected[runeNumber]), actualInt; expected != actual {
|
||||
if expected, actual := RuneLength(test.Expected[runeNumber]), actualInt; expected != actual {
|
||||
t.Errorf("For test #%d and rune #%d, expected %d, but actually got %d.", testNumber, runeNumber, expected, actual)
|
||||
t.Errorf("\tEXPECTED: %s", FormatBinary(test.Expected[runeNumber]))
|
||||
t.Errorf("\tACTUAL: %s", FormatBinary(actualRune))
|
||||
|
|
|
@ -73,7 +73,7 @@ func TestRuneWriter(t *testing.T) {
|
|||
continue TestLoop
|
||||
}
|
||||
|
||||
if expected, actual := n, utf8.Len(r); expected != actual {
|
||||
if expected, actual := n, utf8.RuneLength(r); expected != actual {
|
||||
t.Errorf("For test #%d and rune #%d, expected a certain number of bytes to be written, but actually wasn't.", testNumber, runeNumber)
|
||||
for i, rr := range test.Runes {
|
||||
t.Logf("\t[%d] %q (%d)", i, string(rr), rr)
|
||||
|
|
Loading…
Reference in New Issue