MCPcopy Create free account
hub / github.com/araddon/qlbridge / TestIntValue

Function TestIntValue

value/value_test.go:274–281  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

272 }
273}
274func TestIntValue(t *testing.T) {
275 v := NewIntNil()
276 assert.True(t, v.Nil())
277 assert.Equal(t, "", v.ToString())
278 v = NewIntValue(32)
279 nv := v.NumberValue()
280 assert.Equal(t, nv.Int(), int64(32))
281}
282func TestValueNumber(t *testing.T) {
283 v := NewNumberValue(math.NaN())
284 _, err := json.Marshal(&v)

Callers

nothing calls this directly

Calls 7

NewIntNilFunction · 0.85
NewIntValueFunction · 0.85
NilMethod · 0.65
EqualMethod · 0.65
ToStringMethod · 0.65
IntMethod · 0.65
NumberValueMethod · 0.45

Tested by

no test coverage detected