MCPcopy Create free account
hub / github.com/dlclark/regexp2 / assertByteRange

Function assertByteRange

regexp_test.go:260–266  ·  view source on GitHub ↗
(t *testing.T, name string, c byteRanger, wantIndex, wantLength int)

Source from the content-addressed store, hash-verified

258}
259
260func assertByteRange(t *testing.T, name string, c byteRanger, wantIndex, wantLength int) {
261 t.Helper()
262 gotIndex, gotLength := c.ByteRange()
263 if gotIndex != wantIndex || gotLength != wantLength {
264 t.Fatalf("%s ByteRange wanted (%v, %v) got (%v, %v)", name, wantIndex, wantLength, gotIndex, gotLength)
265 }
266}
267
268func TestEscapeUnescape_Basic(t *testing.T) {
269 s1 := "#$^*+(){}<>\\|. "

Calls 1

ByteRangeMethod · 0.65

Tested by

no test coverage detected