aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/string_test.go')
-rw-r--r--src/runtime/string_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/string_test.go b/src/runtime/string_test.go
index 150a25520a..37b75c1a89 100644
--- a/src/runtime/string_test.go
+++ b/src/runtime/string_test.go
@@ -102,6 +102,17 @@ func BenchmarkRuneIterate2(b *testing.B) {
}
}
+func BenchmarkArrayEqual(b *testing.B) {
+ a1 := [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
+ a2 := [16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ if a1 != a2 {
+ b.Fatal("not equal")
+ }
+ }
+}
+
func TestStringW(t *testing.T) {
strings := []string{
"hello",