(t *testing.T)
| 254 | } |
| 255 | |
| 256 | func TestAppendInt64(t *testing.T) { |
| 257 | is := []int64{0, 1, -5, -50, int64(tint16), int64(tint32), tint64} |
| 258 | var buf bytes.Buffer |
| 259 | en := NewWriter(&buf) |
| 260 | |
| 261 | var bts []byte |
| 262 | for _, i := range is { |
| 263 | buf.Reset() |
| 264 | en.WriteInt64(i) |
| 265 | en.Flush() |
| 266 | bts = AppendInt64(bts[0:0], i) |
| 267 | if !bytes.Equal(buf.Bytes(), bts) { |
| 268 | t.Errorf("for int64 %d, encoder wrote %q; append wrote %q", i, buf.Bytes(), bts) |
| 269 | } |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | func BenchmarkAppendInt64(b *testing.B) { |
| 274 | is := []int64{0, 1, -5, -50, int64(tint16), int64(tint32), tint64} |
nothing calls this directly
no test coverage detected
searching dependent graphs…