<div dir="ltr">Hi,<div> sorry Hilaire, I didn't quite understand your first email.</div><div> As Juan says, I see the right error message in the debugger when the assertion fails.</div><div> I agree with keeping both message as you suggest Juan</div><div><br></div><div>Cheers!</div><div>Hernan.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 24, 2023 at 8:41 AM Juan Vuletich via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
Hi Folks,<br>
<br>
On 7/24/2023 5:23 AM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote type="cite">
<p>Hi Hernán, <br>
</p>
<p>I am not asking to add a message, the second one I mentioned is
already in the image and may be should be removed
(#assert:equalsExpected:)</p>
<p>The problem with the method #asserted:expected:) is that the
error message is wrong when the test fails, and I am pretty sure
I never saw it that way before. I have used tests extensively. <br>
</p>
</blockquote>
<br>
On a fresh, updated Cuis, `TestCase new assert: 'actual value'
equalsExpected: 'expected value'` opens a debugger with title
"TestFailure: Expected 'expected value' but was 'actual value'. -
Process: Morphic UI - Priority: 40".<br>
<br>
Looks right to me...<br>
<br>
<blockquote type="cite">
<p> </p>
<p>Alternatively, reversing the argument in the methos as shown
below will fix it:</p>
<p>...</p>
<p>self comparingStringBetween: <b>actual</b> and: <b>expected</b></p>
<p><b>...</b></p>
<p><b><br>
</b></p>
<p>and make the error message read right.</p>
<p>Hilaire<br>
</p>
<div>Le 24/07/2023 à 04:29, Hernán
Wilkinson via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite">Hi
Hilaire<br>
<div> I think all of us that used #assert:equals: had the same
feeling as you someday. </div>
<div> We all expect the actual to be first, but for some reason
I do not know Kent Beck put the expected first when he wrote
SUnit and all the descendant testing framework followed that
convention (JUnit, NUnit, phpunit, etc etc).</div>
<div> We should not change it for historical and compatibility
reasons.</div>
<div> Adding the message you suggest will not harm, but it is
redundant...</div>
<div> My advice, give it a couple of days, you will get used to
it to put the expected first, it is a matter of time.</div>
<div><br>
</div>
</blockquote>
</blockquote>
<br>
I think clarity trumps historical reasons. In any case, it is best
to have both variants and let callers decide which they prefer.<br>
<br>
Thanks,<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>