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

Function assertLength

type_test.go:64–71  ·  view source on GitHub ↗
(t *testing.T, nodes []*html.Node, length int)

Source from the content-addressed store, hash-verified

62}
63
64func assertLength(t *testing.T, nodes []*html.Node, length int) {
65 if len(nodes) != length {
66 t.Errorf("Expected %d nodes, found %d.", length, len(nodes))
67 for i, n := range nodes {
68 t.Logf("Node %d: %+v.", i, n)
69 }
70 }
71}
72
73func assertClass(t *testing.T, sel *Selection, class string) {
74 if !sel.HasClass(class) {

Callers 15

TestAfterFunction · 0.85
TestAfterManyFunction · 0.85
TestAfterWithRemovedFunction · 0.85
TestAfterSelectionFunction · 0.85
TestAfterHtmlFunction · 0.85
TestAfterHtmlContextFunction · 0.85
TestAppendFunction · 0.85
TestAppendBodyFunction · 0.85
TestAppendSelectionFunction · 0.85
TestAppendCloneFunction · 0.85
TestAppendHtmlFunction · 0.85
TestAppendHtmlContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected