diff options
Diffstat (limited to 'tests/MathTest.php')
-rw-r--r-- | tests/MathTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/MathTest.php b/tests/MathTest.php index d086acb..426e514 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -508,6 +508,14 @@ class MathTest extends TestCase $this->assertEquals(1, $calculator->execute('1-0')); } + public function testScientificNotation() + { + $calculator = new MathExecutor(); + $this->assertEquals(1.5e9, $calculator->execute('1.5e9')); + $this->assertEquals(1.5e-9, $calculator->execute('1.5e-9')); + $this->assertEquals(1.5e+9, $calculator->execute('1.5e+9')); + } + public function testGetFunctionsReturnsArray() { $calculator = new MathExecutor(); |