From: Brad Fitzpatrick Date: Tue, 1 Nov 2016 18:13:54 +0000 (+0000) Subject: strings: ignore allocation test in cover mode X-Git-Tag: go1.8beta1~403 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=655a3b5a55a641962f4ff875490f90af8a2d7ea0;p=gostls13.git strings: ignore allocation test in cover mode Fixes #17699 Change-Id: I7ea29a3fc2ca13d9d7e3044cbb8ea22e3435d423 Reviewed-on: https://go-review.googlesource.com/32484 Run-TryBot: Brad Fitzpatrick Reviewed-by: Rob Pike --- diff --git a/src/strings/strings_test.go b/src/strings/strings_test.go index 68b5943c59..43979491c1 100644 --- a/src/strings/strings_test.go +++ b/src/strings/strings_test.go @@ -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) } }