(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestWriteHeaderNanos(t *testing.T) { |
| 18 | var buf bytes.Buffer |
| 19 | w := NewWriterNanos(&buf) |
| 20 | w.WriteFileHeader(0x1234, 0x56) |
| 21 | want := []byte{ |
| 22 | 0x4d, 0x3c, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, |
| 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 24 | 0x34, 0x12, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, |
| 25 | } |
| 26 | if got := buf.Bytes(); !bytes.Equal(got, want) { |
| 27 | t.Errorf("buf mismatch:\nwant: %+v\ngot: %+v", want, got) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func TestWriteHeader(t *testing.T) { |
| 32 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected
searching dependent graphs…