aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2021-02-17 06:13:44 +0300
committerGitHub <noreply@github.com>2021-02-17 06:13:44 +0300
commit17cc5b9dc48b19e0dee1937080601a9fc2890af4 (patch)
treebbb9da21341cff2079cc83c749a45934c81b3bd3 /tests
parent936ee5caca3067de98a40d5a5788946b6f2b87dc (diff)
Unary Minus (#84)V2.1.7
Fixed unary minus to allow a minus sign in front of functions and parentheses.
Diffstat (limited to 'tests')
-rw-r--r--tests/MathTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php
index 47d89b8..a843db5 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -147,6 +147,8 @@ class MathTest extends TestCase
['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'],
['100500 * 3.5E5'],
['100500 * 3.5E-5'],
@@ -208,6 +210,24 @@ class MathTest extends TestCase
['1 + (3 *-1)'],
['1 - 0'],
['1-0'],
+
+ ['-(1.5)'],
+ ['-log(4)'],
+ ['0-acosh(1.5)'],
+ ['-acosh(1.5)'],
+ ['-(-4)'],
+ ['-(-4 + 5)'],
+ ['-(3 * 1)'],
+ ['-(-3 * -1)'],
+ ['-1 + (-3 * -1)'],
+ ['-1 + ( -3 * 1)'],
+ ['-1 + (3 *-1)'],
+ ['-1 - 0'],
+ ['-1-0'],
+ ['-(4*2)-5'],
+ ['-(4*-2)-5'],
+ ['-(-4*2) - 5'],
+ ['-4*-5'],
];
}