From b43eece4680d149985382c8528119577ab3d7c2b Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 12 Jul 2016 16:29:37 +0200 Subject: redemption argument must be >0 now, tdf#100766 follow-up Since 0759f31172253d6c5be3b938446ff1b8313adebd we check that, so test for error here. Change-Id: I395360d96ece31d8fb6a969c75d06b5e441c3051 --- sc/qa/unit/data/functions/fods/oddlprice.fods | 402 ++++++++++++++------------ 1 file changed, 218 insertions(+), 184 deletions(-) diff --git a/sc/qa/unit/data/functions/fods/oddlprice.fods b/sc/qa/unit/data/functions/fods/oddlprice.fods index 0bfe0b7ccf1c..adcf40359688 100644 --- a/sc/qa/unit/data/functions/fods/oddlprice.fods +++ b/sc/qa/unit/data/functions/fods/oddlprice.fods @@ -1,13 +1,13 @@ - 2016-07-01T15:50:49.738980082P0D1LibreOffice/5.1.3.2$Linux_X86_64 LibreOffice_project/10m0$Build-2 + 2016-07-01T15:50:49.738980082P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64 LibreOffice_project/83d5a4a9c256eaef4c04f799db38b373d9cff4d5 0 0 25900 - 20909 + 20866 view1 @@ -28,10 +28,11 @@ 95 60 true + false - 5 - 19 + 2 + 22 0 0 0 @@ -45,10 +46,11 @@ 95 60 true + false Sheet2 - 1185 + 1224 0 95 60 @@ -69,6 +71,7 @@ 1 1 true + false @@ -93,7 +96,7 @@ false 12632256 false - Lexmark-E352dn + Generic Printer cs @@ -122,7 +125,7 @@ true 1 true - qQH+/0xleG1hcmstRTM1MmRuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ1VQUzpMZXhtYXJrLUUzNTJkbgAAAAAAAAAAAAAAAAAWAAMAzwAAAAAAAAAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY= + hAH+/0dlbmVyaWMgUHJpbnRlcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU0dFTlBSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAMAqgAAAAAAAAAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9R2VuZXJpYyBQcmludGVyCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCm1hcmdpbmRhanVzdG1lbnQ9MCwwLDAsMApjb2xvcmRlcHRoPTI0CnBzbGV2ZWw9MApwZGZkZXZpY2U9MApjb2xvcmRldmljZT0wClBQRENvbnRleERhdGEKUGFnZVNpemU6TGV0dGVyAAASAENPTVBBVF9EVVBMRVhfTU9ERQoARFVQTEVYX09GRg== false 0 @@ -929,74 +932,95 @@ + + + + + + + + + + + + + + - + - + + + + + + + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + @@ -1094,7 +1118,7 @@ ??? (???) - 00/00/0000, 00:00:00 + 00/00/0000, 00:00:00 @@ -1242,124 +1266,124 @@ Comment - - - - - - - - + + + + + + + + - 99.8782860147 + 99.8782860147214 - 99.8782860147 + 99.8782860147214 TRUE - + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,0) - - - - + + - - - - - - + + + + + + + + - 99.8797221611 + 99.879722161123 - 99.8797221611 + 99.879722161123 TRUE - + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,1) - - - - + + - - - - - - + + + + + + + + - 99.8778424027 + 99.877842402734 - 99.8778424027 + 99.877842402734 TRUE - + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,2) - - - + - - - - - + + + + + + + - 99.8797221611 + 99.879722161123 - 99.8797221611 + 99.879722161123 TRUE - + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,3) - + - - - - - - - + + + + + + + - 99.8782860147 + 99.8782860147214 - 99.8782860147 + 99.8782860147214 TRUE @@ -1368,16 +1392,16 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,4) - + - - - - + + + + - Chyba:502 + Err:502 error @@ -1389,21 +1413,21 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,-1) - + - + - + - - + + - 99.8782860147 + 99.8782860147214 - 99.8782860147 + 99.8782860147214 TRUE @@ -1412,18 +1436,18 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,1,4) - + - + - + - 99.8782860147 + 99.8782860147214 - 99.8782860147 + 99.8782860147214 TRUE @@ -1432,13 +1456,13 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,4,4) - - + + - Chyba:502 + Err:502 error @@ -1450,15 +1474,15 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,-1,4) - - - + + + - Chyba:502 + Err:502 error @@ -1470,15 +1494,15 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,5,4) - + - 99.8782860147 + 99.8782860147214 - 99.8782860147 + 99.8782860147214 TRUE @@ -1487,15 +1511,15 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,) - + - 99.8782860147 + 99.8782860147214 - 99.8782860147 + 99.8782860147214 TRUE @@ -1504,13 +1528,13 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2) - - + + - Chyba:502 + Err:502 error @@ -1522,12 +1546,12 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), -0.0375, 0.0405,100,2,0) - + - Chyba:502 + Err:502 error @@ -1538,16 +1562,16 @@ =ODDLPRICE(DATE(1999,6,15),DATE(1999,2,7),DATE(1998,10,15), 0.0375, 0.0405,100,2,0) - + The Maturity date should be greater than the Settlement date - + - Chyba:502 + Err:502 error @@ -1558,17 +1582,17 @@ =ODDLPRICE(DATE(1998,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,0) - + nd the Settlement should be greater than the last interest date. - - + + - Chyba:502 + Err:502 error @@ -1579,16 +1603,16 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,2,7),DATE(1998,10,15), 0.0375, 0.0405,100,2,0) - + The Maturity date should be greater than the Settlement date - + - Chyba:502 + Err:502 error @@ -1599,154 +1623,154 @@ =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1999,2,7), 0.0375, 0.0405,100,2,0) - + nd the Settlement should be greater than the last interest date. - + - - - 98.5804416404 + + + Err:502 - 98.5804416404 + 98.5804416403786 - + TRUE =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), , 0.0405,100,2,0) - Constraints: Rate, AnnualYield, and Redemption should be greater than 0. + Constraints: Rate, AnnualYield, and Redemption should be greater than 0. - + - - - 98.5804416404 + + + Err:502 - 98.5804416404 + 98.5804416403786 - + TRUE =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0, 0.0405,100,2,0) - Constraints: Rate, AnnualYield, and Redemption should be greater than 0. + Constraints: Rate, AnnualYield, and Redemption should be greater than 0. - + - 101.3333333333 + 101.333333333333 - 101.3333333333 + 101.333333333333 - + TRUE =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0,100,2,0) - Constraints: Rate, AnnualYield, and Redemption should be greater than 0. + Constraints: Rate, AnnualYield, and Redemption should be greater than 0. - + - 101.3333333333 + 101.333333333333 - 101.3333333333 + 101.333333333333 - + TRUE =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, ,100,2,0) - Constraints: Rate, AnnualYield, and Redemption should be greater than 0. + Constraints: Rate, AnnualYield, and Redemption should be greater than 0. - + - + - - 1.2978443743 + + Err:502 error - + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,0,2,0) - Tdf#100766 Constraints: Rate, AnnualYield, and Redemption should be greater than 0. + Tdf#100766 Constraints: Rate, AnnualYield, and Redemption should be greater than 0. - + - - 1.2978443743 + + Err:502 error - + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,,2,0) - Tdf# 100766 Constraints: Rate, AnnualYield, and Redemption should be greater than 0. + Tdf# 100766 Constraints: Rate, AnnualYield, and Redemption should be greater than 0. - + - + ODDLPRICESummary: Compute the value of a security per 100 currency units of face value. The security has an irregular last interest date.Syntax: ODDLPRICE( DateParam Settlement ; DateParam Maturity ; DateParam Last ; Number Rate ; Number AnnualYield ; Number Redemption ; Number Frequency [ ; Basis Basis = 0 ] )Returns: NumberConstraints: Rate, AnnualYield, and Redemption should be greater than 0. The Maturity date should be greater than the Settlement date, and the Settlement should be greater than the last interest date.Semantics: The parameters areSettlement: the settlement/purchase date of the securityMaturity: the maturity/expire date of the securityLast: the last interest date of the securityRate: the interest rate of the securityAnnualYield: the annual yield of the securityRedemption: the redemption value per 100 currency units face valueFrequency: the number of interest payments per year. 1=annual; 2=semiannual; 4=quarterlyBasis: indicates the day-count convention to use in the calculation. - + - + - + - - + + - + @@ -1755,39 +1779,39 @@ - + - + - + - + - + - + - + @@ -1835,20 +1859,30 @@ - - - - + + + + + + + + + + + + + + - + -- cgit