MCPcopy Create free account
hub / github.com/bytebase/bytebase / TestGetExcelColumnName

Function TestGetExcelColumnName

backend/component/export/export_test.go:218–256  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

216}
217
218func 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
258func TestExportJSON(t *testing.T) {
259 tests := []struct {

Callers

nothing calls this directly

Calls 2

ExcelColumnNameFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected