MCPcopy Index your code
hub / github.com/expr-lang/expr / TestBytesEqual

Function TestBytesEqual

internal/testify/assert/assertions_test.go:2485–2496  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2483}
2484
2485func TestBytesEqual(t *testing.T) {
2486 var cases = []struct {
2487 a, b []byte
2488 }{
2489 {make([]byte, 2), make([]byte, 2)},
2490 {make([]byte, 2), make([]byte, 2, 3)},
2491 {nil, make([]byte, 0)},
2492 }
2493 for i, c := range cases {
2494 Equal(t, reflect.DeepEqual(c.a, c.b), ObjectsAreEqual(c.a, c.b), "case %d failed", i+1)
2495 }
2496}
2497
2498func BenchmarkBytesEqual(b *testing.B) {
2499 const size = 1024 * 8

Callers

nothing calls this directly

Calls 2

ObjectsAreEqualFunction · 0.85
EqualFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…