summaryrefslogtreecommitdiff
path: root/cell_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-04-10 00:04:23 +0800
committerxuri <xuri.me@gmail.com>2020-04-10 00:08:17 +0800
commit10115b5d889bb229d8707803b9413b20fe798588 (patch)
tree5ab719ea216a95580556c957a1568eb93f0ef43f /cell_test.go
parente36650f4ffd3e305d2c3834620f97ec382cf6faf (diff)
- Resolve #611, fix failure BenchmarkSetCellValue
- Allow empty filter, data, and rows in the pivot table - Add more test case for pivot table
Diffstat (limited to 'cell_test.go')
-rw-r--r--cell_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cell_test.go b/cell_test.go
index f46b4b9..45e2f24 100644
--- a/cell_test.go
+++ b/cell_test.go
@@ -3,6 +3,7 @@ package excelize
import (
"fmt"
"path/filepath"
+ "strconv"
"testing"
"time"
@@ -122,9 +123,9 @@ func BenchmarkSetCellValue(b *testing.B) {
cols := []string{"A", "B", "C", "D", "E", "F"}
f := NewFile()
b.ResetTimer()
- for i := 0; i < b.N; i++ {
+ for i := 1; i <= b.N; i++ {
for j := 0; j < len(values); j++ {
- if err := f.SetCellValue("Sheet1", fmt.Sprint(cols[j], i), values[j]); err != nil {
+ if err := f.SetCellValue("Sheet1", cols[j]+strconv.Itoa(i), values[j]); err != nil {
b.Error(err)
}
}