aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/container/vector/intvector_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/container/vector/intvector_test.go')
-rw-r--r--src/pkg/container/vector/intvector_test.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/pkg/container/vector/intvector_test.go b/src/pkg/container/vector/intvector_test.go
index b8900478b2..c80dd52cca 100644
--- a/src/pkg/container/vector/intvector_test.go
+++ b/src/pkg/container/vector/intvector_test.go
@@ -279,8 +279,9 @@ func TestIntDo(t *testing.T) {
a.Set(i, int2IntValue(salt*i))
}
count := 0
- a.Do(func(i int) {
- if i != count*salt {
+ a.Do(func(e int) {
+ i := intf2IntValue(e)
+ if i != int2IntValue(count*salt) {
t.Error(tname(a), "value at", count, "should be", count*salt, "not", i)
}
count++
@@ -294,8 +295,9 @@ func TestIntDo(t *testing.T) {
(*b)[i] = int2IntValue(salt * i)
}
count = 0
- b.Do(func(i int) {
- if i != count*salt {
+ b.Do(func(e int) {
+ i := intf2IntValue(e)
+ if i != int2IntValue(count*salt) {
t.Error(tname(b), "b) value at", count, "should be", count*salt, "not", i)
}
count++
@@ -310,8 +312,9 @@ func TestIntDo(t *testing.T) {
c[i] = int2IntValue(salt * i)
}
count = 0
- c.Do(func(i int) {
- if i != count*salt {
+ c.Do(func(e int) {
+ i := intf2IntValue(e)
+ if i != int2IntValue(count*salt) {
t.Error(tname(c), "c) value at", count, "should be", count*salt, "not", i)
}
count++