mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue