[Pharo-project] I am the only one who finds #assert:equals: oppostite to expected?

Mariano Martinez Peck marianopeck at gmail.com
Sun May 1 15:54:31 CEST 2011


On Sun, May 1, 2011 at 3:49 PM, Damien Cassou <damien.cassou at gmail.com>wrote:

> On Sun, May 1, 2011 at 2:50 PM, Mariano Martinez Peck
> <marianopeck at gmail.com> wrote:
> > So...the only thing we change is the order in the parameters....the
> question
> > is... do you condiser that changing the API ?
>
> I think this is changing the API because the contract of the method
> changes. But, it's an important change and it has a limited impact:
>
> - only error messages for non passing tests will be affecting
>

exactly


> - there are few senders of this message
>

yes, I checked that too


> - among the existing senders, a lot of them use the API the wrong way
> (which means there code will get fixed automatically when we update
> the API :-)).
>
>
exactly :)

The other possibily is to forget about actual and expected and let the
message be soemthing like

    'Assertion failed: (' , actual asString , ') ~= (' , expected asString ,
')'

or

    'Assertion failed: (' , expected asString , ') ~= (' , actual asString ,
')'


But still...I prefer the previous one changing the order :)

--
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Lambdas are relegated to relative obscurity until Java makes them
> popular by not having them." James Iry
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110501/a6ac3dfc/attachment.htm>


More information about the Pharo-project mailing list