MCPcopy
hub / github.com/vmihailenco/msgpack / TestTime

Method TestTime

msgpack_test.go:43–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func (t *MsgpackTest) TestTime() {
44 in := time.Now()
45 var out time.Time
46
47 t.Nil(t.enc.Encode(in))
48 t.Nil(t.dec.Decode(&out))
49 t.True(out.Equal(in))
50
51 var zero time.Time
52 t.Nil(t.enc.Encode(zero))
53 t.Nil(t.dec.Decode(&out))
54 t.True(out.Equal(zero))
55 t.True(out.IsZero())
56}
57
58func (t *MsgpackTest) TestLargeBytes() {
59 N := int(1e6)

Callers

nothing calls this directly

Calls 3

EncodeMethod · 0.80
DecodeMethod · 0.80
IsZeroMethod · 0.65

Tested by

no test coverage detected