diff options
author | xuri <xuri.me@gmail.com> | 2021-05-10 00:09:24 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-05-10 00:09:24 +0800 |
commit | be12cc27f1d774154b17763c071e1dc6f91eab8c (patch) | |
tree | d6544c2e33e8aacfb0867e79ffc69fde435d3183 /col_test.go | |
parent | 423bc26d1f87db55bab5704afebf4509269bbc7e (diff) |
This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message
Diffstat (limited to 'col_test.go')
-rw-r--r-- | col_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/col_test.go b/col_test.go index add1c11..6ab5e57 100644 --- a/col_test.go +++ b/col_test.go @@ -246,12 +246,12 @@ func TestOutlineLevel(t *testing.T) { assert.EqualError(t, err, "sheet Shee2 is not exist") assert.NoError(t, f.SetColWidth("Sheet2", "A", "D", 13)) - assert.EqualError(t, f.SetColWidth("Sheet2", "A", "D", MaxColumnWidth+1), "the width of the column must be smaller than or equal to 255 characters") + assert.EqualError(t, f.SetColWidth("Sheet2", "A", "D", MaxColumnWidth+1), ErrColumnWidth.Error()) assert.NoError(t, f.SetColOutlineLevel("Sheet2", "B", 2)) assert.NoError(t, f.SetRowOutlineLevel("Sheet1", 2, 7)) - assert.EqualError(t, f.SetColOutlineLevel("Sheet1", "D", 8), "invalid outline level") - assert.EqualError(t, f.SetRowOutlineLevel("Sheet1", 2, 8), "invalid outline level") + assert.EqualError(t, f.SetColOutlineLevel("Sheet1", "D", 8), ErrOutlineLevel.Error()) + assert.EqualError(t, f.SetRowOutlineLevel("Sheet1", 2, 8), ErrOutlineLevel.Error()) // Test set row outline level on not exists worksheet. assert.EqualError(t, f.SetRowOutlineLevel("SheetN", 1, 4), "sheet SheetN is not exist") // Test get row outline level on not exists worksheet. |