From ca43c6511538f50581ec3bbe1e4ee275444f8049 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 19 Jul 2020 00:10:42 +0800 Subject: Update test for addTable --- table_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'table_test.go') diff --git a/table_test.go b/table_test.go index 127ee1b..95738e1 100644 --- a/table_test.go +++ b/table_test.go @@ -29,6 +29,8 @@ func TestAddTable(t *testing.T) { t.FailNow() } + // Test add table in not exist worksheet. + assert.EqualError(t, f.AddTable("SheetN", "B26", "A21", `{}`), "sheet SheetN is not exist") // Test add table with illegal formatset. assert.EqualError(t, f.AddTable("Sheet1", "B26", "A21", `{x}`), "invalid character 'x' looking for beginning of object key string") // Test add table with illegal cell coordinates. @@ -100,6 +102,10 @@ func TestAutoFilterError(t *testing.T) { }) } + assert.EqualError(t, f.autoFilter("SheetN", "A1", 1, 1, &formatAutoFilter{ + Column: "A", + Expression: "", + }), "sheet SheetN is not exist") assert.EqualError(t, f.autoFilter("Sheet1", "A1", 1, 1, &formatAutoFilter{ Column: "-", Expression: "-", -- cgit v1.2.1