Unit tests
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@88997 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
c284eef55e
commit
e4a859c5e3
|
@ -9,3 +9,4 @@
|
|||
-3600, 0
|
||||
7200, 3
|
||||
65535, 19
|
||||
"1 O'Clock", "#VALUE!"
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
-3600, 0
|
||||
12500, 28
|
||||
65535, 12
|
||||
"Half past 1 O'Clock", "#VALUE!"
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
-3601, 59
|
||||
12500, 20
|
||||
65535, 15
|
||||
"Half past 1 O'Clock", "#VALUE!"
|
||||
|
|
|
@ -10,3 +10,4 @@
|
|||
"19-Dec-2008", 10, "25-Dec-2008", "26-Dec-2008", "01-Jan-2009", 39820
|
||||
"19-Dec-2008", 10, {"25-Dec-2008"|"26-Dec-2008"|"01-Jan-2009"}, 39820
|
||||
39820, -10, {"25-Dec-2008"|"26-Dec-2008"|"01-Jan-2009"}, 39801
|
||||
"5-Apr-2012", 3, {"6-Apr-2012"|"9-Apr-2012"}, 41010
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#Issue date 1st Interest Settlement Rate Par Freq Basis Result
|
||||
"2008-03-01", "2008-08-31", "2008-05-01", 0.10, 1000, 2, 0, 16.666666666667
|
||||
"2008-03-05", "2008-08-31", "2008-05-01", 0.10, 1000, 2, 0, 15.555555555556
|
||||
"2010-01-01", "2010-06-30", "2010-04-01", 0.08, 10000, 4, 202.222222222222
|
||||
"2008-03-05", "2008-08-31", "2008-05-01", -0.10, 1000, 2, 0, "#NUM!"
|
||||
"Invalid Date", "2008-08-31", "2008-05-01", 0.10, 1000, 2, 0, "#VALUE!"
|
||||
"2008-03-01", "2008-08-31", "2008-05-01", "ABC", 1000, 2, 0, "#VALUE!"
|
||||
"2008-03-01", "2008-08-31", "2008-05-01", 0.10, 1000, 2, "ABC", "#VALUE!"
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
#Issue date Settlement Rate Par Basis Result
|
||||
"2008-04-01", "2008-06-15", 0.10, 1000, 3, 20.54795
|
||||
"2008-04-01", "2008-06-15", 0.10, 1000, 3, 20.547945205479
|
||||
"2010-01-01", "2010-12-31", 0.08, 10000, 800
|
||||
"2008-03-05", "2008-08-31", -0.10, 1000, 2, "#NUM!"
|
||||
"Invalid Date", "2008-08-31", 0.10, 1000, 2, "#VALUE!"
|
||||
"2008-03-01", "2008-08-31", "ABC", 1000, 2, "#VALUE!"
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#Cost Date purchased End of the 1st period Salvage Period Depreciation Basis Result
|
||||
2400, "2008-08-19", "2008-12-31", 300, 1, 0.15, 1, 776
|
||||
150, "2011-01-01", "2011-09-30", 20, 1, 0.2, 4, 42
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#Cost Date purchased End of the 1st period Salvage Period Depreciation Basis Result
|
||||
2400, "2008-08-19", "2008-12-31", 300, 1, 0.15, 1, 360
|
||||
150, "2011-01-01", "2011-09-30", 20, 1, 0.2, 4, 30
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#Settlement Maturity Frequency Basis Result
|
||||
"25-Jan-2007", "15-Nov-2008", 2, 1, 71
|
||||
"2011-01-01", "2012-10-25", 4, 66
|
||||
"Invalid Date", "15-Nov-2008", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "Invalid Date", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "15-Nov-2008", 3, 1, "#NUM!"
|
|
@ -0,0 +1,6 @@
|
|||
#Settlement Maturity Frequency Basis Result
|
||||
"25-Jan-2007", "15-Nov-2008", 2, 1, 181
|
||||
"2011-01-01", "2012-10-25", 4, 90
|
||||
"Invalid Date", "15-Nov-2008", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "Invalid Date", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "15-Nov-2008", 3, 1, "#NUM!"
|
|
@ -0,0 +1,6 @@
|
|||
#Settlement Maturity Frequency Basis Result
|
||||
"25-Jan-2007", "15-Nov-2008", 2, 1, 110
|
||||
"2011-01-01", "2012-10-25", 4, 24
|
||||
"Invalid Date", "15-Nov-2008", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "Invalid Date", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "15-Nov-2008", 3, 1, "#NUM!"
|
|
@ -0,0 +1,6 @@
|
|||
#Settlement Maturity Frequency Basis Result
|
||||
"25-Jan-2007", "15-Nov-2008", 2, 1, 39217
|
||||
"2011-01-01", "2012-10-25", 4, 40568
|
||||
"Invalid Date", "15-Nov-2008", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "Invalid Date", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "15-Nov-2008", 3, 1, "#NUM!"
|
|
@ -0,0 +1,7 @@
|
|||
#Settlement Maturity Frequency Basis Result
|
||||
"25-Jan-2007", "15-Nov-2008", 2, 1, 4
|
||||
"2011-01-01", "2012-10-25", 4, 0, 8
|
||||
"Invalid Date", "15-Nov-2008", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "Invalid Date", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "15-Nov-2008", 3, 1, "#NUM!"
|
||||
"01-Jan-2008", "31-Dec-2012", 1, 1, 5
|
|
@ -0,0 +1,6 @@
|
|||
#Settlement Maturity Frequency Basis Result
|
||||
"25-Jan-2007", "15-Nov-2008", 2, 1, 39036
|
||||
"2011-01-01", "2012-10-25", 4, 40476
|
||||
"Invalid Date", "15-Nov-2008", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "Invalid Date", 2, 1, "#VALUE!"
|
||||
"25-Jan-2007", "15-Nov-2008", 3, 1, "#NUM!"
|
|
@ -0,0 +1,10 @@
|
|||
#rate nper pv start_period end_period type result
|
||||
0.0075, 360, 125000, 13, 24, 0, -11135.232130751
|
||||
0.0075, 360, 125000, 1, 1, 0, -937.50
|
||||
0.004166666667, 60, 50000, 1, 12, 0, -2294.9775375121
|
||||
0.004166666667, 60, 50000, 13, 24, 0, -1833.1000667254
|
||||
0.004166666667, 60, 50000, 25, 36, 0, -1347.5920679425
|
||||
0.004166666667, 60, 50000, 37, 48, 0, -837.24455850309
|
||||
0.004166666667, 60, 50000, 49, 60, 0, -300.78670189939
|
||||
0.0075, 360, 125000, 24, 13, 0, "#VALUE!"
|
||||
0.0075, 360, 125000, 24, 13, 2, "#NUM!"
|
|
@ -0,0 +1,10 @@
|
|||
#rate nper pv start_period end_period type result
|
||||
0.0075, 360, 125000, 13, 24, 0, -934.10712342088
|
||||
0.0075, 360, 125000, 1, 1, 0, -68.278271180977
|
||||
0.004166666667, 60, 50000, 1, 12, 0, -9027.7626490046
|
||||
0.004166666667, 60, 50000, 13, 24, 0, -9489.6401197913
|
||||
0.004166666667, 60, 50000, 25, 36, 0, -9975.1481185741
|
||||
0.004166666667, 60, 50000, 37, 48, 0, -10485.495628014
|
||||
0.004166666667, 60, 50000, 49, 60, 0, -11021.953484617
|
||||
0.0075, 360, 125000, 24, 13, 0, "#VALUE!"
|
||||
0.0075, 360, 125000, 24, 13, 2, "#NUM!"
|
|
@ -0,0 +1,17 @@
|
|||
#cost salvage life period month result
|
||||
1000000, 100000, 6, 1, 7, 186083.33333333
|
||||
1000000, 100000, 6, 2, 7, 259639.41666667
|
||||
1000000, 100000, 6, 3, 7, 176814.44275
|
||||
1000000, 100000, 6, 4, 7, 120410.63551275
|
||||
1000000, 100000, 6, 5, 7, 81999.642784183
|
||||
1000000, 100000, 6, 6, 7, 55841.756736028
|
||||
1000000, 100000, 6, 7, 7, 15845.098473848
|
||||
10000, 1000, 5, 1, 6, 1845.00
|
||||
10000, 1000, 5, 2, 6, 3009.195
|
||||
10000, 1000, 5, 3, 6, 1898.802045
|
||||
10000, 1000, 5, 4, 6, 1198.144090395
|
||||
10000, 1000, 5, 5, 6, 756.02892103925
|
||||
10000, 1000, 5, 6, 6, 238.52712458788
|
||||
0, 0, 5, 6, 6, 0.0
|
||||
-1000, 100, 5, 6, 6, "#NUM!"
|
||||
"ABC", 100, 5, 6, 6, "#VALUE!"
|
|
@ -0,0 +1,16 @@
|
|||
#cost salvage life period month result
|
||||
2400, 300, 36500, 1, 0.13150684931507
|
||||
2400, 300, 36500, 2, 0.13149964346031
|
||||
2400, 300, 36500, 7, 0.13146362010871
|
||||
2400, 300, 36500, 7, 14, 0.91843145432708
|
||||
2400, 300, 120, 1, 2, 40.00
|
||||
2400, 300, 10, 1, 2, 480.00
|
||||
2400, 300, 10, 2, 1.5, 306.00
|
||||
2400, 300, 10, 10, 22.12254720000030
|
||||
10000, 1000, 5, 1, 4000.00
|
||||
10000, 1000, 5, 2, 2400.00
|
||||
10000, 1000, 5, 3, 1440.00
|
||||
10000, 1000, 5, 4, 864.00
|
||||
10000, 1000, 5, 5, 296.00
|
||||
-2400, 300, 36500, 1, "#NUM!"
|
||||
"ABC", 300, 36500, 1, "#VALUE!"
|
|
@ -0,0 +1,6 @@
|
|||
#settlement maturity price redemption basis result
|
||||
"2007-01-25", "2007-06-15", 97.975, 100, 1, 0.052420213
|
||||
"2010-04-01", "2015-03-31", 95, 100, 0.01
|
||||
"2010-04-01", "2015-03-31", 0, 100, "#NUM!"
|
||||
"2010-04-01", "2015-03-31", "ABC", 100, "#VALUE!"
|
||||
"Invalid Date", "2007-06-15", 97.975, 100, 1, "#VALUE!"
|
|
@ -0,0 +1,10 @@
|
|||
#fractional_dollar fraction result
|
||||
1.02, 16, 1.125
|
||||
1.1, 32, 1.3125
|
||||
1.01, 16, 1.0625
|
||||
1.1, 16, 1.625
|
||||
1.03, 32, 1.09375
|
||||
1.3, 32, 1.9375
|
||||
1.12, 32, 1.375
|
||||
1.2345, 0, "#DIV/0!"
|
||||
1.2345, -2, "#NUM!"
|
|
@ -0,0 +1,10 @@
|
|||
#decimal_dollar fraction result
|
||||
1.125, 16, 1.02
|
||||
1.125, 32, 1.04
|
||||
1.0625, 16, 1.01
|
||||
1.625, 16, 1.1
|
||||
1.09375, 32, 1.03
|
||||
1.9375, 32, 1.3
|
||||
1.375, 32, 1.12
|
||||
1.2345, 0, "#DIV/0!"
|
||||
1.2345, -2, "#NUM!"
|
Loading…
Reference in New Issue