mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 13:26:07 +03:00
Additional unit tests
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@91576 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
e7271ebe89
commit
64fe139503
10
unitTests/rawTestData/Calculation/Financial/PRICE.data
Normal file
10
unitTests/rawTestData/Calculation/Financial/PRICE.data
Normal 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
|
@ -1,8 +1,11 @@
|
||||
#Periods Payment Present Value Future Value Type Guess Result
|
||||
48, -200, 8000, 0.007701472488201
|
||||
60, -6000, 120000, 0.046781916422493
|
||||
60, -1000, 120000, -0.020442952219357
|
||||
48, -200, 8000, 0.0077014724882014
|
||||
60, -6000, 120000, 0.0467819164224934
|
||||
60, -1000, 120000, -0.0204429522193565
|
||||
24, -250, 5000, 0.0151308439023434
|
||||
24, -250, 5000, NULL, 1, 0.0165501190667120
|
||||
208, -700, 8000, 0.0874999976840937
|
||||
10, -1000, 6500, 0.0871137556058636
|
||||
6, -1000, 100000, -126068, 0.0484721272835728
|
||||
6, 1000, 100000, -126068, 0.0302728738275435
|
||||
6, -1000, -100000, 126068, 0, 0.0302728738275437
|
||||
|
@ -1,3 +1,4 @@
|
||||
#x_num y_num Result
|
||||
0, 0, "#DIV/0!"
|
||||
1, 1, 0.785398163397
|
||||
-1, -1, -2.356194490192
|
||||
@ -5,3 +6,12 @@
|
||||
1, -1, -0.785398163397
|
||||
0.5, 1, 1.107148717794
|
||||
-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
|
||||
|
@ -1,10 +1,21 @@
|
||||
-2.341, -0.1, -2.4
|
||||
8, 0, 0
|
||||
8, 1.5, 9
|
||||
8, -1.5, "#NUM!"
|
||||
-8, 1.5, "#NUM!"
|
||||
-8, -1.5, -9
|
||||
8.26, 0.05, 8.3
|
||||
2.341, 0.05, 2.35
|
||||
123.456, "#VALUE!"
|
||||
"PHPExcel", "#VALUE!"
|
||||
#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
|
||||
8, 0, 0.0
|
||||
8, 1.5, 9.0
|
||||
8, -1.5, "#NUM!"
|
||||
-8, 1.5, "#NUM!"
|
||||
-8, -1.5, -9.0
|
||||
8.26, 0.05, 8.3
|
||||
2.341, 0.05, 2.35
|
||||
123.456, "#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
|
||||
|
@ -1,13 +1,25 @@
|
||||
7, 3, 35
|
||||
8, 2, 28
|
||||
8, 3, 56
|
||||
8, 4, 70
|
||||
100, 3, 161700
|
||||
-7, -10, "#NUM!"
|
||||
2, 3, "#NUM!"
|
||||
2, 2, 1
|
||||
2, 1, 2
|
||||
2, 0, 1
|
||||
7, -3, "#NUM!"
|
||||
2.5, 2, 1
|
||||
"ABCD", "EFGH", "#VALUE!"
|
||||
#NumObjs NumInSet Result
|
||||
7, 3, 35
|
||||
8, 2, 28
|
||||
8, 3, 56
|
||||
8, 4, 70
|
||||
100, 3, 161700
|
||||
-7, -10, "#NUM!"
|
||||
-7, 10, "#NUM!"
|
||||
7, -10, "#NUM!"
|
||||
2, 3, "#NUM!"
|
||||
2, 2, 1
|
||||
2, 1, 2
|
||||
2, 0, 1
|
||||
2.5, 2, 1
|
||||
"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!"
|
||||
|
@ -11,3 +11,7 @@
|
||||
TRUE, 2
|
||||
FALSE, 0
|
||||
0, 0
|
||||
210.61, 212
|
||||
2.98, 4
|
||||
-2.98, -4
|
||||
6, 6
|
||||
|
@ -1,7 +1,10 @@
|
||||
5, 120
|
||||
1.9, 1
|
||||
0, 1
|
||||
-1, "#NUM!"
|
||||
-4, "#NUM!"
|
||||
1, 1
|
||||
3, 6
|
||||
6, 720
|
||||
10, 3628800
|
||||
3.2, 6
|
||||
"ABC", "#VALUE!"
|
||||
|
@ -2,5 +2,7 @@
|
||||
6, 48
|
||||
7, 105
|
||||
5, 15
|
||||
8, 384
|
||||
13, 135135
|
||||
-1, "#NUM!"
|
||||
"ABC", "#VALUE!"
|
||||
|
@ -7,3 +7,5 @@
|
||||
0.234, 0.01, 0.23
|
||||
123.456, "#VALUE!"
|
||||
"ABC", "#VALUE!"
|
||||
17, 3, 15
|
||||
19, 4, 16
|
||||
|
@ -1,3 +1,7 @@
|
||||
5, 2, 1
|
||||
24, 36, 12
|
||||
7, 1, 1
|
||||
5, 0, 5
|
||||
30, 15, 10, 5
|
||||
42, 56, 140, 14
|
||||
24, 28, 40, 4
|
||||
@ -10,3 +14,7 @@
|
||||
3, 6, "12", 3
|
||||
3, 6, "ABC", "#VALUE!"
|
||||
3, 3
|
||||
15, 10, 25, 5
|
||||
0, 8, 12, 4
|
||||
7, 2, 1
|
||||
0, 0, 0
|
||||
|
@ -15,3 +15,5 @@ TRUE, 1
|
||||
FALSE, 0
|
||||
0, 0
|
||||
"-3.5", -4
|
||||
8.9, 8
|
||||
-8.9, -9
|
||||
|
@ -6,3 +6,7 @@
|
||||
6, "ABC", "#VALUE!"
|
||||
24, -12, "#NUM!"
|
||||
3, 0, 0
|
||||
1, 5, 5
|
||||
15, 10, 25, 150
|
||||
1, 8, 12, 24
|
||||
7, 2, 14
|
||||
|
@ -1,57 +1,70 @@
|
||||
"ABC", "#VALUE!"
|
||||
"123ABC", "#VALUE!"
|
||||
1.2345, 0.0914910942679511
|
||||
-1.5, -0.75, "#NUM!"
|
||||
0, -0.75, "#NUM!"
|
||||
3.75, -0.75, "#NUM!"
|
||||
-1.5, 0, "#NUM!"
|
||||
0, 0, "#NUM!"
|
||||
3.75, 0, "#NUM!"
|
||||
-0.75, 0.75, "#NUM!"
|
||||
0, 0.75, "#NUM!"
|
||||
0.75, 0.75, 1.0
|
||||
1.5, 0.75, -1.4094208396532100
|
||||
2.25, 0.75, -2.8188416793064200
|
||||
3, 0.75, -3.8188416793064200
|
||||
3.75, 0.75, -4.5945019399978900
|
||||
4.5, 0.75, -5.2282625189596300
|
||||
-0.75, 1.5, "#NUM!"
|
||||
0, 1.5, "#NUM!"
|
||||
0.75, 1.5, -0.7095112913514550
|
||||
1.5, 1.5, 1.0
|
||||
2.25, 1.5, 2.0
|
||||
3, 1.5, 2.7095112913514500
|
||||
3.75, 1.5, 3.2598510045646600
|
||||
4.5, 1.5, 3.7095112913514500
|
||||
-0.75, 2.25, "#NUM!"
|
||||
0, 2.25, "#NUM!"
|
||||
0.75, 2.25, -0.3547556456757270
|
||||
1.5, 2.25, 0.5
|
||||
2.25, 2.25, 1.0
|
||||
3, 2.25, 1.3547556456757300
|
||||
3.75, 2.25, 1.6299255022823300
|
||||
4.5, 2.25, 1.8547556456757300
|
||||
-0.75, 3, "#NUM!"
|
||||
0, 3, "#NUM!"
|
||||
0.75, 3, -0.2618595071429150
|
||||
1.5, 3, 0.3690702464285430
|
||||
2.25, 3, 0.7381404928570850
|
||||
3, 3, 1.0
|
||||
3.75, 3, 1.2031140135750100
|
||||
4.5, 3, 1.3690702464285400
|
||||
-0.75, 3.75, "#NUM!"
|
||||
0, 3.75, "#NUM!"
|
||||
0.75, 3.75, -0.2176514479827300
|
||||
1.5, 3.75, 0.3067624865675560
|
||||
2.25, 3.75, 0.6135249731351110
|
||||
3, 3.75, 0.8311764211178410
|
||||
3.75, 3.75, 1.0
|
||||
4.5, 3.75, 1.1379389076854000
|
||||
-0.75, 4.5, "#NUM!"
|
||||
0, 4.5, "#NUM!"
|
||||
0.75, 4.5, -0.1912681309275550
|
||||
1.5, 4.5, 0.2695772896908150
|
||||
2.25, 4.5, 0.5391545793816300
|
||||
3, 4.5, 0.7304227103091850
|
||||
3.75, 4.5, 0.8787817986064220
|
||||
4.5, 4.5, 1.0
|
||||
#number base result
|
||||
"ABC", "#VALUE!"
|
||||
"123ABC", "#VALUE!"
|
||||
1.2345, 0.0914910942679511
|
||||
-1.5, -0.75, "#NUM!"
|
||||
0, -0.75, "#NUM!"
|
||||
3.75, -0.75, "#NUM!"
|
||||
-1.5, 0, "#NUM!"
|
||||
0, 0, "#NUM!"
|
||||
3.75, 0, "#NUM!"
|
||||
-0.75, 0.75, "#NUM!"
|
||||
0, 0.75, "#NUM!"
|
||||
0.75, 0.75, 1.0
|
||||
1.5, 0.75, -1.4094208396532100
|
||||
2.25, 0.75, -2.8188416793064200
|
||||
3, 0.75, -3.8188416793064200
|
||||
3.75, 0.75, -4.5945019399978900
|
||||
4.5, 0.75, -5.2282625189596300
|
||||
-0.75, 1.5, "#NUM!"
|
||||
0, 1.5, "#NUM!"
|
||||
0.75, 1.5, -0.7095112913514550
|
||||
1.5, 1.5, 1.0
|
||||
2.25, 1.5, 2.0
|
||||
3, 1.5, 2.7095112913514500
|
||||
3.75, 1.5, 3.2598510045646600
|
||||
4.5, 1.5, 3.7095112913514500
|
||||
-0.75, 2.25, "#NUM!"
|
||||
0, 2.25, "#NUM!"
|
||||
0.75, 2.25, -0.3547556456757270
|
||||
1.5, 2.25, 0.5
|
||||
2.25, 2.25, 1.0
|
||||
3, 2.25, 1.3547556456757300
|
||||
3.75, 2.25, 1.6299255022823300
|
||||
4.5, 2.25, 1.8547556456757300
|
||||
-0.75, 3, "#NUM!"
|
||||
0, 3, "#NUM!"
|
||||
0.75, 3, -0.2618595071429150
|
||||
1.5, 3, 0.3690702464285430
|
||||
2.25, 3, 0.7381404928570850
|
||||
3, 3, 1.0
|
||||
3.75, 3, 1.2031140135750100
|
||||
4.5, 3, 1.3690702464285400
|
||||
-0.75, 3.75, "#NUM!"
|
||||
0, 3.75, "#NUM!"
|
||||
0.75, 3.75, -0.2176514479827300
|
||||
1.5, 3.75, 0.3067624865675560
|
||||
2.25, 3.75, 0.6135249731351110
|
||||
3, 3.75, 0.8311764211178410
|
||||
3.75, 3.75, 1.0
|
||||
4.5, 3.75, 1.1379389076854000
|
||||
-0.75, 4.5, "#NUM!"
|
||||
0, 4.5, "#NUM!"
|
||||
0.75, 4.5, -0.1912681309275550
|
||||
1.5, 4.5, 0.2695772896908150
|
||||
2.25, 4.5, 0.5391545793816300
|
||||
3, 4.5, 0.7304227103091850
|
||||
3.75, 4.5, 0.8787817986064220
|
||||
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
|
||||
|
@ -1,3 +1,14 @@
|
||||
{1|2|3;4|5|6;7|8|9}, 6.661338147750940E-16
|
||||
{10|20|30;40|50|60;70|80|90}, -4.263256414560600E-12
|
||||
{8|1|6;3|5|7;4|9|2}, -3.6E+02
|
||||
{1|2|3;4|5|6;7|8|9}, 6.661338147750940E-16
|
||||
{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
|
||||
{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!"
|
||||
|
@ -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}
|
||||
{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}
|
||||
{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}
|
||||
{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}
|
||||
|
@ -0,0 +1,2 @@
|
||||
2, 3, 4, 1260
|
||||
3, 1, 2, 5, 27720
|
7
unitTests/rawTestData/Calculation/MathTrig/PRODUCT.data
Normal file
7
unitTests/rawTestData/Calculation/MathTrig/PRODUCT.data
Normal 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
|
6
unitTests/rawTestData/Calculation/MathTrig/QUOTIENT.data
Normal file
6
unitTests/rawTestData/Calculation/MathTrig/QUOTIENT.data
Normal 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
|
@ -0,0 +1,2 @@
|
||||
5, 1, 1, {1|1|1|1|1}, 3905
|
||||
2, 1, 2, {1|2|3|4|5}, 3186
|
7
unitTests/rawTestData/Calculation/MathTrig/SUMSQ.data
Normal file
7
unitTests/rawTestData/Calculation/MathTrig/SUMSQ.data
Normal 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
|
@ -1,10 +1,10 @@
|
||||
123.456, '"$#,##0.00"', '"$123.46"'
|
||||
123.456, '"#,##0.00"', '"123.46"'
|
||||
123.456, '"#,##0"', '"123"'
|
||||
123.456, "00000", '"00123"'
|
||||
123.456, '"$#,##0.00"', "$123.46"
|
||||
123.456, '"#,##0.00"', "123.46"
|
||||
123.456, '"#,##0"', "123"
|
||||
123.456, "00000", "00123"
|
||||
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"
|
||||
"1-Jan-2012", "yyyy-mm-dd", "2012-01-01"
|
||||
1.75, "# ?/?", "1 3/4"
|
||||
|
Loading…
Reference in New Issue
Block a user