diff options
Diffstat (limited to 'adjust_test.go')
-rw-r--r-- | adjust_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/adjust_test.go b/adjust_test.go index a35e609..7b708ab 100644 --- a/adjust_test.go +++ b/adjust_test.go @@ -12,7 +12,7 @@ func TestAdjustMergeCells(t *testing.T) { assert.EqualError(t, f.adjustMergeCells(&xlsxWorksheet{ MergeCells: &xlsxMergeCells{ Cells: []*xlsxMergeCell{ - &xlsxMergeCell{ + { Ref: "A:B1", }, }, @@ -21,7 +21,7 @@ func TestAdjustMergeCells(t *testing.T) { assert.EqualError(t, f.adjustMergeCells(&xlsxWorksheet{ MergeCells: &xlsxMergeCells{ Cells: []*xlsxMergeCell{ - &xlsxMergeCell{ + { Ref: "A1:B", }, }, @@ -50,7 +50,7 @@ func TestAdjustHelper(t *testing.T) { f.Sheet["xl/worksheets/sheet1.xml"] = &xlsxWorksheet{ MergeCells: &xlsxMergeCells{ Cells: []*xlsxMergeCell{ - &xlsxMergeCell{ + { Ref: "A:B1", }, }, @@ -64,4 +64,6 @@ func TestAdjustHelper(t *testing.T) { // testing adjustHelper with illegal cell coordinates. assert.EqualError(t, f.adjustHelper("Sheet1", rows, 0, 0), `cannot convert cell "A" to coordinates: invalid cell name "A"`) assert.EqualError(t, f.adjustHelper("Sheet2", rows, 0, 0), `cannot convert cell "B" to coordinates: invalid cell name "B"`) + // testing adjustHelper on not exists worksheet. + assert.EqualError(t, f.adjustHelper("SheetN", rows, 0, 0), "sheet SheetN is not exist") } |