From 1c72b4fe1511455f956651153b907017721c1df1 Mon Sep 17 00:00:00 2001 From: Zdeněk Crhonek Date: Tue, 5 Jul 2016 06:08:47 +0200 Subject: add ODDLPRICE test case Change-Id: Id788779808e6c6a362d5e793ed9eb6a22be23ae7 Reviewed-on: https://gerrit.libreoffice.org/26924 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- sc/qa/unit/data/functions/fods/oddlprice.fods | 1871 +++++++++++++++++++++++++ 1 file changed, 1871 insertions(+) create mode 100644 sc/qa/unit/data/functions/fods/oddlprice.fods (limited to 'sc') diff --git a/sc/qa/unit/data/functions/fods/oddlprice.fods b/sc/qa/unit/data/functions/fods/oddlprice.fods new file mode 100644 index 000000000000..0bfe0b7ccf1c --- /dev/null +++ b/sc/qa/unit/data/functions/fods/oddlprice.fods @@ -0,0 +1,1871 @@ + + + + 2016-07-01T15:50:49.738980082P0D1LibreOffice/5.1.3.2$Linux_X86_64 LibreOffice_project/10m0$Build-2 + + + 0 + 0 + 25900 + 20909 + + + view1 + + + 2 + 8 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 0 + 95 + 60 + true + + + 5 + 19 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 6 + 0 + 95 + 60 + true + + + Sheet2 + 1185 + 0 + 95 + 60 + false + true + true + true + 12632256 + true + true + true + true + false + false + false + 1270 + 1270 + 1 + 1 + true + + + + + 7 + false + false + true + true + false + false + false + 1270 + 1270 + true + true + true + true + true + true + true + false + 12632256 + false + Lexmark-E352dn + + + cs + CZ + + + + + + en + US + + + + + + nl + NL + + + + + + 3 + 1 + true + 1 + true + qQH+/0xleG1hcmstRTM1MmRuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ1VQUzpMZXhtYXJrLUUzNTJkbgAAAAAAAAAAAAAAAAAWAAMAzwAAAAAAAAAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY= + false + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + ( + + ) + + + + - + + + + + + + + + + + + £ + + + + - + £ + + + + + £ + + + + - + £ + + + + + £ + + + + + - + £ + + + + + £ + + + + + - + £ + + + + + £ + + + + + - + £ + + + + + + + + + ( + + ) + + + + + + + + ( + + ) + + + + £ + + + + + - + £ + + + + + + £ + + + + + - + £ + + + + + + + + + + + - + + + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + / + + / + + + + + + + / + + / + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + - + + + + + + + + + - + + + + + + + + - + + + + + + + + + - + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + - + + + + + + + - Kč + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + : + + + + + : + + : + + + + + : + + + + + + + Yes + + + Yes + + + No + + + + + True + + + True + + + False + + + + + On + + + On + + + Off + + + + + ¥€ + + + + + + + + + ( + + + + + + ) + + + + + + + + + + - + + + + + + + $ + + + + + + ($ + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ??? + + + + Page 1 + + + + + + + ??? (???) + + + 00/00/0000, 00:00:00 + + + + + Page 1 / 99 + + + + + + + + + + + + + + + + + + + + + + + + + + + ODDLPRICE Function + + + + + + + + + Result + + + TRUE + + + + + + + + + Sheet + + + Result + + + Description + + + + + 1 + + + TRUE + + + Simple ODDLPRICE formulas with local references and values + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Function + + + Expected + + + Correct + + + FunctionString + + + Comment + + + + + + + + + + + + + + + 99.8782860147 + + + 99.8782860147 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,0) + + + + + + + + + + + + + + + + + 99.8797221611 + + + 99.8797221611 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,1) + + + + + + + + + + + + + + + + + 99.8778424027 + + + 99.8778424027 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,2) + + + + + + + + + + + + + + + + + 99.8797221611 + + + 99.8797221611 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,3) + + + + + + + + + + + + + + + 99.8782860147 + + + 99.8782860147 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,4) + + + + + + + + + + + + Chyba:502 + + + error + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,-1) + + + + + + + + + + + + + + 99.8782860147 + + + 99.8782860147 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,1,4) + + + + + + + + + + + 99.8782860147 + + + 99.8782860147 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,4,4) + + + + + + + + + Chyba:502 + + + error + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,-1,4) + + + + + + + + + + + Chyba:502 + + + error + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,5,4) + + + + + + + + 99.8782860147 + + + 99.8782860147 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2,) + + + + + + + + 99.8782860147 + + + 99.8782860147 + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), 0.0375, 0.0405,100,2) + + + + + + + + + Chyba:502 + + + error + + + TRUE + + + =ODDLPRICE(DATE(1999,2,7),DATE(1999,6,15),DATE(1998,10,15), -0.0375, 0.0405,100,2,0) + + + + + + + + Chyba:502 + + + error + + + TRUE + + + =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 + + + error + + + TRUE + + + =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 + + + error + + + TRUE + + + =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 + + + error + + + TRUE + + + =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 + + + 98.5804416404 + + + 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. + + + + + + + + 98.5804416404 + + + 98.5804416404 + + + 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. + + + + + + + + 101.3333333333 + + + 101.3333333333 + + + 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. + + + + + + + + 101.3333333333 + + + 101.3333333333 + + + 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. + + + + + + + + + + + + + + + 1.2978443743 + + + 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. + + + + + + + + 1.2978443743 + + + 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. + + + + + + + + + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + + \ No newline at end of file -- cgit