From eb9c3651614dd5e5aef067880092e9f622c264df Mon Sep 17 00:00:00 2001 From: zhukv Date: Sat, 3 Aug 2013 13:47:47 +0300 Subject: Fix to PSR standart, fix tokenizer, fix function executor. --- tests/MathTest.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/MathTest.php (limited to 'tests/MathTest.php') diff --git a/tests/MathTest.php b/tests/MathTest.php new file mode 100644 index 0000000..ba944fe --- /dev/null +++ b/tests/MathTest.php @@ -0,0 +1,51 @@ +assertEquals($calculator->execute($expression), $phpResult); + } + + /** + * Expressions data provider + */ + public function providerExpressions() + { + return array( + array('0.1 + 0.2'), + array('1 + 2'), + + array('0.1 - 0.2'), + array('1 - 2'), + + array('0.1 * 2'), + array('1 * 2'), + + array('0.1 / 0.2'), + array('1 / 2'), + + array('1 + 0.6 - (3 * 2 / 50)') + ); + } +} \ No newline at end of file -- cgit v1.2.3