From 74f6ea94eae45c8fb89a23cc94802e57ce279a84 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 19 Jan 2022 00:51:09 +0800 Subject: ref #1054, breaking change for the column and row's iterator This removed 3 exported functions: `TotalCols`, `CurrentCol` and `CurrentRow` --- col_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'col_test.go') diff --git a/col_test.go b/col_test.go index 2dd27db..e325ed1 100644 --- a/col_test.go +++ b/col_test.go @@ -68,8 +68,6 @@ func TestColumnsIterator(t *testing.T) { for cols.Next() { colCount++ - assert.Equal(t, colCount, cols.CurrentCol()) - assert.Equal(t, expectedNumCol, cols.TotalCols()) require.True(t, colCount <= expectedNumCol, "colCount is greater than expected") } assert.Equal(t, expectedNumCol, colCount) @@ -85,8 +83,6 @@ func TestColumnsIterator(t *testing.T) { for cols.Next() { colCount++ - assert.Equal(t, colCount, cols.CurrentCol()) - assert.Equal(t, expectedNumCol, cols.TotalCols()) require.True(t, colCount <= 4, "colCount is greater than expected") } assert.Equal(t, expectedNumCol, colCount) @@ -131,6 +127,11 @@ func TestGetColsError(t *testing.T) { cols.sheetXML = []byte(`A`) _, err = cols.Rows() assert.EqualError(t, err, newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error()) + + f.Pkg.Store("xl/worksheets/sheet1.xml", nil) + f.Sheet.Store("xl/worksheets/sheet1.xml", nil) + _, err = f.Cols("Sheet1") + assert.NoError(t, err) } func TestColsRows(t *testing.T) { -- cgit v1.2.1