summaryrefslogtreecommitdiff
path: root/excelize_test.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-03-10 23:10:15 +0800
committerRi Xu <xuri.me@gmail.com>2017-03-10 23:10:15 +0800
commit5384756d6483ba4bda294d47461c8df8b25c7a9c (patch)
tree153ffc8344e70e81d55be3268d2929179a8afd05 /excelize_test.go
parent1f73f08185e664d6914c8eb849a9797b26067628 (diff)
- Complete the element `sheetFormatPr` struct definition;
- Partial logic performance optimization, use pointer reference instead of a pass the variable value; - Add comments for content types struct definition; - Update go test `TestSetBorder` section
Diffstat (limited to 'excelize_test.go')
-rw-r--r--excelize_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/excelize_test.go b/excelize_test.go
index 494156b..e4892e6 100644
--- a/excelize_test.go
+++ b/excelize_test.go
@@ -283,12 +283,15 @@ func TestSetBorder(t *testing.T) {
t.Log(err)
}
// Test set border with invalid style index number.
- err = xlsx.SetBorder("Sheet1", "J21", "L25", "")
+ err = xlsx.SetBorder("Sheet1", "J21", "L25", `{"border":[{"type":"left","color":"0000FF","style":-1},{"type":"top","color":"00FF00","style":14},{"type":"bottom","color":"FFFF00","style":5},{"type":"right","color":"FF0000","style":6},{"type":"diagonalDown","color":"A020F0","style":9},{"type":"diagonalUp","color":"A020F0","style":8}]}`)
+ if err != nil {
+ t.Log(err)
+ }
if err != nil {
t.Log(err)
}
// Test set border on overlapping area.
- err = xlsx.SetBorder("Sheet1", "J21", "L25", `{"border":[{"type":"left","color":"0000FF","style":-1},{"type":"top","color":"00FF00","style":14},{"type":"bottom","color":"FFFF00","style":5},{"type":"right","color":"FF0000","style":6},{"type":"diagonalDown","color":"A020F0","style":9},{"type":"diagonalUp","color":"A020F0","style":8}]}`)
+ err = xlsx.SetBorder("Sheet1", "J21", "L25", `{"border":[{"type":"left","color":"0000FF","style":2},{"type":"top","color":"00FF00","style":12},{"type":"bottom","color":"FFFF00","style":5},{"type":"right","color":"FF0000","style":6},{"type":"diagonalDown","color":"A020F0","style":9},{"type":"diagonalUp","color":"A020F0","style":8}]}`)
if err != nil {
t.Log(err)
}