aboutsummaryrefslogtreecommitdiff
path: root/src/strings/strings_test.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-11-01 18:13:54 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-11-01 18:29:31 +0000
commit655a3b5a55a641962f4ff875490f90af8a2d7ea0 (patch)
tree8473d20a852fc215e423ce3cf17afdf0539978aa /src/strings/strings_test.go
parentdaf3f082648274b0da7264bcc4794ca0dd4b999d (diff)
downloadgo-655a3b5a55a641962f4ff875490f90af8a2d7ea0.tar.xz
strings: ignore allocation test in cover mode
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>
Diffstat (limited to 'src/strings/strings_test.go')
-rw-r--r--src/strings/strings_test.go2
1 files changed, 1 insertions, 1 deletions
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)
}
}