[squeak-dev] Testing JSON in Squeak 5.1beta : 1 failure

H. Hirzel hannes.hirzel at gmail.com
Wed Aug 17 17:23:03 UTC 2016


Your suggestion, Fabio, to change the test makes sense to me.

May I ask you to create a new version on http://www.squeaksource.com/JSON
and to create a SqueakMap entry for 5.1 which loads that new version?

--Hannes

On 8/17/16, Fabio Niephaus <lists at fniephaus.com> wrote:
> --
>
> On Wed, Aug 17, 2016 at 6:54 PM H. Hirzel <hannes.hirzel at gmail.com> wrote:
>
>> testing JSON (Squeak 5.1beta-16510)
>>
>> MCHttpRepository
>>     location: 'http://www.squeaksource.com/JSON'
>>     user: ''
>>     password: ''
>>
>> Version:
>>
>> Name: JSON-tonyg.37
>> Author: tonyg
>> Time: 29 April 2016, 11:47:17.129 am
>> UUID: 63e50a8f-d436-4128-952c-3c0c8c12e120
>>
>>
>> 16 out of 17 tests pass, 1 failure in
>>
>> testStreaming
>>         | j |
>>         j := Json new stream: 'truefalsetrue[]{}1.234
>> 5.678"A""B"nullnull'
>> readStream.
>>         self assert: j readAny equals: true.
>>         self assert: j readAny equals: false.
>>         self assert: j readAny equals: true.
>>         self assert: j readAny equals: #().
>>         self assert: j readAny equals: Dictionary new.      "<<<<<<<
>> FAILURE HERE "
>>
>
> I'm not sure if it's a good idea to test if this equals a new dictionary
> here.
> Changing the line like this makes the test pass:
>
> self assert: j readAny isDictionary.
>
> `j readAny` returns a JsonObject which directly inherits from Dictionary.
>
> Best,
> Fabio
>
>
>
>>         self assert: j readAny equals: 1.234.
>>         self assert: j readAny equals: 5.678.
>>         self assert: j readAny equals: 'A'.
>>         self assert: j readAny equals: 'B'.
>>         self assert: j readAny equals: nil.
>>         self assert: j readAny equals: nil.
>>
>> --Hannes
>>
>>
>


More information about the Squeak-dev mailing list