MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / assertSliceEqual

Function assertSliceEqual

tests/runtime/map/runner.go:179–188  ·  view source on GitHub ↗
(a []T, b []T)

Source from the content-addressed store, hash-verified

177}
178
179func assertSliceEqual[T comparable](a []T, b []T) {
180 if len(a) != len(b) {
181 panic(fmt.Sprintf("slices have different lengths: %d vs %d", len(a), len(b)))
182 }
183 for i := range a {
184 if a[i] != b[i] {
185 panic(fmt.Sprintf("slices differ at index %d: %v vs %v", i, a[i], b[i]))
186 }
187 }
188}

Callers 2

testBytesRoundtripFunction · 0.85
testMultiParamRoundtripFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected