aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/container/vector/stringvector_test.go
diff options
context:
space:
mode:
authorFazlul Shahriar <fshahriar@gmail.com>2010-05-31 15:53:55 -0700
committerRob Pike <r@golang.org>2010-05-31 15:53:55 -0700
commiteed5bb3bee66daefbb55497c93a6e2e92c3762b1 (patch)
treee93ac25f96c329d71abb60177377eb01b890b80f /src/pkg/container/vector/stringvector_test.go
parentce9da214b7d9186c1e3ca61177ce86f3ac7f33a0 (diff)
downloadgo-eed5bb3bee66daefbb55497c93a6e2e92c3762b1.tar.xz
vector: undo changes to autogenerated files
Also, move Do() to vector.go, so that Do() for IntVector and StringVector is autogenerated. The only files edited are Makefile, defs.go, and vector.go. The rest are autogenerated with "make generate". R=r CC=golang-dev, hoisie https://golang.org/cl/1435041
Diffstat (limited to 'src/pkg/container/vector/stringvector_test.go')
-rw-r--r--src/pkg/container/vector/stringvector_test.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/pkg/container/vector/stringvector_test.go b/src/pkg/container/vector/stringvector_test.go
index 5bc8a626bf..859dac2fde 100644
--- a/src/pkg/container/vector/stringvector_test.go
+++ b/src/pkg/container/vector/stringvector_test.go
@@ -279,9 +279,10 @@ func TestStrDo(t *testing.T) {
a.Set(i, int2StrValue(salt*i))
}
count := 0
- a.Do(func(s string) {
- if s != int2StrValue(count*salt) {
- t.Error(tname(a), "value at", count, "should be", count*salt, "not", s)
+ a.Do(func(e string) {
+ i := intf2StrValue(e)
+ if i != int2StrValue(count*salt) {
+ t.Error(tname(a), "value at", count, "should be", count*salt, "not", i)
}
count++
})
@@ -294,9 +295,10 @@ func TestStrDo(t *testing.T) {
(*b)[i] = int2StrValue(salt * i)
}
count = 0
- b.Do(func(s string) {
- if s != int2StrValue(count*salt) {
- t.Error(tname(b), "b) value at", count, "should be", count*salt, "not", s)
+ b.Do(func(e string) {
+ i := intf2StrValue(e)
+ if i != int2StrValue(count*salt) {
+ t.Error(tname(b), "b) value at", count, "should be", count*salt, "not", i)
}
count++
})
@@ -310,9 +312,10 @@ func TestStrDo(t *testing.T) {
c[i] = int2StrValue(salt * i)
}
count = 0
- c.Do(func(s string) {
- if s != int2StrValue(count*salt) {
- t.Error(tname(c), "c) value at", count, "should be", count*salt, "not", s)
+ c.Do(func(e string) {
+ i := intf2StrValue(e)
+ if i != int2StrValue(count*salt) {
+ t.Error(tname(c), "c) value at", count, "should be", count*salt, "not", i)
}
count++
})