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

Function test_xpath_values

xpath_test.go:56–63  ·  view source on GitHub ↗
(t testing.TB, root *TNode, expr string, expected ...string)

Source from the content-addressed store, hash-verified

54}
55
56func test_xpath_values(t testing.TB, root *TNode, expr string, expected ...string) {
57 result := selectNodes(root, expr)
58 assertEqual(t, len(expected), len(result))
59
60 for i := 0; i < len(expected); i++ {
61 assertEqual(t, expected[i], result[i].Value())
62 }
63}
64
65func test_xpath_tags(t *testing.T, root *TNode, expr string, expected ...string) {
66 result := selectNodes(root, expr)

Callers 9

Test_childFunction · 0.85
Test_attributeFunction · 0.85
Test_func_string_emptyFunction · 0.85
TestAbsolutePathsFunction · 0.85
TestAttributesFunction · 0.85
TestNonEnglishExpressionFunction · 0.85
TestBUG_104Function · 0.85

Calls 3

selectNodesFunction · 0.85
assertEqualFunction · 0.85
ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…