diff options
author | NeonXP <frei@neonxp.info> | 2013-09-06 05:42:09 +0400 |
---|---|---|
committer | NeonXP <frei@neonxp.info> | 2013-09-06 05:42:09 +0400 |
commit | 9cdc34290a84093b1c4640118289a7cf56d55125 (patch) | |
tree | 2187fa94cc9f152c9196e7bd4fe23a2c81f60ffd /tests | |
parent | f172123a0dccdca7651c7ad552175924a16b9458 (diff) |
Mass refactoring
Some changes:
+ Added support of functions with multiple arguments
+ Added some default function (min, max, avg). just example of multiple arguments :)
- Removed variables support (I think they pointless)
~ All tokens now in individual classes
~ Parsing based on regular expressions
~ Fix negative numbers
~ Fix grouping with brackets
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MathTest.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php index ba944fe..0cfbefe 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -45,7 +45,18 @@ class MathTest extends \PHPUnit_Framework_TestCase array('0.1 / 0.2'), array('1 / 2'), - array('1 + 0.6 - (3 * 2 / 50)') + array('2 * 2 + 3 * 3'), + + array('1 + 0.6 - 3 * 2 / 50'), + + array('(5 + 3) * -1'), + + array('2+2*2'), + array('(2+2)*2'), + array('(2+2)*-2'), + array('(2+-2)*2'), + + array('sin(10) * cos(50) / min(10, 20/2)') ); } }
\ No newline at end of file |