aboutsummaryrefslogtreecommitdiff
path: root/tests/MathTest.php
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2019-01-09 03:39:48 +0300
committerBruce Wells <brucekwells@gmail.com>2019-01-09 03:39:48 +0300
commit9684cfd1d0e61a6bfcf1a46f322f99e7b6559df5 (patch)
treeca4b36c1383276cf50e81791b4b6179e4cacacd7 /tests/MathTest.php
parent76307e3f41b5582196e9620c687052f8bb8537cc (diff)
parent8e9c8508cbfaa944505f7d3a988bcfce1e4d7bba (diff)
Merge branch 'master' of https://github.com/phpfui/MathExecutor
# Conflicts: # src/NXP/Classes/Lexer.php
Diffstat (limited to 'tests/MathTest.php')
-rw-r--r--tests/MathTest.php14
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'],