From 4d50343330183a498c34a20d20e5981c26602c0c Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Tue, 21 Apr 2020 11:12:55 -0400 Subject: Negative expression start (#60) * Update documentation for PHPFUI/InstaDoc * Support for negative numbers starting paren enclosed expressions --- tests/MathTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/MathTest.php') diff --git a/tests/MathTest.php b/tests/MathTest.php index cc4cd1a..7cbc7de 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -114,6 +114,7 @@ class MathTest extends \PHPUnit\Framework\TestCase ['(5 + 3) * -1'], + ['-2- 2*2'], ['2- 2*2'], ['2-(2*2)'], ['(2- 2)*2'], @@ -155,6 +156,7 @@ class MathTest extends \PHPUnit\Framework\TestCase ['-1*-2'], ['(1+2+3+4-5)*7/100'], + ['(-1+2+3+4- 5)*7/100'], ['(1+2+3+4- 5)*7/100'], ['( 1 + 2 + 3 + 4 - 5 ) * 7 / 100'], @@ -176,6 +178,7 @@ class MathTest extends \PHPUnit\Framework\TestCase ['3 <= 5'], ['5 <= 5'], ['10 < 9 || 4 > (2+1)'], + ['10 < 9 || 4 > (-2+1)'], ['10 < 9 || 4 > (2+1) && 5 == 5 || 4 != 6 || 3 >= 4 || 3 <= 7'], ['1 + 5 == 3 + 1'], @@ -193,7 +196,11 @@ class MathTest extends \PHPUnit\Framework\TestCase ['(-4)'], ['(-4 + 5)'], - + ['(3 * 1)'], + ['(-3 * -1)'], + ['1 + (-3 * -1)'], + ['1 + ( -3 * 1)'], + ['1 + (3 * -1)'], ['1 - 0'], ['1-0'], ]; -- cgit v1.2.3