(t *testing.T)
| 403 | } |
| 404 | |
| 405 | func TestSplitLines(t *testing.T) { |
| 406 | allTests := []struct { |
| 407 | input string |
| 408 | want []string |
| 409 | }{ |
| 410 | {"foo", []string{"foo\n"}}, |
| 411 | {"foo\nbar", []string{"foo\n", "bar\n"}}, |
| 412 | {"foo\nbar\n", []string{"foo\n", "bar\n", "\n"}}, |
| 413 | } |
| 414 | for _, test := range allTests { |
| 415 | assertEqual(t, SplitLines(test.input), test.want) |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | func benchmarkSplitLines(b *testing.B, count int) { |
| 420 | str := strings.Repeat("foo\n", count) |
nothing calls this directly
no test coverage detected