Files
Adrien Crivelli ec4098c8fd Strict mode for all tests
While we might never be able to have 100% of our code strict, we can at
the very least do it for all of our tests. This ensures that our tests
are using our API with the types as intended by the test author, and not
silently be cast to what our API requires.
2023-09-07 17:44:56 +08:00

228 lines
3.4 KiB
PHP

<?php
declare(strict_types=1);
// Result, Settlement, Maturity, Rate, Yield, Redemption, Frequency, Basis
return [
[
'#VALUE!',
'xyz',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'xyz',
0.0575,
0.065,
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
'xyz',
0.065,
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
'xyz',
100,
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
'xyz',
2,
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
'xyz',
0,
],
[
'#VALUE!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
'xyz',
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
-1, // invalid basis
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
5, // invalid basis
],
[
'#NUM!',
'15-Nov-2017', // maturity before settlement
'15-Feb-2008',
0.0575,
0.065,
100,
2,
0,
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
5, // invalid frequency
0,
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
6, // had been coded as valid for gnumeric, but it isn't
0,
],
[
'#NUM!',
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
12, // had been coded as valid for gnumeric, but it isn't
0,
],
[
94.6343616213221,
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
0,
],
[
94.635449207877201,
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
2,
1,
],
[
94.67215001,
'15-Feb-2008',
'15-Nov-2017',
0.0575,
0.065,
100,
1,
0,
],
[
110.83448359321601,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
2,
],
[
110.834537395859,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
2,
1,
],
[
110.9216934,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
0,
],
[
110.9216934,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
null,
],
[
110.9217251,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
1,
],
[
110.9216934,
'01-Apr-2012',
'31-Mar-2020',
0.12,
0.10,
100,
4,
4,
],
];