From a7af7aea0910c109c5da51bc5dd92250dd47ed9a Mon Sep 17 00:00:00 2001 From: sveinungf Date: Sun, 11 Aug 2024 23:12:32 +0200 Subject: [PATCH] Fix test for double comparison by using precision --- SpreadCheetah.Test/Tests/SpreadsheetStyledRowTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpreadCheetah.Test/Tests/SpreadsheetStyledRowTests.cs b/SpreadCheetah.Test/Tests/SpreadsheetStyledRowTests.cs index 1406665e..a31d4a29 100644 --- a/SpreadCheetah.Test/Tests/SpreadsheetStyledRowTests.cs +++ b/SpreadCheetah.Test/Tests/SpreadsheetStyledRowTests.cs @@ -511,7 +511,7 @@ public async Task Spreadsheet_AddRow_DateTimeCell(bool withDefaultDateTimeFormat using var workbook = new XLWorkbook(stream); var worksheet = workbook.Worksheets.Single(); var actualCell = worksheet.Cell(1, 1); - Assert.Equal(value.ToOADate(), actualCell.Value.GetUnifiedNumber()); + Assert.Equal(value.ToOADate(), actualCell.Value.GetUnifiedNumber(), 0.0005); Assert.Equal(expectedNumberFormat, actualCell.Style.NumberFormat.Format); Assert.True(actualCell.Style.Font.Italic); }