From 4955c639e1069ba3d3415d01a3368f09b000c2a7 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Fri, 7 Feb 2020 17:45:33 -0500 Subject: PHP 7.4 support (#57) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Merge in neonxp master (#9) * Version 1.1 (#51) * Update README.md and more function support * Removing phpunit symbolic link (#53) * Left bracket and minus fix (#55) * Left bracket and minus fix (#54) * Add test for left bracket and minus fix #55 * Fix substraction by zero bug (#56) Co-authored-by: franksl Co-authored-by: Clément Lafont * Docs and test updates * Update composer Co-authored-by: franksl Co-authored-by: Clément Lafont --- tests/MathTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/MathTest.php b/tests/MathTest.php index 0de2465..cc4cd1a 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -37,6 +37,10 @@ class MathTest extends \PHPUnit\Framework\TestCase /** * Expressions data provider + * + * Most tests can go in here. The idea is that each expression will be evaluated by MathExecutor and by PHP with eval. + * The results should be the same. If they are not, then the test fails. No need to add extra test unless you are doing + * something more complete and not a simple mathmatical expression. */ public function providerExpressions() { @@ -186,6 +190,12 @@ class MathTest extends \PHPUnit\Framework\TestCase ['1 + 5 < 3 + 1'], ['1 + 3 <= 5 + 1'], ['1 + 5 <= 5 + 1'], + + ['(-4)'], + ['(-4 + 5)'], + + ['1 - 0'], + ['1-0'], ]; } -- cgit v1.2.3