diff options
author | xuri <xuri.me@gmail.com> | 2021-12-07 00:26:53 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-12-07 00:26:53 +0800 |
commit | 44a13aa402b0189b119635d2f0a26961795c6bda (patch) | |
tree | 0000ed94fe92507517281812ba49d85aa58a7211 /comment_test.go | |
parent | 3325c3946d0ab77083555bab334381a1167ee580 (diff) |
Export 7 errors so users can act differently on different type of errors
Diffstat (limited to 'comment_test.go')
-rw-r--r-- | comment_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/comment_test.go b/comment_test.go index fb36d29..9eb07f4 100644 --- a/comment_test.go +++ b/comment_test.go @@ -32,7 +32,7 @@ func TestAddComments(t *testing.T) { // Test add comment on not exists worksheet. assert.EqualError(t, f.AddComment("SheetN", "B7", `{"author":"Excelize: ","text":"This is a comment."}`), "sheet SheetN is not exist") // Test add comment on with illegal cell coordinates - assert.EqualError(t, f.AddComment("Sheet1", "A", `{"author":"Excelize: ","text":"This is a comment."}`), `cannot convert cell "A" to coordinates: invalid cell name "A"`) + assert.EqualError(t, f.AddComment("Sheet1", "A", `{"author":"Excelize: ","text":"This is a comment."}`), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error()) if assert.NoError(t, f.SaveAs(filepath.Join("test", "TestAddComments.xlsx"))) { assert.Len(t, f.GetComments(), 2) } |