Skip to content

Commit

Permalink
MDL-32149 remove some now breaking expectError() uses.
Browse files Browse the repository at this point in the history
I've tested that unit with debug developer, debug notices and
debug none and it passes always. So, as far as I cannot find
any reason to have those expectError() there... they are out now.
  • Loading branch information
stronk7 committed Apr 4, 2012
1 parent a3e7cca commit 97e84c8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/simpletest/testmathslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,27 +119,18 @@ public function test__more_complex_expressions() {
* Tests some slightly more complex expressions
*/
public function test__error_handling() {
if (debugging('', DEBUG_DEVELOPER)) {
$this->expectError();
}
$formula = new calc_formula('=pi( + a', array('a'=>10));
$res = $formula->evaluate();
$this->assertEqual($res, false);
$this->assertEqual($formula->get_error(),
get_string('unexpectedoperator', 'mathslib', '+'));

if (debugging('', DEBUG_DEVELOPER)) {
$this->expectError();
}
$formula = new calc_formula('=pi(');
$res = $formula->evaluate();
$this->assertEqual($res, false);
$this->assertEqual($formula->get_error(),
get_string('expectingaclosingbracket', 'mathslib'));

if (debugging('', DEBUG_DEVELOPER)) {
$this->expectError();
}
$formula = new calc_formula('=pi()^');
$res = $formula->evaluate();
$this->assertEqual($res, false);
Expand Down

0 comments on commit 97e84c8

Please sign in to comment.