From 1bc5302007e04b83ed542fee993e9a79aea9e370 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 20 Jan 2021 00:14:21 +0800 Subject: Fixed #764, add a condition for round precision --- cell_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cell_test.go') diff --git a/cell_test.go b/cell_test.go index 2122eca..93e9f4c 100644 --- a/cell_test.go +++ b/cell_test.go @@ -124,8 +124,9 @@ func TestSetCellValues(t *testing.T) { err = f.SetCellValue("Sheet1", "A1", time.Date(1600, time.December, 31, 0, 0, 0, 0, time.UTC)) assert.NoError(t, err) - _, err = f.GetCellValue("Sheet1", "A1") - assert.EqualError(t, err, `strconv.ParseFloat: parsing "1600-12-31T00:00:00Z": invalid syntax`) + v, err = f.GetCellValue("Sheet1", "A1") + assert.NoError(t, err) + assert.Equal(t, v, "1600-12-31T00:00:00Z") } func TestSetCellBool(t *testing.T) { -- cgit v1.2.1