[squeak-dev] Squeak's AssertionFailure vs. SUnit's TestFailure

Marcel Taeumel marcel.taeumel at hpi.de
Mon Nov 11 15:03:19 UTC 2019


Hi, there.

The Kernel package provides "AssertionFailure" through "self assert: ...".
The SUnit package provides "TestFailure" through "self assert: ..." in test cases.

AssertionFailure is a subclass of Halt.

TestFailure is a subclass of Exception.

Now, the test runner catches all errors (red) and all test failures (yellow). However, the rest runner stops working if an AssertionFailure is raised. The Decompiler can do that, for example. In that case, the user cannot easily get an overview of all non-passing tests.

Here are my questions:

- Should AssertionFailure be an Error instead of a Halt?
- Should SUnit treat "real" AssertionFailures also as errors (red)?

Find attached two changesets with two different strategies.

See TestResult >> #runCase: to see which exceptions are caught during test execution.

Best,
Marcel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191111/ea2549a8/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: assert-in-sunit.1.cs
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191111/ea2549a8/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: assert-in-sunit-alternative.1.cs
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191111/ea2549a8/attachment-0001.ksh>


More information about the Squeak-dev mailing list