From 544ef18a8cb9949fcb8833c6d2816783c90f3318 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 5 Jul 2021 00:03:56 +0800 Subject: - Support concurrency iterate rows and columns - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message --- adjust_test.go | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'adjust_test.go') 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"`) -- cgit v1.2.1