diff options
| author | Michael Hoisie <hoisie@gmail.com> | 2010-05-31 14:55:30 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2010-05-31 14:55:30 -0700 |
| commit | ebb1c8b91262f89d944248a6048bdf35000ede89 (patch) | |
| tree | 265ef5696d441b322a4b4742bd0a87899c53bf61 /src/pkg/container/vector/stringvector_test.go | |
| parent | 8af4acf59dadaaf6649413ebf45fe40d70e3f992 (diff) | |
| download | go-ebb1c8b91262f89d944248a6048bdf35000ede89.tar.xz | |
IntVector.Do now takes an f(int), and StringVector.Do now takes an f(string).
R=r
CC=golang-dev
https://golang.org/cl/1433041
Diffstat (limited to 'src/pkg/container/vector/stringvector_test.go')
| -rw-r--r-- | src/pkg/container/vector/stringvector_test.go | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/pkg/container/vector/stringvector_test.go b/src/pkg/container/vector/stringvector_test.go index 2a02a76420..5bc8a626bf 100644 --- a/src/pkg/container/vector/stringvector_test.go +++ b/src/pkg/container/vector/stringvector_test.go @@ -279,10 +279,9 @@ func TestStrDo(t *testing.T) { a.Set(i, int2StrValue(salt*i)) } count := 0 - a.Do(func(e interface{}) { - i := intf2StrValue(e) - if i != int2StrValue(count*salt) { - t.Error(tname(a), "value at", count, "should be", count*salt, "not", i) + a.Do(func(s string) { + if s != int2StrValue(count*salt) { + t.Error(tname(a), "value at", count, "should be", count*salt, "not", s) } count++ }) @@ -295,10 +294,9 @@ func TestStrDo(t *testing.T) { (*b)[i] = int2StrValue(salt * i) } count = 0 - b.Do(func(e interface{}) { - i := intf2StrValue(e) - if i != int2StrValue(count*salt) { - t.Error(tname(b), "b) value at", count, "should be", count*salt, "not", i) + b.Do(func(s string) { + if s != int2StrValue(count*salt) { + t.Error(tname(b), "b) value at", count, "should be", count*salt, "not", s) } count++ }) @@ -312,10 +310,9 @@ func TestStrDo(t *testing.T) { c[i] = int2StrValue(salt * i) } count = 0 - c.Do(func(e interface{}) { - i := intf2StrValue(e) - if i != int2StrValue(count*salt) { - t.Error(tname(c), "c) value at", count, "should be", count*salt, "not", i) + c.Do(func(s string) { + if s != int2StrValue(count*salt) { + t.Error(tname(c), "c) value at", count, "should be", count*salt, "not", s) } count++ }) |
