diff options
author | xuri <xuri.me@gmail.com> | 2022-11-12 00:02:11 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-11-12 00:16:23 +0800 |
commit | bd5dd17673f767b9f4643423c77eec486f2ad53f (patch) | |
tree | d1ceaf5f7eeff101bcf5b3f9a861a8b115088718 /adjust_test.go | |
parent | 58b5dae5eb4948a3cde238ced1ae05db159749f5 (diff) |
This is a breaking change, remove partial internal error log print, throw XML deserialize error
- Add error return value for the `GetComments`, `GetDefaultFont` and `SetDefaultFont` functions
- Update unit tests
Diffstat (limited to 'adjust_test.go')
-rw-r--r-- | adjust_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/adjust_test.go b/adjust_test.go index 0325616..3ce1796 100644 --- a/adjust_test.go +++ b/adjust_test.go @@ -10,7 +10,7 @@ import ( func TestAdjustMergeCells(t *testing.T) { f := NewFile() - // testing adjustAutoFilter with illegal cell reference. + // Test adjustAutoFilter with illegal cell reference. assert.EqualError(t, f.adjustMergeCells(&xlsxWorksheet{ MergeCells: &xlsxMergeCells{ Cells: []*xlsxMergeCell{ @@ -57,7 +57,7 @@ func TestAdjustMergeCells(t *testing.T) { }, }, columns, 1, -1)) - // testing adjustMergeCells + // Test adjustMergeCells. var cases []struct { label string ws *xlsxWorksheet @@ -68,7 +68,7 @@ func TestAdjustMergeCells(t *testing.T) { expectRect []int } - // testing insert + // Test insert. cases = []struct { label string ws *xlsxWorksheet @@ -139,7 +139,7 @@ func TestAdjustMergeCells(t *testing.T) { assert.Equal(t, c.expectRect, c.ws.MergeCells.Cells[0].rect, c.label) } - // testing delete + // Test delete, cases = []struct { label string ws *xlsxWorksheet @@ -227,7 +227,7 @@ func TestAdjustMergeCells(t *testing.T) { assert.Equal(t, c.expect, c.ws.MergeCells.Cells[0].Ref, c.label) } - // testing delete one row/column + // Test delete one row or column cases = []struct { label string ws *xlsxWorksheet @@ -324,13 +324,13 @@ func TestAdjustTable(t *testing.T) { f = NewFile() assert.NoError(t, f.AddTable(sheetName, "A1", "D5", "")) - // Test adjust table with non-table part + // Test adjust table with non-table part. f.Pkg.Delete("xl/tables/table1.xml") assert.NoError(t, f.RemoveRow(sheetName, 1)) - // Test adjust table with unsupported charset + // Test adjust table with unsupported charset. f.Pkg.Store("xl/tables/table1.xml", MacintoshCyrillicCharset) assert.NoError(t, f.RemoveRow(sheetName, 1)) - // Test adjust table with invalid table range reference + // Test adjust table with invalid table range reference. f.Pkg.Store("xl/tables/table1.xml", []byte(`<table ref="-" />`)) assert.NoError(t, f.RemoveRow(sheetName, 1)) } |