Fill buf through n writes of string fus. The initial contents of buf corresponds to the string s; the result is the final contents of buf returned as a string.
(t *testing.T, testname string, buf *Buffer, s string, n int, fus string)
| 52 | // The initial contents of buf corresponds to the string s; |
| 53 | // the result is the final contents of buf returned as a string. |
| 54 | func fillString(t *testing.T, testname string, buf *Buffer, s string, n int, fus string) string { |
| 55 | check(t, testname+" (fill 1)", buf, s) |
| 56 | for ; n > 0; n-- { |
| 57 | m, err := buf.WriteString(fus) |
| 58 | if m != len(fus) { |
| 59 | t.Errorf(testname+" (fill 2): m == %d, expected %d", m, len(fus)) |
| 60 | } |
| 61 | if err != nil { |
| 62 | t.Errorf(testname+" (fill 3): err should always be nil, found err == %s", err) |
| 63 | } |
| 64 | s += fus |
| 65 | check(t, testname+" (fill 4)", buf, s) |
| 66 | } |
| 67 | return s |
| 68 | } |
| 69 | |
| 70 | // Fill buf through n writes of byte slice fub. |
| 71 | // The initial contents of buf corresponds to the string s; |
no test coverage detected