<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>PS: I ran all tests in a fresh trunk image before and after loading the changeset, there were no regressions.</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Dienstag, 29. September 2020 01:18:07<br>
<b>An:</b> Squeak Dev<br>
<b>Betreff:</b> [squeak-dev] ResumableTestFailure</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi all! :-)</p>
<p><br>
</p>
<p>I was just working a bit with Squeak by Example (the book) and found out that resumable assertions as described in the book (see chapter SUnit, Advanced, <span>Continuing after a failure)</span> do not any longer work in a trunk image. If you write a test
 case with some resumable assertions, turn on logging, and run the test, only the first failure will be logged, not the rest, too.</p>
<p><br>
</p>
<p>(Methods to reproduce:</p>
<p>isLogging</p>
<p>    ^  true "You will need to open a Transcript"</p>
<p>testResumable</p>
<p>    #(1 2 3 4 5) do: [:i |</p>
<p>        self assert: i even description: ['{1} is not even' format: {i}] resumable: true]</p>
<p>)</p>
<p><br>
</p>
<p>A second issue I experienced frequently when I felt the desire to work with resumable assertions was that they are basically only available for two selectors: #assert:description:resumable: and #deny:description:identical:. I often would like to insert a
 resumable into any test without being that verbose, and nearly redoubling the number of assertion selectors by adding a resumable argument to each of them did not feel right, either.</p>
<p><br>
</p>
<p>Please find the attached changeset, which fixes both issues.</p>
<p></p>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li>In TestResult >> #runCase:, resumable assertions are identified and - finally - resumed, after marking the test as failed. Unfortunately, other test runners (yes, I'm thinking of smalltalkCI) will need to reimplement this feature unless they reuse the TestResult
 implementation.</li><li>In TestCase, I refactored some methods that raise assertion failures and added the most basic #<span>signalFailure:resumable: as the single source of signalization. Instead of setting the resumable bit manually for each assertion, you now can also make
 the whole test execution resumable by:</span>
<ul>
<li><span>overriding #isResumable,</span></li><li><span style="font-size: 12pt;">setting a resumable flag using #resumable:,</span><br>
</li><li><span style="font-size: 12pt;">setting a resumable flag temporarily using #beResumable:during:, or</span><br>
</li><li><span style="font-size: 12pt;">adding a <resumable> or <resumable: true> pragma to the test method.</span><br>
</li></ul>
</li><li>In addition, I tested the added and fixed behavior in <span>ResumableTestFailureTestCase.</span></li></ul>
<p></p>
<p><span><br>
</span></p>
<p><span>Looking forward to your review! :-)</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>