(t *testing.T)
| 216 | } |
| 217 | |
| 218 | func TestGetExcelColumnName(t *testing.T) { |
| 219 | a := assert.New(t) |
| 220 | |
| 221 | tests := []struct { |
| 222 | index int |
| 223 | want string |
| 224 | }{ |
| 225 | { |
| 226 | index: 0, |
| 227 | want: "A", |
| 228 | }, |
| 229 | { |
| 230 | index: 3, |
| 231 | want: "D", |
| 232 | }, |
| 233 | { |
| 234 | index: 25, |
| 235 | want: "Z", |
| 236 | }, |
| 237 | { |
| 238 | index: 26, |
| 239 | want: "AA", |
| 240 | }, |
| 241 | { |
| 242 | index: 27, |
| 243 | want: "AB", |
| 244 | }, |
| 245 | { |
| 246 | index: ExcelMaxColumn - 1, |
| 247 | want: "ZZZ", |
| 248 | }, |
| 249 | } |
| 250 | |
| 251 | for _, test := range tests { |
| 252 | got, err := ExcelColumnName(test.index) |
| 253 | a.NoError(err) |
| 254 | a.Equal(test.want, got) |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | func TestExportJSON(t *testing.T) { |
| 259 | tests := []struct { |
nothing calls this directly
no test coverage detected