mirror of
https://github.com/golang/go
synced 2024-11-26 02:57:57 -07:00
fix test
This commit is contained in:
parent
e98968aeb0
commit
96a35e524c
@ -1089,7 +1089,11 @@ func TestConcat(t *testing.T) {
|
||||
})
|
||||
_ = sink
|
||||
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 New Issue
Block a user