Len() -> RuneLength()
parent
164657caf8
commit
ae00f4e838
|
@ -4,7 +4,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLen(t *testing.T) {
|
func TestRuneLength(t *testing.T) {
|
||||||
|
|
||||||
tests := []struct{
|
tests := []struct{
|
||||||
Datum rune
|
Datum rune
|
||||||
|
@ -123,7 +123,7 @@ func TestLen(t *testing.T) {
|
||||||
|
|
||||||
for testNumber, test := range tests {
|
for testNumber, test := range tests {
|
||||||
|
|
||||||
actual := Len(test.Datum)
|
actual := RuneLength(test.Datum)
|
||||||
if expected := test.Expected; expected != actual {
|
if expected := test.Expected; expected != actual {
|
||||||
t.Errorf("For test #%d, expected %d, but actually got %d.", testNumber, expected, actual)
|
t.Errorf("For test #%d, expected %d, but actually got %d.", testNumber, expected, actual)
|
||||||
continue
|
continue
|
Loading…
Reference in New Issue