(t *testing.T)
| 143 | } |
| 144 | |
| 145 | func TestReadNilBytes(t *testing.T) { |
| 146 | var buf bytes.Buffer |
| 147 | en := NewWriter(&buf) |
| 148 | en.WriteNil() |
| 149 | en.Flush() |
| 150 | |
| 151 | left, err := ReadNilBytes(buf.Bytes()) |
| 152 | if err != nil { |
| 153 | t.Fatal(err) |
| 154 | } |
| 155 | if len(left) != 0 { |
| 156 | t.Errorf("expected 0 bytes left; found %d", len(left)) |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | func BenchmarkReadNilByte(b *testing.B) { |
| 161 | buf := []byte{mnil} |
nothing calls this directly
no test coverage detected
searching dependent graphs…