<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi all!<div><br></div><div>Beware of making substantial changes to the public interface of TestCase or the communication between TestCase and TestResult *because* it might interfere with smalltalkCI and its efforts to remain cross-Smalltalk compatible.</div><div><br></div><div>So, please double-check. :-)</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 29.03.2020 14:03:04 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Christoph Thiede uploaded a new version of SUnit to project The Inbox:<br>http://source.squeak.org/inbox/SUnit-ct.125.mcz<br><br>==================== Summary ====================<br><br>Name: SUnit-ct.125<br>Author: ct<br>Time: 29 March 2020, 1:02:50.60056 pm<br>UUID: 814e778e-04dc-954c-93e3-fb19e307d4c8<br>Ancestors: SUnit-mt.121<br><br>Proposal: Update debugging logic of TestCase. Instead of abusing #halt, open a debugger directly on the test selector. Deprecates #openDebuggerOnFailingTestMethod.<br><br>Also slightly refactors internal behavior to avoid some duplication, and to get rid of unnecessary semaphores which should not add any value compared to #ensure: unless some really low-level things are broken. Please correct me if I am wrong here!<br><br>=============== Diff against SUnit-mt.121 ===============<br><br>Item was added:<br>+ ----- Method: TestCase>>assureResourcesDuring: (in category 'private') -----<br>+ assureResourcesDuring: aBlock<br>+ <br>+        | resources |<br>+        resources := self resources.<br>+         resources do: [:resource |<br>+           resource isAvailable ifFalse: [<br>+                      ^ resource signalInitializationError]].<br>+      ^ aBlock ensure: [<br>+           resources do: [:resource |<br>+                   resource reset]].!<br><br>Item was changed:<br>  ----- Method: TestCase>>debug (in category 'running') -----<br>  debug<br>+        "Run the receiver and open a debugger on the first failure or error."<br>+ <br>+  ^ self assureResourcesDuring: [self runCaseWithoutTimeout]!<br>-  self resources do:<br>-           [ : res | res isAvailable ifFalse: [ ^ res signalInitializationError ] ].<br>-    [ self runCase ] ensure:<br>-             [ self resources do:<br>-                         [ : each | each reset ] ]!<br><br>Item was changed:<br>  ----- Method: TestCase>>debugAsFailure (in category 'running') -----<br>  debugAsFailure<br>+      "Spawn a debugger that is ready to debug the receiver."<br>+ <br>+        (Process<br>+             forBlock: [self debug]<br>+               runUntil: [:context | context selector = testSelector])<br>+                      debug.!<br>-      | semaphore |<br>-        semaphore := Semaphore new.<br>-  self resources do: [:res | <br>-          res isAvailable ifFalse: [^res signalInitializationError]].<br>-  [semaphore wait. self resources do: [:each | each reset]] fork.<br>-      (self class selector: testSelector) runCaseAsFailure: semaphore.!<br><br>Item was changed:<br>  ----- Method: TestCase>>openDebuggerOnFailingTestMethod (in category 'running') -----<br>  openDebuggerOnFailingTestMethod<br>+ <br>+         self deprecated: 'ct: Use #debugAsFailure'.<br>+  <br>      "SUnit has halted one step in front of the failing test method. Step over the 'self halt' and <br>    send into 'self perform: testSelector' to see the failure from the beginning"<br>- <br>       self<br>                  halt;<br>                 performTest!<br><br>Item was changed:<br>  ----- Method: TestCase>>runCaseAsFailure: (in category 'running') -----<br>  runCaseAsFailure: aSemaphore<br>+ <br>+       self deprecated: 'ct: Use #runCaseWithoutTimeout and #ensure:'.<br>+      ^ [self runCaseWithoutTimeout]<br>+               ensure: [aSemaphore signal]!<br>-         [self setUp.<br>-         self openDebuggerOnFailingTestMethod] ensure: [<br>-              self tearDown.<br>-               aSemaphore signal]!<br><br>Item was added:<br>+ ----- Method: TestCase>>runCaseWithoutTimeout (in category 'running') -----<br>+ runCaseWithoutTimeout<br>+ <br>+     [self setUp.<br>+         self performTest]<br>+            ensure: [self tearDown].!<br><br><br></div></blockquote>
                                        </div></body>