From 655a3b5a55a641962f4ff875490f90af8a2d7ea0 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 1 Nov 2016 18:13:54 +0000 Subject: [PATCH] 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 --- src/strings/strings_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } } -- 2.48.1