diff options
author | Bruce Wells <brucekwells@gmail.com> | 2020-02-08 01:45:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 01:45:33 +0300 |
commit | 4955c639e1069ba3d3415d01a3368f09b000c2a7 (patch) | |
tree | 23c9502427efe8f45e1457d8895730152253882d | |
parent | 0eeed45566ec7bac6865cb6d30acb5777ccf6f43 (diff) |
PHP 7.4 support (#57)V1.1.3
* 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 <info@streamlake.com>
Co-authored-by: Clément Lafont <johnrazeur@gmail.com>
* Docs and test updates
* Update composer
Co-authored-by: franksl <info@streamlake.com>
Co-authored-by: Clément Lafont <johnrazeur@gmail.com>
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | composer.json | 5 | ||||
-rw-r--r-- | tests/MathTest.php | 10 |
3 files changed, 12 insertions, 5 deletions
@@ -18,7 +18,7 @@ ## Install via Composer: ``` -composer require "nxp/math-executor" +composer require nxp/math-executor ``` ## Sample usage: diff --git a/composer.json b/composer.json index 4c57b47..8a5bd99 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nxp/math-executor", "description": "Simple math expressions calculator", "minimum-stability": "stable", - "keywords": ["math","parser","expression","calculator"], + "keywords": ["math","parser","expression","calculator","formula","mathmatics"], "homepage": "http://github.com/NeonXP/MathExecutor", "license": "MIT", "authors": [ @@ -19,8 +19,5 @@ }, "autoload": { "psr-0": {"NXP": "src/"} - }, - "config": { - "bin-dir": "bin" } } 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'], ]; } |