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

Function Test_func_reverse

xpath_function_test.go:224–230  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

222}
223
224func Test_func_reverse(t *testing.T) {
225 //test_xpath_eval(t, employee_example, `reverse(("hello"))`, "hello") // Not passed
226 test_xpath_elements(t, employee_example, `reverse(//employee)`, 13, 8, 3)
227 test_xpath_elements(t, employee_example, `//employee[reverse(.) = reverse(.)]`, 3, 8, 13)
228 assertPanic(t, func() { selectNode(html_example, "reverse(concat())") }) // invalid node-sets argument.
229 assertPanic(t, func() { selectNode(html_example, "reverse()") }) // missing node-sets argument.
230}
231
232func Test_func_round(t *testing.T) {
233 test_xpath_eval(t, employee_example, `round(2.5)`, 3) // int

Callers

nothing calls this directly

Calls 3

test_xpath_elementsFunction · 0.85
assertPanicFunction · 0.85
selectNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…