MCPcopy Create free account
hub / github.com/stretchr/testify / BenchmarkBytesEqual

Function BenchmarkBytesEqual

assert/assertions_test.go:2702–2716  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

2700}
2701
2702func BenchmarkBytesEqual(b *testing.B) {
2703 const size = 1024 * 8
2704 s := make([]byte, size)
2705 for i := range s {
2706 s[i] = byte(i % 255)
2707 }
2708 s2 := make([]byte, size)
2709 copy(s2, s)
2710
2711 mockT := &mockFailNowTestingT{}
2712 b.ResetTimer()
2713 for i := 0; i < b.N; i++ {
2714 Equal(mockT, s, s2)
2715 }
2716}
2717
2718func BenchmarkNotNil(b *testing.B) {
2719 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 1

EqualFunction · 0.70

Tested by

no test coverage detected