summaryrefslogtreecommitdiff
path: root/cell_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-01-17 08:05:52 +0800
committerxuri <xuri.me@gmail.com>2022-01-17 08:05:52 +0800
commit4daa6ed0b46fdd994e46403feb049b162eca19b8 (patch)
treef45ce03f66771d952b99fdce8bab3a7b275c541f /cell_test.go
parent50c4dedf8ddb4a7a696a668946bb536c2e8e5623 (diff)
Breaking change: remove `TotalRows` of row iterator and performance optimization
Reduce allocation memory 20%, and 80% GC times for the row's iterator
Diffstat (limited to 'cell_test.go')
-rw-r--r--cell_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cell_test.go b/cell_test.go
index 21e5a44..b3bb997 100644
--- a/cell_test.go
+++ b/cell_test.go
@@ -340,6 +340,14 @@ func TestGetCellType(t *testing.T) {
assert.EqualError(t, err, newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
}
+func TestGetValueFrom(t *testing.T) {
+ f := NewFile()
+ c := xlsxC{T: "s"}
+ value, err := c.getValueFrom(f, f.sharedStringsReader(), false)
+ assert.NoError(t, err)
+ assert.Equal(t, "", value)
+}
+
func TestGetCellFormula(t *testing.T) {
// Test get cell formula on not exist worksheet.
f := NewFile()