Skip to content

Commit

Permalink
strings: ignore allocation test in cover mode
Browse files Browse the repository at this point in the history
Fixes #17699

Change-Id: I7ea29a3fc2ca13d9d7e3044cbb8ea22e3435d423
Reviewed-on: https://go-review.googlesource.com/32484
Run-TryBot: Brad Fitzpatrick <[email protected]>
Reviewed-by: Rob Pike <[email protected]>
  • Loading branch information
bradfitz committed Nov 1, 2016
1 parent daf3f08 commit 655a3b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/strings/strings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 655a3b5

Please sign in to comment.