Hi all, Hi Dave, Hi Tim,<br>
<br>
with Marcel's okay, I have fixed all the old tests that referred to TestResult error via a new #shouldRaiseError: selector (see SUnit-ct.138 & Co.). What remains is the case of #shouldFix:.<br>
<br>
    TestCase >> <b>shouldFix:</b><font color="#000000"> </font><font color="#000080">aBlock</font><font color="#000000"> <br>
    <br>
        </font><font color="#800000">^</font><font color="#800000">self</font><font color="#000000"> </font><font color="#000080">should:</font><font color="#000000"> </font><font color="#000080">aBlock</font><font color="#000000"> </font><font color="#000080">raise:</font><font color="#000000"> </font><font color="#000000">Exception</font><br>
<br>
As this assertion promotes a bad pattern (unconditionally handling <i>all</i> exceptions), has not any sender in the Trunk except its own SUnit test, and is an extension assertion that was not part of the original SUnit standard, I propose to deprecate it with a meaningful notice.<br>
<br>
Please object within the next week if you disagree with this proposal. :-)<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-01-20T00:00:51+01:00, christoph.thiede@student.hpi.uni-potsdam.de wrote:<br>
<br>
> Inbox because I would not be surprised if there were many (external) senders of this assertion that have aligned their assumptions about this selector to the previous reality. But I don't like this idea at all.<br>
> <br>
> Here is a different idea which I even tend to prefer: Deprecate meaningless #shouldFix: and introduce new #shouldFail: which scans for TestResult exError.<br>
> <br>
> As it turns out now, "TestResult error" was indeed used in more places than I was assuming which I now need to rewrite. If you agree to introduce #shouldFail:, then I can rewrite ~40 senders in the Trunk image from "self should: [...] raise: TestResult error" to "self shouldFail: [...]", which I would consider more elegant anyway. :-) Please give feedback!<br>
> <br>
> Best,<br>
> Christoph<br>
> <br>
> ---<br>
> Sent from Squeak Inbox Talk<br>
> <br>
> On 2022-01-19T22:54:56+00:00, commits at source.squeak.org wrote:<br>
> <br>
> > A new version of SUnit was added to project The Inbox:<br>
> > http://source.squeak.org/inbox/SUnit-ct.137.mcz<br>
> > <br>
> > ==================== Summary ====================<br>
> > <br>
> > Name: SUnit-ct.137<br>
> > Author: ct<br>
> > Time: 19 January 2022, 11:54:53.214828 pm<br>
> > UUID: dd617d36-ff31-f143-932d-09d1c332f5dc<br>
> > Ancestors: SUnit-ct.136<br>
> > <br>
> > Revises exception choice in TestCase >> #shouldFix:. It is a bad practice to handle, or even to search for arbitary Exceptions. Many mechanisms signal possibly unhandled "harmless" exceptions and rely on their #defaultAction. This includes accesses to the source files, debugging operations, and many others. The assertion in its current form makes little sense.<br>
> > <br>
> > =============== Diff against SUnit-ct.136 ===============<br>
> > <br>
> > Item was changed:<br>
> >   ----- Method: TestCase>>shouldFix: (in category 'asserting - extensions') -----<br>
> >   shouldFix: aBlock <br>
> >   <br>
> > + ????^self should: aBlock raise: TestResult exError!<br>
> > - ????^self should: aBlock raise: Exception!<br>
> > <br>
> > <br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220120/9390cb9f/attachment.html><br>
> <br>