diff options
author | xuri <xuri.me@gmail.com> | 2022-09-18 00:07:15 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-09-18 00:07:15 +0800 |
commit | 3f702999e6bba26afbd2a259f6849e536042ec2e (patch) | |
tree | 4bfbbb9c1f01c52bcb9ffedac6ba9190650470cf /table_test.go | |
parent | 73cc4bd44933994ffa8efad9c3e05fe7cb826b49 (diff) |
Using the specialized name in a variable and making comments clear
- Add JSON tags for `AppProperties`, `PivotTableOption` and `PivotTableField` structure
Diffstat (limited to 'table_test.go')
-rw-r--r-- | table_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/table_test.go b/table_test.go index 39b418b..c997ad2 100644 --- a/table_test.go +++ b/table_test.go @@ -33,22 +33,22 @@ func TestAddTable(t *testing.T) { assert.EqualError(t, f.AddTable("SheetN", "B26", "A21", `{}`), "sheet SheetN does not exist") // Test add table with illegal formatset. assert.EqualError(t, f.AddTable("Sheet1", "B26", "A21", `{x}`), "invalid character 'x' looking for beginning of object key string") - // Test add table with illegal cell coordinates. + // Test add table with illegal cell reference. assert.EqualError(t, f.AddTable("Sheet1", "A", "B1", `{}`), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error()) assert.EqualError(t, f.AddTable("Sheet1", "A1", "B", `{}`), newCellNameToCoordinatesError("B", newInvalidCellNameError("B")).Error()) assert.NoError(t, f.SaveAs(filepath.Join("test", "TestAddTable.xlsx"))) - // Test addTable with illegal cell coordinates. + // Test addTable with illegal cell reference. f = NewFile() - assert.EqualError(t, f.addTable("sheet1", "", 0, 0, 0, 0, 0, nil), "invalid cell coordinates [0, 0]") - assert.EqualError(t, f.addTable("sheet1", "", 1, 1, 0, 0, 0, nil), "invalid cell coordinates [0, 0]") + assert.EqualError(t, f.addTable("sheet1", "", 0, 0, 0, 0, 0, nil), "invalid cell reference [0, 0]") + assert.EqualError(t, f.addTable("sheet1", "", 1, 1, 0, 0, 0, nil), "invalid cell reference [0, 0]") } func TestSetTableHeader(t *testing.T) { f := NewFile() _, err := f.setTableHeader("Sheet1", 1, 0, 1) - assert.EqualError(t, err, "invalid cell coordinates [1, 0]") + assert.EqualError(t, err, "invalid cell reference [1, 0]") } func TestAutoFilter(t *testing.T) { @@ -78,7 +78,7 @@ func TestAutoFilter(t *testing.T) { }) } - // Test AutoFilter with illegal cell coordinates. + // Test AutoFilter with illegal cell reference. assert.EqualError(t, f.AutoFilter("Sheet1", "A", "B1", ""), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error()) assert.EqualError(t, f.AutoFilter("Sheet1", "A1", "B", ""), newCellNameToCoordinatesError("B", newInvalidCellNameError("B")).Error()) } |