(t *testing.T)
| 122 | } |
| 123 | |
| 124 | func 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 | |
| 137 | func TestNewDocumentFromReader(t *testing.T) { |
| 138 | cases := []struct { |
nothing calls this directly
no test coverage detected