MCPcopy
hub / github.com/andeya/pholcus / TestNewDocument

Function TestNewDocument

common/goquery/type_test.go:124–135  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestNewDocument(t *testing.T) {
125 if f, e := os.Open("./testdata/page.html"); e != nil {
126 t.Error(e.Error())
127 } else {
128 defer f.Close()
129 if node, e := html.Parse(f); e != nil {
130 t.Error(e.Error())
131 } else {
132 doc = NewDocumentFromNode(node)
133 }
134 }
135}
136
137func TestNewDocumentFromReader(t *testing.T) {
138 cases := []struct {

Callers

nothing calls this directly

Calls 4

NewDocumentFromNodeFunction · 0.85
ErrorMethod · 0.65
CloseMethod · 0.65
ParseMethod · 0.45

Tested by

no test coverage detected