(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestInvalidXPathExpression(t *testing.T) { |
| 95 | doc := &Node{} |
| 96 | _, err := QueryAll(doc, "//a[@a==1]") |
| 97 | if err == nil { |
| 98 | t.Fatal("expected a parsed error but nil") |
| 99 | } |
| 100 | _, err = Query(doc, "//a[@a==1]") |
| 101 | if err == nil { |
| 102 | t.Fatal("expected a parsed error but nil") |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | func TestNavigator(t *testing.T) { |
| 107 | nav := &NodeNavigator{curr: doc, root: doc, attr: -1} |