From aa37abbaeb73ac1cac5798608da51d813e976a25 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Thu, 4 Mar 2021 20:08:57 -0500 Subject: Release prep (#86) --- tests/MathTest.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'tests/MathTest.php') diff --git a/tests/MathTest.php b/tests/MathTest.php index 259de2c..f37d0ec 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -58,6 +58,17 @@ class MathTest extends TestCase ['(4*2) - 5'], ['4*-5'], ['4 * -5'], + ['+5'], + ['+(3+2)'], + ['+(+3+2)'], + ['+(-3+2)'], + ['-5'], + ['-(-5)'], + ['-(+5)'], + ['+(-5)'], + ['+(+5)'], + ['-(3+2)'], + ['-(-3+-2)'], ['abs(1.5)'], ['acos(0.15)'], @@ -92,6 +103,9 @@ class MathTest extends TestCase ['rad2deg(1.5)'], ['round(1.5)'], ['sin(1.5)'], + ['sin(12)'], + ['+sin(12)'], + ['-sin(12)'], ['sinh(1.5)'], ['sqrt(1.5)'], ['tan(1.5)'], @@ -252,17 +266,6 @@ class MathTest extends TestCase $this->assertEquals(0, $calculator->execute('10 / 0')); } - public function testUnaryOperators() - { - $calculator = new MathExecutor(); - $this->assertEquals(5, $calculator->execute('+5')); - $this->assertEquals(5, $calculator->execute('+(3+2)')); - $this->assertEquals(-5, $calculator->execute('-5')); - $this->assertEquals(5, $calculator->execute('-(-5)')); - $this->assertEquals(-5, $calculator->execute('+(-5)')); - $this->assertEquals(-5, $calculator->execute('-(3+2)')); - } - public function testZeroDivisionException() { $calculator = new MathExecutor(); -- cgit v1.2.3