1
0
mirror of https://github.com/golang/go synced 2024-11-20 07:54:39 -07:00

strings: ignore allocation test in cover mode

Fixes #17699

Change-Id: I7ea29a3fc2ca13d9d7e3044cbb8ea22e3435d423
Reviewed-on: https://go-review.googlesource.com/32484
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-11-01 18:13:54 +00:00
parent daf3f08264
commit 655a3b5a55

View File

@ -294,7 +294,7 @@ func TestIndexRune(t *testing.T) {
t.Fatalf("'世' at %d; want 4", i)
}
})
if allocs != 0 {
if allocs != 0 && testing.CoverMode() == "" {
t.Errorf("expected no allocations, got %f", allocs)
}
}