summaryrefslogtreecommitdiff
path: root/adjust_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'adjust_test.go')
-rw-r--r--adjust_test.go18
1 files changed, 4 insertions, 14 deletions
diff --git a/adjust_test.go b/adjust_test.go
index 0d63ed6..c4af38b 100644
--- a/adjust_test.go
+++ b/adjust_test.go
@@ -73,20 +73,10 @@ func TestAdjustAutoFilter(t *testing.T) {
func TestAdjustHelper(t *testing.T) {
f := NewFile()
f.NewSheet("Sheet2")
- f.Sheet["xl/worksheets/sheet1.xml"] = &xlsxWorksheet{
- MergeCells: &xlsxMergeCells{
- Cells: []*xlsxMergeCell{
- {
- Ref: "A:B1",
- },
- },
- },
- }
- f.Sheet["xl/worksheets/sheet2.xml"] = &xlsxWorksheet{
- AutoFilter: &xlsxAutoFilter{
- Ref: "A1:B",
- },
- }
+ f.Sheet.Store("xl/worksheets/sheet1.xml", &xlsxWorksheet{
+ MergeCells: &xlsxMergeCells{Cells: []*xlsxMergeCell{{Ref: "A:B1"}}}})
+ f.Sheet.Store("xl/worksheets/sheet2.xml", &xlsxWorksheet{
+ AutoFilter: &xlsxAutoFilter{Ref: "A1:B"}})
// 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"`)