From 4daa6ed0b46fdd994e46403feb049b162eca19b8 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 17 Jan 2022 08:05:52 +0800 Subject: Breaking change: remove `TotalRows` of row iterator and performance optimization Reduce allocation memory 20%, and 80% GC times for the row's iterator --- cell_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cell_test.go') 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() -- cgit v1.2.1