MCPcopy Create free account
hub / github.com/antchfx/xpath / TestMustCompile

Function TestMustCompile

xpath_test.go:231–242  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229}
230
231func TestMustCompile(t *testing.T) {
232 expr := MustCompile("//")
233 assertTrue(t, expr != nil)
234
235 if wanted := (nopQuery{}); expr.q != wanted {
236 t.Fatalf("wanted nopQuery object but got %s", expr)
237 }
238 iter := expr.Select(createNavigator(html_example))
239 if iter.MoveNext() {
240 t.Fatal("should be an empty node list but got one")
241 }
242}
243
244func Test_plusFunc(t *testing.T) {
245 // 1+1

Callers

nothing calls this directly

Calls 5

MustCompileFunction · 0.85
assertTrueFunction · 0.85
createNavigatorFunction · 0.85
MoveNextMethod · 0.80
SelectMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…