MCPcopy Create free account
hub / github.com/PuerkitoBio/goquery / TestNegativeSliceToEnd

Function TestNegativeSliceToEnd

array_test.go:154–158  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func TestNegativeSliceToEnd(t *testing.T) {
155 sel := Doc().Find(".container-fluid").Slice(-3, ToEnd)
156 assertLength(t, sel.Nodes, 3)
157 assertSelectionIs(t, sel, "#cf2", "#cf3", "#cf4")
158}
159
160func TestNegativeSliceOutOfBounds(t *testing.T) {
161 defer assertPanic(t)

Callers

nothing calls this directly

Calls 5

DocFunction · 0.85
assertLengthFunction · 0.85
assertSelectionIsFunction · 0.85
SliceMethod · 0.80
FindMethod · 0.80

Tested by

no test coverage detected