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:
parent
daf3f08264
commit
655a3b5a55
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user