]> Cypherpunks repositories - gostls13.git/commitdiff
strings: ignore allocation test in cover mode
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 1 Nov 2016 18:13:54 +0000 (18:13 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 1 Nov 2016 18:29:31 +0000 (18:29 +0000)
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>
src/strings/strings_test.go

index 68b5943c59c60ba38321422f989c56567b530ae1..43979491c1fc58046719212a1388dd047f22bc40 100644 (file)
@@ -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)
        }
 }