Minor formatting changes to test outcome printing

This commit is contained in:
Mattia Giambirtone 2024-02-19 18:47:57 +01:00
parent 5472414786
commit 121a698ff6
1 changed files with 5 additions and 4 deletions

View File

@ -29,14 +29,15 @@ when isMainModule:
echo &" - {test.name} -> {test.status}"
if test.status in [Failed, Crashed]:
echo &" Details:"
echo &" - Source: {test.source.escape()}"
echo &" - Outcome: {test.outcome}"
echo &" - Expected state: {test.expected} "
echo &" - Expected outcome: {test.getExpectedOutcome()}"
echo &" - Source: {test.source.escape()}"
echo &" - Outcome: {test.outcome}"
echo &" - Expected state: {test.expected} "
echo &" - Expected outcome: {test.getExpectedOutcome()}"
if not test.outcome.exc.isNil():
echo &"\n Formatted error message follows\n"
print(LexingError(test.outcome.exc))
echo "\n Formatted error message ends here\n"
if suite.successful():
echo "OK: All tests were successful"
quit(0)
quit(-1)