Skip to content

Commit

Permalink
Teats: added some "complex" terms
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskonnertz committed Nov 26, 2018
1 parent 65dd3fe commit 41d3f36
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/StringCalcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ public function testCalculations()
$this->stringCalc->calculate('mTRand(1,2)');
$this->stringCalc->calculate('rand()');
$this->stringCalc->calculate('rand(1,2)');

// Complex terms
$complexTerms = [
['-1*max(1,2+3-4*5)/5-10', -10.2],
['tan(2)*sqrtPi-e/sin(3)+1234-5000', -3789.1350823853],
['min(-pi-(sqrt(64)),euler+(euler+euler))', -11.14159265359],
['(((2*(3+(4+(6+(8+9)))))))', 60],
];

$this->doCalculations($complexTerms);
}

/**
Expand Down

0 comments on commit 41d3f36

Please sign in to comment.