(t *testing.T)
| 127 | } |
| 128 | |
| 129 | func TestHumanInt(t *testing.T) { |
| 130 | cases := []struct { |
| 131 | in int64 |
| 132 | want string |
| 133 | }{ |
| 134 | {0, "0"}, |
| 135 | {999, "999"}, |
| 136 | {1000, "1,000"}, |
| 137 | {1234567, "1,234,567"}, |
| 138 | {1041234, "1,041,234"}, |
| 139 | {-1234567, "-1,234,567"}, |
| 140 | } |
| 141 | for _, c := range cases { |
| 142 | got := humanInt(c.in) |
| 143 | if got != c.want { |
| 144 | t.Errorf("humanInt(%d) = %q, want %q", c.in, got, c.want) |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | func TestSparkline(t *testing.T) { |
| 150 | got := sparkline([]int{0, 5, 10}) |
nothing calls this directly
no test coverage detected