<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-11-30 22:02 GMT+01:00 Tobias Pape <span dir="ltr"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<span class="gmail-"><br>
<br>
> On 30.11.2017, at 21:25, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
><br>
> Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/CollectionsTests-nice.285.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>trunk/CollectionsTests-nice.<wbr>285.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: CollectionsTests-nice.285<br>
> Author: nice<br>
> Time: 30 November 2017, 9:25:14.59936 pm<br>
> UUID: e50f181d-41a8-428f-ba63-<wbr>b370998aac7d<br>
> Ancestors: CollectionsTests-nice.284<br>
><br>
> Tests for (Wide)CharacterSet(Complement)<br>
><br>
> - add tests for intersection: and union:<br>
> - don't (ab)use should: when assert: could do it<br>
<br>
</span>Can you explain that for me?<br>
<br>
Best regards<br>
<span class="gmail-HOEnZb"><font color="#888888">        -Tobias<br>
<br></font></span></blockquote><div>Hi Tobias,</div><div>certainly: a block shall be used to differ evaluation for various purposes like:<br></div><div>- evaluate an expression conditionnally</div><div>- evaluate an expression iteratively</div><div>- evaluate preconditions/postconditions like in showWhile: , ensure: , exception protection (ifError: , on:do:), interruption protection (critical:) etc...</div><div><br></div><div>If we do not need to differ evaluation, then we should not use a Block.</div><div>In SUnit TestCase, a Block is usefull for catching exception (should:raise: shouldnt:raise:).</div><div><br></div><div>But (aTestCase should: [self doSomething]) is an un-necessary usage of Block, because there's absolutely no interest in differing evaluation.</div><div>It does not bring anything compared to (aTestCase assert: self doSomething).</div><div><br></div><div>I think that I used should: because I did like the name better than assert:<br></div><div><br></div><div>Also since you ask, I see that I left a (self shouldnt: [self doSomething] raise: Error) which can also be considered a Bad Style (TM), because catching too wide!</div><div>This is already covered by (self assert: self doSomething).<br></div></div></div><div class="gmail_extra"><br></div></div>