Additional unit tests

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@91576 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-06-10 22:08:42 +00:00
parent e7271ebe89
commit 64fe139503
21 changed files with 221 additions and 95 deletions

View File

@ -0,0 +1,10 @@
#Settlement Maturity Rate Yield Redemption Frequency Basis Result
"15-Feb-2008", "15-Nov-2017", 0.0575, 0.065, 100, 2, 0, 94.6343616213221
"15-Feb-2008", "15-Nov-2017", 0.0575, 0.065, 100, 2, 1, 94.6354492078772
"15-Feb-2008", "15-Nov-2017", 0.0575, 0.065, 100, 2, 2, 94.6365640300251
"15-Feb-2008", "15-Nov-2017", 0.0575, 0.065, 100, 2, 3, 94.6351747967845
"01-Apr-2012", "31-Mar-2020", 0.12, 0.10, 100, 2, NULL, 110.8344835932160
"01-Apr-2012", "31-Mar-2020", 0.12, 0.10, 100, 2, 1, 110.8345373958590
"01-Apr-2012", "31-Mar-2020", 0.12, 0.10, 100, 2, 2, 110.8344835932160
"01-Apr-2012", "31-Mar-2020", 0.12, 0.10, 100, 2, 3, 110.8345285514390
"01-Apr-2012", "31-Mar-2020", 0.12, 0.10, 100, 4, 3, 110.9217329631980

View File

@ -1,8 +1,11 @@
#Periods Payment Present Value Future Value Type Guess Result #Periods Payment Present Value Future Value Type Guess Result
48, -200, 8000, 0.007701472488201 48, -200, 8000, 0.0077014724882014
60, -6000, 120000, 0.046781916422493 60, -6000, 120000, 0.0467819164224934
60, -1000, 120000, -0.020442952219357 60, -1000, 120000, -0.0204429522193565
24, -250, 5000, 0.0151308439023434 24, -250, 5000, 0.0151308439023434
24, -250, 5000, NULL, 1, 0.0165501190667120 24, -250, 5000, NULL, 1, 0.0165501190667120
208, -700, 8000, 0.0874999976840937 208, -700, 8000, 0.0874999976840937
10, -1000, 6500, 0.0871137556058636 10, -1000, 6500, 0.0871137556058636
6, -1000, 100000, -126068, 0.0484721272835728
6, 1000, 100000, -126068, 0.0302728738275435
6, -1000, -100000, 126068, 0, 0.0302728738275437

View File

@ -1,3 +1,4 @@
#x_num y_num Result
0, 0, "#DIV/0!" 0, 0, "#DIV/0!"
1, 1, 0.785398163397 1, 1, 0.785398163397
-1, -1, -2.356194490192 -1, -1, -2.356194490192
@ -5,3 +6,12 @@
1, -1, -0.785398163397 1, -1, -0.785398163397
0.5, 1, 1.107148717794 0.5, 1, 1.107148717794
-0.5, 2, 1.815774989922 -0.5, 2, 1.815774989922
1, 0.8, 0.674740942224
0.8, -0.6, -0.643501108793
1, -9, -1.460139105621
0.2, 0, 0.0
0.1, 0.2, 1.107148717794
0, 0.2, 1.570796326795
"A", 0.2, "#VALUE!"
TRUE, 1, 0.785398163397
FALSE, -2.5, -1.570796326795

View File

@ -1,10 +1,21 @@
#number significance result
2.5, 1, 3.0
-2.5, -2, -4.0
1.5, 0.1, 1.5
0.234, 0.01, 0.24
-2.341, -0.1, -2.4 -2.341, -0.1, -2.4
8, 0, 0 8, 0, 0.0
8, 1.5, 9 8, 1.5, 9.0
8, -1.5, "#NUM!" 8, -1.5, "#NUM!"
-8, 1.5, "#NUM!" -8, 1.5, "#NUM!"
-8, -1.5, -9 -8, -1.5, -9.0
8.26, 0.05, 8.3 8.26, 0.05, 8.3
2.341, 0.05, 2.35 2.341, 0.05, 2.35
123.456, "#VALUE!" 123.456, "#VALUE!"
"PHPExcel", "#VALUE!" "PHPExcel", "#VALUE!"
210.67, 1, 211.0
210.67, 0.05, 210.70
210.63, 0.05, 210.65
2.98, 2, 4.0
-2.98, 2, "#NUM!"
-4.5, -1, -5.0

View File

@ -1,13 +1,25 @@
#NumObjs NumInSet Result
7, 3, 35 7, 3, 35
8, 2, 28 8, 2, 28
8, 3, 56 8, 3, 56
8, 4, 70 8, 4, 70
100, 3, 161700 100, 3, 161700
-7, -10, "#NUM!" -7, -10, "#NUM!"
-7, 10, "#NUM!"
7, -10, "#NUM!"
2, 3, "#NUM!" 2, 3, "#NUM!"
2, 2, 1 2, 2, 1
2, 1, 2 2, 1, 2
2, 0, 1 2, 0, 1
7, -3, "#NUM!"
2.5, 2, 1 2.5, 2, 1
"ABCD", "EFGH", "#VALUE!" "ABCD", "EFGH", "#VALUE!"
10, 5, 252
10, 3, 120
21, 5, 20349
6, 1, 6
6, 2, 15
6, 3, 20
6, 4, 15
6, 5, 6
6, 6, 1
6, 7, "#NUM!"

