aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/libgo/go/runtime/string_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8.1/libgo/go/runtime/string_test.go')
-rw-r--r--gcc-4.8.1/libgo/go/runtime/string_test.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/gcc-4.8.1/libgo/go/runtime/string_test.go b/gcc-4.8.1/libgo/go/runtime/string_test.go
deleted file mode 100644
index 8f13f0f42..000000000
--- a/gcc-4.8.1/libgo/go/runtime/string_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package runtime_test
-
-import (
- "testing"
-)
-
-func BenchmarkCompareStringEqual(b *testing.B) {
- bytes := []byte("Hello Gophers!")
- s1, s2 := string(bytes), string(bytes)
- for i := 0; i < b.N; i++ {
- if s1 != s2 {
- b.Fatal("s1 != s2")
- }
- }
-}
-
-func BenchmarkCompareStringIdentical(b *testing.B) {
- s1 := "Hello Gophers!"
- s2 := s1
- for i := 0; i < b.N; i++ {
- if s1 != s2 {
- b.Fatal("s1 != s2")
- }
- }
-}
-
-func BenchmarkCompareStringSameLength(b *testing.B) {
- s1 := "Hello Gophers!"
- s2 := "Hello, Gophers"
- for i := 0; i < b.N; i++ {
- if s1 == s2 {
- b.Fatal("s1 == s2")
- }
- }
-}
-
-func BenchmarkCompareStringDifferentLength(b *testing.B) {
- s1 := "Hello Gophers!"
- s2 := "Hello, Gophers!"
- for i := 0; i < b.N; i++ {
- if s1 == s2 {
- b.Fatal("s1 == s2")
- }
- }
-}