diff options
author | xuri <xuri.me@gmail.com> | 2022-01-19 00:51:09 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-01-19 00:51:09 +0800 |
commit | 74f6ea94eae45c8fb89a23cc94802e57ce279a84 (patch) | |
tree | f27a05419c57c3ecb89b8fd84df1ed1e5121eb05 /col_test.go | |
parent | 4daa6ed0b46fdd994e46403feb049b162eca19b8 (diff) |
ref #1054, breaking change for the column and row's iterator
This removed 3 exported functions: `TotalCols`, `CurrentCol` and `CurrentRow`
Diffstat (limited to 'col_test.go')
-rw-r--r-- | col_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
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(`<worksheet><sheetData><row r="1"><c r="A" t="str"><v>A</v></c></row></sheetData></worksheet>`) _, 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) { |