From 1b83ede2883205cc1dd7fd866c6554076b3f06e7 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 10 Sep 2018 22:13:33 +0000 Subject: [PATCH] fpspreadsheet: Additional IF test. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6641 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../fpspreadsheet/tests/singleformulatests.pas | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/components/fpspreadsheet/tests/singleformulatests.pas b/components/fpspreadsheet/tests/singleformulatests.pas index b4969e455..d0bfab521 100644 --- a/components/fpspreadsheet/tests/singleformulatests.pas +++ b/components/fpspreadsheet/tests/singleformulatests.pas @@ -87,6 +87,8 @@ type procedure IfConst_OOXML; procedure IfConst_ODS; + procedure IfConst_BIFF8_2; + procedure CountIfRange_BIFF8; procedure CountIfRangeSheet_BIFF8; @@ -168,7 +170,7 @@ const SHEET1 = 'Sheet1'; SHEET2 = 'Sheet2'; SHEET3 = 'Sheet3'; - TESTCELL_ROW = 1; + TESTCELL_ROW = 1; // Cell with formula: C2 TESTCELL_COL = 2; var worksheet: TsWorksheet; @@ -521,17 +523,24 @@ end; procedure TSpreadSingleFormulaTests.IfConst_BIFF8; begin - TestFormula('IF(C3="A","is A","not A")', 'is A', ftkConstants, sfExcel8); + TestFormula('IF(C3="A","is A","not A")', 'not A', ftkConstants, sfExcel8); end; procedure TSpreadSingleFormulaTests.IfConst_OOXML; begin - TestFormula('IF(C3="A","is A","not A")', 'is A', ftkConstants, sfOOXML); + TestFormula('IF(C3="A","is A","not A")', 'not A', ftkConstants, sfOOXML); end; procedure TSpreadSingleFormulaTests.IfConst_ODS; begin - TestFormula('IF(C3="A","is A","not A")', 'is A', ftkConstants, sfOpenDocument); + TestFormula('IF(C3="A","is A","not A")', 'not A', ftkConstants, sfOpenDocument); +end; + +{ --- } + +procedure TSpreadSingleFormulaTests.IfConst_BIFF8_2; +begin + TestFormula('IF(C3=1,"equal","different")', 'equal', ftkConstants, sfExcel8); end; { --- }