[Cuis-dev] Test error message wrongly formatted

Hilaire Fernandes hfern at free.fr
Sat Jul 29 04:31:34 PDT 2023


Hi Hernán,

I understand but the problem is that the users I have observed have the 
reverse understanding. For example from the packages below:

*NeoCSV.* ported from Pharo. The more than 50 tests are written with a 
different understanding. See the expected value is the second parameter:

testEmptyFieldQuoted
     self
         assert: (NeoCSVReader on: '"1",,"3"' readStream) upToEnd
         equals: #(('1' nil '3'))


*Locale.* package ported from Squeak:

testFromISOString

     | locale |
     locale := LocaleID isoString: 'en-us'.
     self
         assert: locale isoLanguage equals: 'en';
         assert: locale isoCountry equals: 'us'


I personally never used assert:equal: before so I don't know about other 
package using it.

Hilaire



Le 29/07/2023 à 02:05, Hernán Wilkinson a écrit :
> Hi Hilaire,
>  What is happening is correct.
>  I mean, the first parameter has to be the expected object. That it is 
> why it says “Expected …” no matter what the parameter is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230729/a93443b1/attachment.htm>


More information about the Cuis-dev mailing list