mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-21 19:45:32 +00:00
ec4098c8fd
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.
30 lines
862 B
PHP
30 lines
862 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
|
|
|
return [
|
|
['178', 10110010],
|
|
['178', '10110010'],
|
|
['100', '1100100'],
|
|
[ExcelError::NAN(), '111001010101'], // Too large
|
|
['5', '101'],
|
|
['2', '10'],
|
|
['0', '0'],
|
|
['5', '101'],
|
|
['100', '1100100'],
|
|
[ExcelError::NAN(), '21'], // Invalid binary number
|
|
[ExcelError::VALUE(), true], // Boolean okay for ODS, not for Excel/Gnumeric
|
|
[ExcelError::VALUE(), false], // Boolean okay for ODS, not for Excel/Gnumeric
|
|
['-107', '1110010101'], // 2's Complement
|
|
['-1', '1111111111'], // 2's Complement
|
|
['-512', '1000000000'], // lowest negative
|
|
['511', '111111111'], // highest positive
|
|
['0', '0000000000'],
|
|
['1', '000000001'],
|
|
['256', '0100000000'],
|
|
['256', '100000000'],
|
|
['-256', '1100000000'],
|
|
];
|