(t *testing.T)
| 216 | } |
| 217 | |
| 218 | func TestIndentation(t *testing.T) { |
| 219 | for _, c := range []struct { |
| 220 | str string |
| 221 | wantIndent int |
| 222 | }{ |
| 223 | {"", 0}, |
| 224 | {"foobar", 0}, |
| 225 | {" foo", 2}, |
| 226 | {"\tfoo", 8}, |
| 227 | {"\t foo", 9}, |
| 228 | {" \tfoo", 8}, |
| 229 | {" \tfoo", 8}, |
| 230 | {" \tfoo", 16}, |
| 231 | } { |
| 232 | if n := indentation(c.str); n != c.wantIndent { |
| 233 | t.Errorf("indentation(%v): got %d, want %d", c.str, n, c.wantIndent) |
| 234 | } |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | func TestRightPad(t *testing.T) { |
| 239 | for _, c := range []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…