(t *testing.T)
| 123 | } |
| 124 | |
| 125 | func TestMarshalUnmarshalitem(t *testing.T) { |
| 126 | v := item{} |
| 127 | bts, err := v.MarshalMsg(nil) |
| 128 | if err != nil { |
| 129 | t.Fatal(err) |
| 130 | } |
| 131 | left, err := v.UnmarshalMsg(bts) |
| 132 | if err != nil { |
| 133 | t.Fatal(err) |
| 134 | } |
| 135 | if len(left) > 0 { |
| 136 | t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left) |
| 137 | } |
| 138 | |
| 139 | left, err = msgp.Skip(bts) |
| 140 | if err != nil { |
| 141 | t.Fatal(err) |
| 142 | } |
| 143 | if len(left) > 0 { |
| 144 | t.Errorf("%d bytes left over after Skip(): %q", len(left), left) |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | func BenchmarkMarshalMsgitem(b *testing.B) { |
| 149 | v := item{} |
nothing calls this directly
no test coverage detected