summaryrefslogtreecommitdiff
path: root/rows_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-01-27 13:51:47 +0800
committerxuri <xuri.me@gmail.com>2021-01-27 13:51:47 +0800
commitb84bd1abc06457f6383013b8a600fc8c95eed2ed (patch)
treed45fdbb6092d634a5253fea1cf65da459c8fbcb6 /rows_test.go
parente568319bbca22011690a54c5f5741da2b50d0c7c (diff)
new formula fn: IF, LEN; not equal operator support and faster numeric precision process
Diffstat (limited to 'rows_test.go')
-rw-r--r--rows_test.go11
1 files changed, 8 insertions, 3 deletions
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) {