(t *testing.T)
| 222 | } |
| 223 | |
| 224 | func TestReader_ReadStringInto_Int(t *testing.T) { |
| 225 | r := proto.NewReader(bytes.NewReader([]byte(":42\r\n"))) |
| 226 | buf := make([]byte, 16) |
| 227 | n, err := r.ReadStringInto(buf) |
| 228 | if err != nil { |
| 229 | t.Fatalf("ReadStringInto: %v", err) |
| 230 | } |
| 231 | if string(buf[:n]) != "42" { |
| 232 | t.Fatalf("got %q, want %q", buf[:n], "42") |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | func TestReader_ReadStringInto_Float(t *testing.T) { |
| 237 | r := proto.NewReader(bytes.NewReader([]byte(",3.14\r\n"))) |
nothing calls this directly
no test coverage detected
searching dependent graphs…