1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:57:57 -07:00
This commit is contained in:
Carl Johnson 2023-08-07 21:11:31 -04:00
parent e98968aeb0
commit 96a35e524c

View File

@ -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)
}
}
}