diff --git a/src/strings/strings_test.go b/src/strings/strings_test.go index 68b5943c59c..43979491c1f 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) } }