(t *testing.T)
| 393 | } |
| 394 | |
| 395 | func TestSplitLines(t *testing.T) { |
| 396 | allTests := []struct { |
| 397 | input string |
| 398 | want []string |
| 399 | }{ |
| 400 | {"foo", []string{"foo\n"}}, |
| 401 | {"foo\nbar", []string{"foo\n", "bar\n"}}, |
| 402 | {"foo\nbar\n", []string{"foo\n", "bar\n", "\n"}}, |
| 403 | } |
| 404 | for _, test := range allTests { |
| 405 | assertEqual(t, SplitLines(test.input), test.want) |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | func benchmarkSplitLines(b *testing.B, count int) { |
| 410 | str := strings.Repeat("foo\n", count) |
nothing calls this directly
no test coverage detected
searching dependent graphs…