diff options
author | Bruce Wells <brucekwells@gmail.com> | 2018-11-26 18:06:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 18:06:26 +0300 |
commit | d50b6659270e6ad9e654d44e1eed8cebd8d04f0d (patch) | |
tree | 221aef8b0d2c57e3cd8eb62d6b25e548279fd48b /tests | |
parent | aa12a41b1bdaa4c780f45043c020bd82fd70f02c (diff) |
Fixed Lexor to correctly generate reverse polish notation (#33)v0.6
* Updated from NeonXP/MathExecutor
* Fixed function in () block issue
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MathTest.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php index c5dd60d..9acdb63 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -69,7 +69,21 @@ class MathTest extends \PHPUnit_Framework_TestCase ['(2 + 2)*-2'], ['(2+-2)*2'], + ['1 + 2 * 3 / (min(1, 5) + 2 + 1)'], + ['1 + 2 * 3 / (min(1, 5) - 2 + 5)'], + ['1 + 2 * 3 / (min(1, 5) * 2 + 1)'], + ['1 + 2 * 3 / (min(1, 5) / 2 + 1)'], + ['1 + 2 * 3 / (min(1, 5) / 2 * 1)'], + ['1 + 2 * 3 / (min(1, 5) / 2 / 1)'], + ['1 + 2 * 3 / (3 + min(1, 5) + 2 + 1)'], + ['1 + 2 * 3 / (3 - min(1, 5) - 2 + 1)'], + ['1 + 2 * 3 / (3 * min(1, 5) * 2 + 1)'], + ['1 + 2 * 3 / (3 / min(1, 5) / 2 + 1)'], + + ['sin(10) * cos(50) / min(10, 20/2)'], + ['sin(10) * cos(50) / min(10, (20/2))'], + ['sin(10) * cos(50) / min(10, (max(10,20)/2))'], ['100500 * 3.5E5'], ['100500 * 3.5E-5'], |