rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Failed asserts are not unexpected

Open jurgenvinju opened this issue 5 months ago • 0 comments

Describe the bug

The executorSmokeTest contains a number of assert statements that might fail during a test:

error: executorSmokeTest @ |file:///Users/jurgenv/git/rascal/src/org/rascalmpl/tutor/lang/rascal/tutor/repl/TutorCommandExecutor.rsc|(1227,878,<42,0>,<67,1>)
Test lang::rascal::tutor::repl::TutorCommandExecutor::executorSmokeTest failed due to
	test threw unexpected exception


Exception:
/Users/jurgenv/git/rascal/src/org/rascalmpl/tutor/lang/rascal/tutor/repl/TutorCommandExecutor.rsc:55,72: AssertionFailed("result of println should be printed on stdout")
	at executorSmokeTest(|file:///Users/jurgenv/git/rascal/src/org/rascalmpl/tutor/lang/rascal/tutor/repl/TutorCommandExecutor.rsc|(1227,878,<42,0>,<67,1>))
	at $shell$(|main://$shell$|)

Failing asserts in a test function should be reported as a plain test failure rather than an "unexpected exception".

jurgenvinju avatar Jun 19 '25 11:06 jurgenvinju