View File

@ -11,3 +11,7 @@
TRUE, 2 TRUE, 2
FALSE, 0 FALSE, 0
0, 0 0, 0
210.61, 212
2.98, 4
-2.98, -4
6, 6

View File

@ -1,7 +1,10 @@
5, 120 5, 120
1.9, 1 1.9, 1
0, 1 0, 1
-1, "#NUM!" -4, "#NUM!"
1, 1 1, 1
3, 6 3, 6
6, 720
10, 3628800
3.2, 6
"ABC", "#VALUE!" "ABC", "#VALUE!"

View File

@ -2,5 +2,7 @@
6, 48 6, 48
7, 105 7, 105
5, 15 5, 15
8, 384
13, 135135
-1, "#NUM!" -1, "#NUM!"
"ABC", "#VALUE!" "ABC", "#VALUE!"

View File

@ -7,3 +7,5 @@
0.234, 0.01, 0.23 0.234, 0.01, 0.23
123.456, "#VALUE!" 123.456, "#VALUE!"
"ABC", "#VALUE!" "ABC", "#VALUE!"
17, 3, 15
19, 4, 16

View File

@ -1,3 +1,7 @@
5, 2, 1
24, 36, 12
7, 1, 1
5, 0, 5
30, 15, 10, 5 30, 15, 10, 5
42, 56, 140, 14 42, 56, 140, 14
24, 28, 40, 4 24, 28, 40, 4
@ -10,3 +14,7 @@
3, 6, "12", 3 3, 6, "12", 3
3, 6, "ABC", "#VALUE!" 3, 6, "ABC", "#VALUE!"
3, 3 3, 3
15, 10, 25, 5
0, 8, 12, 4
7, 2, 1
0, 0, 0

View File

@ -15,3 +15,5 @@ TRUE, 1
FALSE, 0 FALSE, 0
0, 0 0, 0
"-3.5", -4 "-3.5", -4
8.9, 8
-8.9, -9

View File

@ -6,3 +6,7 @@
6, "ABC", "#VALUE!" 6, "ABC", "#VALUE!"
24, -12, "#NUM!" 24, -12, "#NUM!"
3, 0, 0 3, 0, 0
1, 5, 5
15, 10, 25, 150
1, 8, 12, 24
7, 2, 14

View File

@ -1,3 +1,4 @@
#number base result
"ABC", "#VALUE!" "ABC", "#VALUE!"
"123ABC", "#VALUE!" "123ABC", "#VALUE!"
1.2345, 0.0914910942679511 1.2345, 0.0914910942679511
@ -55,3 +56,15 @@
3, 4.5, 0.7304227103091850 3, 4.5, 0.7304227103091850
3.75, 4.5, 0.8787817986064220 3.75, 4.5, 0.8787817986064220
4.5, 4.5, 1.0 4.5, 4.5, 1.0
64, 2, 6
100, 2
4, 0.5, -2
500, 2.698970004336
10, 1
8, 2, 3
86, 2.7182818, 4.454347342888
20, 1.301029995664
20, 10, 1.301029995664
20, 25, 0.930676558073
25, 5.1, 1.975690971574
200, 3, 4.822736302150

View File

@ -1,3 +1,14 @@
{1|2|3;4|5|6;7|8|9}, 6.661338147750940E-16 {1|2|3;4|5|6;7|8|9}, 6.661338147750940E-16
{10|20|30;40|50|60;70|80|90}, -4.263256414560600E-12 {1.1|2.2|3.3;4.4|5.5|6.6;7.7|8.8|9.9}, 1.61204383175573E-15
{10|20|30;40|50|60;70|80|90}, -4.26325641456060E-12
{8|1|6;3|5|7;4|9|2}, -3.6E+02 {8|1|6;3|5|7;4|9|2}, -3.6E+02
{5|2;7|1}, -9
{6|4|2;3|5|3;2|3|4}, 40
{0.2|1;0.35|10.8}, 1.81
{0.2|1|-0.9;0.35|10.8|4;-3.15|5|}, "#VALUE!"
{1|2;3|4}, -2
{1|2|1;3|4|2;1|1|2}, -3
{1|3|8|5;1|3|6|1;1|1|1|0;7|3|10|2}, 88
{3|6|1;1|1|0;3|10|2}, 1
{3|6;1|1}, -3
{1|3|8|5;1|3|6|1}, "#VALUE!"

View File

