summaryrefslogtreecommitdiff
path: root/table_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'table_test.go')
-rw-r--r--table_test.go6
1 files changed, 6 insertions, 0 deletions
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: "-",