mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
fix test
This commit is contained in:
parent
e98968aeb0
commit
96a35e524c
|
@ -1089,7 +1089,11 @@ func TestConcat(t *testing.T) {
|
||||||
})
|
})
|
||||||
_ = sink
|
_ = sink
|
||||||
if allocs > 1 {
|
if allocs > 1 {
|
||||||
t.Fatalf("Concat(%v) had %f allocs; expected 1", tc.s, allocs)
|
errorf := t.Errorf
|
||||||
|
if testenv.OptimizationOff() || race.Enabled {
|
||||||
|
errorf = t.Logf
|
||||||
|
}
|
||||||
|
errorf("Concat(%v) allocated %v times; want 1", tc.s, allocs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue