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 " 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 |
-- On Wed, Aug 17, 2016 at 6:54 PM H. Hirzel <[hidden email]> wrote: testing JSON (Squeak 5.1beta-16510) 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. |
On Wed, Aug 17, 2016 at 7:14 PM Fabio Niephaus <[hidden email]> wrote:
Turns out Dictionary>>= has changed and compares "species" now.
|
In reply to this post by fniephaus
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 <[hidden email]> wrote: > -- > > On Wed, Aug 17, 2016 at 6:54 PM H. Hirzel <[hidden email]> 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 >> >> > |
On Wed, Aug 17, 2016 at 7:23 PM H. Hirzel <[hidden email]> wrote: Your suggestion, Fabio, to change the test makes sense to me. I've pushed a new version: Name: JSON-FabN.38 Author: FabN Time: 17 August 2016, 7:32:28.37 pm UUID: 9b27fd7e-4754-436d-b6f5-2348b49f5b63 Ancestors: JSON-tonyg.37 Unfortunately, I don't have permissions to update the SqueakMap entry. Maybe Tony can take care of this? Best, Fabio
|
Hi Fabio, Hannes,
On 08/17/2016 01:37 PM, Fabio Niephaus wrote: > > I'm not sure if it's a good idea to test if this equals a new > dictionary > > here. And yet, just checking that it is a dictionary isn't quite right either. I've changed it now to compare against JsonObject new. (It feels weird to me that Dictionary>>equals: should compare species :-/ ) I'll update SqueakMap per the instructions Hannes sent me. Thanks! Tony |
Thank you, Tony!
On Wed, 17 Aug 2016 at 20:22, Tony Garnock-Jones <[hidden email]> wrote: Hi Fabio, Hannes, |
In reply to this post by Tony Garnock-Jones-3
You guys may find the improvments we have done over the years useful:
http://leves.web.elte.hu/squeak/JSON-ul.45.mcz Levente On Wed, 17 Aug 2016, Tony Garnock-Jones wrote: > Hi Fabio, Hannes, > > On 08/17/2016 01:37 PM, Fabio Niephaus wrote: >> > I'm not sure if it's a good idea to test if this equals a new >> dictionary >> > here. > > And yet, just checking that it is a dictionary isn't quite right either. > I've changed it now to compare against JsonObject new. > > (It feels weird to me that Dictionary>>equals: should compare species :-/ ) > > I'll update SqueakMap per the instructions Hannes sent me. > > Thanks! > > Tony > > |
Free forum by Nabble | Edit this page |