Commit 7d16d590 authored by Aleksandr Galkin's avatar Aleksandr Galkin
Browse files

Better test errors

parent 01157a31
......@@ -79,10 +79,10 @@ class Test extends \PHPUnit_Framework_TestCase
$out = array();
exec('php chess.php ' . $moves, $out, $err);
if ($isCorrect) {
$this->assertEquals(0, $err);
$this->assertEquals(0, $err, "Moves are correct, but chess.php thinks there is an error:\n" . $moves);
$this->assertEquals(join("", $lines), join("\n", $out) . "\n");
} else {
$this->assertNotEquals(0, $err);
$this->assertNotEquals(0, $err, "Moves are invalid, but chess.php does not detect that:\n" . $moves);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment