(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestChildNodes(t *testing.T) { |
| 121 | t.Run("Has 3 children", func(t *testing.T) { |
| 122 | node := &Node{Type: ElementNode} |
| 123 | |
| 124 | AddChild(node, &Node{Type: CommentNode}) |
| 125 | AddChild(node, &Node{Type: ElementNode}) |
| 126 | AddChild(node, &Node{Type: TextNode}) |
| 127 | |
| 128 | children := node.ChildNodes() |
| 129 | |
| 130 | testTrue(t, len(children) == 3) |
| 131 | }) |
| 132 | } |
| 133 | |
| 134 | func TestAddAttr(t *testing.T) { |
| 135 | for _, test := range []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…