<div dir="ltr"><br><div>On Wed, Aug 17, 2016 at 7:14 PM Fabio Niephaus <<a href="mailto:lists@fniephaus.com" target="_blank">lists@fniephaus.com</a>> wrote:<br></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div>-- <br></div><br><div class="gmail_quote"></div></div><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Aug 17, 2016 at 6:54 PM H. Hirzel <<a href="mailto:hannes.hirzel@gmail.com" target="_blank">hannes.hirzel@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">testing JSON (Squeak 5.1beta-16510)<br>
<br>
MCHttpRepository<br>
location: '<a href="http://www.squeaksource.com/JSON" rel="noreferrer" target="_blank">http://www.squeaksource.com/JSON</a>'<br>
user: ''<br>
password: ''<br>
<br>
Version:<br>
<br>
Name: JSON-tonyg.37<br>
Author: tonyg<br>
Time: 29 April 2016, 11:47:17.129 am<br>
UUID: 63e50a8f-d436-4128-952c-3c0c8c12e120<br>
<br>
<br>
16 out of 17 tests pass, 1 failure in<br>
<br>
testStreaming<br>
| j |<br>
j := Json new stream: 'truefalsetrue[]{}1.234 5.678"A""B"nullnull' readStream.<br>
self assert: j readAny equals: true.<br>
self assert: j readAny equals: false.<br>
self assert: j readAny equals: true.<br>
self assert: j readAny equals: #().<br>
self assert: j readAny equals: Dictionary new. "<<<<<<< FAILURE HERE "<br></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>I'm not sure if it's a good idea to test if this equals a new dictionary here.</div><div>Changing the line like this makes the test pass:</div><div><br></div><div>self assert: j readAny isDictionary.<br></div><div><br></div><div>`j readAny` returns a JsonObject which directly inherits from Dictionary.</div><div><br></div><div>Best,</div><div>Fabio</div></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>Turns out Dictionary>>= has changed and compares "species" now.</div></div></div><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
self assert: j readAny equals: 1.234.<br>
self assert: j readAny equals: 5.678.<br>
self assert: j readAny equals: 'A'.<br>
self assert: j readAny equals: 'B'.<br>
self assert: j readAny equals: nil.<br>
self assert: j readAny equals: nil.<br>
<br>
--Hannes<br>
<br>
</blockquote></div></div></blockquote></div></div></div>