[Cuis-dev] Test error message wrongly formatted

Hernán Wilkinson hernan.wilkinson at 10pines.com
Sun Jul 23 19:29:17 PDT 2023


Hi Hilaire
 I think all of us that used #assert:equals: had the same feeling as you
someday.
 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).
 We should not change it for historical and compatibility reasons.
 Adding the message you suggest will not harm, but it is redundant...
 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.

Cheers!
Hernan.

On Sun, Jul 23, 2023 at 5:12 PM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi Hilaire,
>
> On 7/23/2023 8:07 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> IMHO, In the method below argument names should be reversed
>
> TestCase>>assert: *expected* equals: *actual*
>     self
>         assert: expected = actual
>         description: [ self comparingStringBetween: expected and: actual ]
>
>
> I read the method
>
> TestCase>>assert: actual equalsExpected: expected but it
>
>
> but it is odd and confusing to have both
>
>
> Hilaire
>
>
> I also think that #assert:equals: is ambiguous and somewhat confusing. I'm
> not sure if removing it is a good decision, it could break a lot of code
> for a very minor gain in consistency. Perhaps a method comment recommending
> the use of #assert:equalsExpected: ?
>
> Thanks,
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230723/d2943723/attachment-0001.htm>


More information about the Cuis-dev mailing list