(t *testing.T)
| 443 | } |
| 444 | |
| 445 | func TestSplitLines(t *testing.T) { |
| 446 | allTests := []struct { |
| 447 | input string |
| 448 | want [][]byte |
| 449 | }{ |
| 450 | {"foo", stringsToBytes("foo\n")}, |
| 451 | {"foo\nbar", stringsToBytes("foo\n", "bar\n")}, |
| 452 | {"foo\nbar\n", stringsToBytes("foo\n", "bar\n", "\n")}, |
| 453 | } |
| 454 | for _, test := range allTests { |
| 455 | assertEqual(t, SplitLines([]byte(test.input)), test.want) |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | func benchmarkSplitLines(b *testing.B, count int) { |
| 460 | str := bytes.Repeat([]byte("foo\n"), count) |
nothing calls this directly
no test coverage detected