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

145 lines
2.4 KiB
PHP

<?php
declare(strict_types=1);
return [
[
0,
[
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
],
],
[
0,
[
[1.1, 2.2, 3.3],
[4.4, 5.5, 6.6],
[7.7, 8.8, 9.9],
],
],
[
0,
[
[10, 20, 30],
[40, 50, 60],
[70, 80, 90],
],
],
[
-360.0,
[
[8, 1, 6],
[3, 5, 7],
[4, 9, 2],
],
],
[
-9,
[
[5, 2],
[7, 1],
],
],
[
40,
[
[6, 4, 2],
[3, 5, 3],
[2, 3, 4],
],
],
[
1.81,
[
[0.20, 1.0],
[0.35, 10.8],
],
],
[
-2,
[
[1, 2],
[3, 4],
],
],
[
-3,
[
[1, 2, 1],
[3, 4, 2],
[1, 1, 2],
],
],
[
88,
[
[1, 3, 8, 5],
[1, 3, 6, 1],
[1, 1, 1, 0],
[7, 3, 10, 2],
],
],
[
1,
[
[3, 6, 1],
[1, 1, 0],
[3, 10, 2],
],
],
[
-3,
[
[3, 6],
[1, 1],
],
],
[
-3,
[
[3, '=6'],
[1, 1],
],
],
[
'#VALUE!', // null in array
[
[0.20, 1.00, -0.90],
[0.35, 10.80, 4.00],
[-3.15, 5.00, null],
],
],
[
'#VALUE!', // string in array
[
[0.20, 1.00, -0.90],
[0.35, 10.80, '="4.00"'],
[-3.15, 5.00, 6.00],
],
],
[
'#VALUE!', // string in array
[
[0.20, 1.00, -0.90],
[0.35, 10.80, 'Y'],
[-3.15, 5.00, 6.00],
],
],
[
'#VALUE!', // not square
[
[1, 3, 8, 5],
[1, 3, 6, 1],
],
],
[1, '{3,6,1;1,1,0;3,10,2}'], // bracket notation
[2, 2], // scalar treated as 1x1
['#VALUE!', '"y"'], // invalid scalar treated as 1x1
['#VALUE!', '"2"'], // invalid scalar treated as 1x1
['#VALUE!', '{3,6,1;1,1,0}'], // not square
['#VALUE!', '{3,6, "y";1,1,0;3,10,2}'], // first row has string entry
['exception', ''],
];