--- Thread state ---
(t *testing.T)
| 195 | if len(items) != 3 || items[0].label != "Day" || items[2].label != "Year" { |
| 196 | t.Errorf("subnav items = %+v, want Day, Week and Year", items) |
| 197 | } |
| 198 | // Each span wears its own number, as the boxes do, which is why the help bar does |
| 199 | // not carry them. |
| 200 | for i, want := range []string{"1", "2", "3"} { |
| 201 | if items[i].shortcut != want { |
| 202 | t.Errorf("%s tab shortcut = %q, want %q", items[i].label, items[i].shortcut, want) |
| 203 | } |
| 204 | } |
| 205 | if selected != int(viewDay) { |
| 206 | t.Errorf("selected = %d, want the day", selected) |
| 207 | } |
| 208 | // The rule names the span that is on, as the box row's rule names the open box. |
| 209 | if label != "Day" { |
| 210 | t.Errorf("label = %q", label) |
| 211 | } |
| 212 | if !centered { |
| 213 | t.Error("calendar subnav should be centered") |
nothing calls this directly
no test coverage detected