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

39 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
return [
['165', '357'],
['54D', '1357'],
['F6', '246'],
['3039', '12345'],
['75BCD15', '123456789'],
['0064', 100, 4],
['00064', 100, 5.75], // Leading places as a float
[ExcelError::NAN(), 100, -1], // Leading places negative
[ExcelError::VALUE(), 100, 'ABC'], // Leading places non-numeric
['7B', '123.45'],
['0', '0'],
[ExcelError::VALUE(), '3579A'], // Invalid decimal
[ExcelError::VALUE(), true], // ODS accepts boolean, Excel/Gnumeric don't
[ExcelError::VALUE(), false],
['FFFFFFFFCA', '-54'], // 2's Complement
['FFFFFFFF95', '-107'], // 2's Complement
['FF80000001', '-2147483647'], // 2's Complement
['FF80000000', '-2147483648'], // 2's Complement
['7FFFFFFFFF', 549755813887], // highest positive, succeeds even for 32-bit
[ExcelError::NAN(), 549755813888],
['8000000000', -549755813888], // lowest negative, succeeds even for 32-bit
['A2DE246000', -400000000000],
['5D21DBA000', 400000000000],
[ExcelError::NAN(), -549755813889],
['0103', 259, 4],
[ExcelError::NAN(), 259, 0],
[ExcelError::NAN(), 259, -1],
[ExcelError::NAN(), 259, 14],
[ExcelError::NAN(), 259, 1],
['103', 259, 3],
];