From b84bd1abc06457f6383013b8a600fc8c95eed2ed Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 27 Jan 2021 13:51:47 +0800 Subject: new formula fn: IF, LEN; not equal operator support and faster numeric precision process --- rows_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'rows_test.go') diff --git a/rows_test.go b/rows_test.go index 02b00da..73931aa 100644 --- a/rows_test.go +++ b/rows_test.go @@ -835,9 +835,14 @@ func TestGetValueFromNumber(t *testing.T) { assert.Equal(t, "2.22", val) c = &xlsxC{T: "n", V: "2.220000ddsf0000000002-r"} - _, err = c.getValueFrom(f, d) - assert.NotNil(t, err) - assert.Equal(t, "strconv.ParseFloat: parsing \"2.220000ddsf0000000002-r\": invalid syntax", err.Error()) + val, err = c.getValueFrom(f, d) + assert.NoError(t, err) + assert.Equal(t, "2.220000ddsf0000000002-r", val) + + c = &xlsxC{T: "n", V: "2.2."} + val, err = c.getValueFrom(f, d) + assert.NoError(t, err) + assert.Equal(t, "2.2.", val) } func TestErrSheetNotExistError(t *testing.T) { -- cgit v1.2.1