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

Function Test_plusFunc

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

Source from the content-addressed store, hash-verified

242}
243
244func Test_plusFunc(t *testing.T) {
245 // 1+1
246 assertEqual(t, float64(2), plusFunc(nil, float64(1), float64(1)))
247 // string +
248 assertEqual(t, float64(2), plusFunc(nil, "1", "1"))
249 // invalid string
250 v := plusFunc(nil, "a", 1)
251 assertTrue(t, math.IsNaN(v.(float64)))
252 // Nodeset
253 // TODO
254}
255
256func Test_minusFunc(t *testing.T) {
257 // 1 - 1

Callers

nothing calls this directly

Calls 2

assertEqualFunction · 0.85
assertTrueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…