@ -1,3 +1,10 @@
{1|2|3;4|5|6;7|8|9}, {-4.50359962737050E+15|9.00719925474099E+15|-4.50359962737050E+15;9.00719925474100E+15|-1.80143985094820E+16|9.00719925474099E+15;-4.50359962737050E+15|9.00719925474099E+15|-4.50359962737050E+15} {1|2|3;4|5|6;7|8|9}, {-4.50359962737050E+15|9.00719925474099E+15|-4.50359962737050E+15;9.00719925474100E+15|-1.80143985094820E+16|9.00719925474099E+15;-4.50359962737050E+15|9.00719925474099E+15|-4.50359962737050E+15}
{10|20|30;40|50|60;70|80|90}, {7.03687441776639E+13|-1.40737488355328E+14|7.03687441776640E+13;-1.40737488355328E+14|2.81474976710656E+14|-1.40737488355328E+14;7.03687441776641E+13|-1.40737488355328E+14|7.03687441776640E+13} {10|20|30;40|50|60;70|80|90}, {7.03687441776639E+13|-1.40737488355328E+14|7.03687441776640E+13;-1.40737488355328E+14|2.81474976710656E+14|-1.40737488355328E+14;7.03687441776641E+13|-1.40737488355328E+14|7.03687441776640E+13}
{8|1|6;3|5|7;4|9|2}, {1.47222222222222E-01|-1.44444444444444E-01|6.38888888888889E-02;-6.11111111111111E-02|2.22222222222222E-02|1.05555555555556E-01;-1.94444444444444E-02|1.88888888888889E-01|-1.02777777777778E-01} {8|1|6;3|5|7;4|9|2}, {1.47222222222222E-01|-1.44444444444444E-01|6.38888888888889E-02;-6.11111111111111E-02|2.22222222222222E-02|1.05555555555556E-01;-1.94444444444444E-02|1.88888888888889E-01|-1.02777777777778E-01}
{4|-1;2|0}, {0|0.5;-1|2}
{1|2|1;3|4|-1;0|2|0}, {0.25|0.25|-0.75;0|0|0.5;0.75|-0.25|-0.25}
{1|4|1|1;1|4|0|1;2|3|1|2;3|2|6|4}, {3.2|-4.8|2.8|-1;0.2|0.2|0.2|0;1|-1|0|0;-4|5|-2|1}
{0.2|1;0.35|10.8}, {5.96685082872928|-0.55248618784530;-0.19337016574586|0.11049723756906}
{0.2|1|-0.9;0.35|10.8|4;-3.15|5}, "#VALUE!"
{1|2;3|4}, {-2|1;1.5|-0.5}
{1|2|1;3|4|2;1|1|2}, {-2|1|0;1.33333333333333|-0.33333333333333|-0.33333333333333;0.33333333333333|-0.33333333333333|0.66666666666667}

View File

@ -0,0 +1,2 @@
2, 3, 4, 1260
3, 1, 2, 5, 27720

View File

@ -0,0 +1,7 @@
5, 15, 30, 2250
5, 15, 30, 2, 4500
3, 6, 2, 8, 5, 1440
3, 4, 12
3, 4, 4.5, 54
3, 4, 4.5, -6.78, -366.12
3, 4, 4.5, -6.78, -2, 732.24

View File

@ -0,0 +1,6 @@
5, 2, 2
4.5, 3.1, 1
-10, 3, -3
10, 2.2, 4
5.5, 2.667, 2
-7, 2, -4

View File

@ -0,0 +1,2 @@
5, 1, 1, {1|1|1|1|1}, 3905
2, 1, 2, {1|2|3|4|5}, 3186

View File

@ -0,0 +1,7 @@
3, 4, 25
5, 2, 1, 3, 39
5, 2, 1, 6, 66
1, 3, 10
1, 3, 2, 4, 30
3, 5, 7, 83
1, 2, 3, 14

View File

@ -1,10 +1,10 @@
123.456, '"$#,##0.00"', '"$123.46"' 123.456, '"$#,##0.00"', "$123.46"
123.456, '"#,##0.00"', '"123.46"' 123.456, '"#,##0.00"', "123.46"
123.456, '"#,##0"', '"123"' 123.456, '"#,##0"', "123"
123.456, "00000", '"00123"' 123.456, "00000", "00123"
123456.789, '"$#,##0.00"', '"$123,456.79"' 123456.789, '"$#,##0.00"', '"$123,456.79"'
123456.789, '"#,##0.00"', '"123,456.79"' 123456.789, '"#,##0.00"', '"123,456.79"'
123456.789, "0.00E+00", '1.23E05' 123456.789, "0.00E+00", "1.23E05"
"19-Dec-1960", "yyyy-mm-dd", "1960-12-19" "19-Dec-1960", "yyyy-mm-dd", "1960-12-19"
"1-Jan-2012", "yyyy-mm-dd", "2012-01-01" "1-Jan-2012", "yyyy-mm-dd", "2012-01-01"
1.75, "# ?/?", "1 3/4" 1.75, "# ?/?", "1 3/4"