PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions
oleibman 30c880b5e6
Bitwise Functions and 32-bit (#1900)
* Bitwise Functions and 32-bit

When running the test suite with 32-bit PHP, a failure was reported in BITLSHIFT.
In fact, all of the following are vulnerable to problems, and didn't report
any failures only because of a scarcity of tests:
- BITAND
- BITOR
- BITXOR
- BITRSHIFT
- BITLSHIFT

Those last 2 can be resolved fairly easily by using multiplication by a power of 2
rather than shifting. The first 3 are a tougher nut to crack, and I will continue
to think how they might best be approached. For now, I have added skippable tests
for each of them, which at least documents the problem.

Aside from adding many new tests, some bugs were correctd:
- The function list in Calculation.php pointed BITXOR to BITOR.
- All 5 functions allow null/false/true parameters.
- BIT*SHIFT shift amount must be numeric, can be negative, allows decimal portion
(which is truncated to integer), and has an absolute value limit of 53.
- Because BITRSHIFT allows negative shift amount, its result can overflow
(in which case return NAN).
- All 5 functions disallow negative parameters (except ...SHIFT second parameter).
This was coded, but the code had been thwarted by an earlier is_int test.

* Full Support for AND/OR/XOR on 32-bit

Previous version did not support operands 2**32 through 2**48.
2021-03-14 20:05:31 +01:00
..
Database Initial experiments using the new Database query logic with Conditional Statistical Functions (#1880) 2021-02-27 18:26:12 +01:00
DateTime 100% Coverage for Calculation/DateTime (#1870) 2021-02-27 20:43:22 +01:00
Engineering Bitwise Functions and 32-bit (#1900) 2021-03-14 20:05:31 +01:00
Financial Extract remaining Excel function unit tests into separate test classes for each function (#1817) 2021-01-31 15:09:56 +01:00
Logical Add support for IFS() logical function (#1442) 2020-06-20 18:21:19 +02:00
LookupRef First step extracting INDIRECT() and OFFSET() to their own classes (#1921) 2021-03-14 19:58:10 +01:00
MathTrig Continue MathTrig Breakup - Trig Functions (#1905) 2021-03-13 12:06:30 +01:00
Statistical Trend unit tests (#1899) 2021-03-06 22:50:19 +01:00
TextData Problems Using Builtin PHP Functions Directly As Excel Functions (#1799) 2021-01-26 22:55:06 +01:00
Web WEBSERVICE is HTTP client agnostic 2020-07-19 11:33:01 +09:00