(t *testing.T)
| 152 | } |
| 153 | |
| 154 | func Test_func_sum(t *testing.T) { |
| 155 | test_xpath_eval(t, empty_example, `sum(1 + 2)`, float64(3)) |
| 156 | test_xpath_eval(t, empty_example, `sum(1.1 + 2)`, float64(3.1)) |
| 157 | test_xpath_eval(t, book_example, `sum(//book/price)`, float64(149.93)) |
| 158 | test_xpath_elements(t, book_example, `//book[sum(./price) > 40]`, 15) |
| 159 | assertPanic(t, func() { selectNode(html_example, `//title[sum('Hello') = 0]`) }) |
| 160 | } |
| 161 | |
| 162 | func Test_func_translate(t *testing.T) { |
| 163 | test_xpath_eval(t, empty_example, `translate("bar","abc","ABC")`, "BAr") |
nothing calls this directly
no test coverage detected
searching dependent graphs…