MCPcopy Create free account
hub / github.com/antchfx/xmlquery / TestMissDeclaration

Function TestMissDeclaration

parse_test.go:297–310  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

295}
296
297func TestMissDeclaration(t *testing.T) {
298 s := `<AAA>
299 <BBB></BBB>
300 <CCC></CCC>
301 </AAA>`
302 doc, err := Parse(strings.NewReader(s))
303 if err != nil {
304 t.Fatal(err)
305 }
306 node := FindOne(doc, "//AAA")
307 if node == nil {
308 t.Fatal("//AAA is nil")
309 }
310}
311
312func TestNonXMLParse(t *testing.T) {
313 s := `{"a":null}`

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.85
FindOneFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…