mmlemon / as3corelib

Automatically exported from code.google.com/p/as3corelib
0 stars 0 forks source link

JSONTest does not test for the serialized output Strings in testEncodeObject() #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run JSONTest.testEncodeObject()

What is the expected output? What do you see instead?
Instead of using assertEquals on the encoded String, assertTrue is called
on the expected String, which always returns true as it is not null.

replace

assertTrue( "Deeply nested",
"{\"foo\":{\"foo2\":{\"foo3\":{\"foo4\":\"bar\"}}}}" );

with

assertEquals( "Deeply nested",
"{\"foo\":{\"foo2\":{\"foo3\":{\"foo4\":\"bar\"}}}}", s );

and 

assertTrue( "Prop with spaces", "{\" prop with spaces \":true}" );

with

s = JSON.encode( obj );
assertTrue( "Prop with spaces", "{\" prop with spaces \":true}", s );

Original issue reported on code.google.com by herb.dom...@googlemail.com on 27 Aug 2008 at 9:35

GoogleCodeExporter commented 8 years ago

Original comment by mikechambers on 7 Nov 2008 at 7:32

GoogleCodeExporter commented 8 years ago
Fixed in r82 - http://code.google.com/p/as3corelib/source/detail?r=82

Original comment by darron.schall on 19 Nov 2008 at 9:00