mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Add test to demonstrate the issue. See #573
This commit is contained in:
@@ -115,10 +115,17 @@ public class JSONObjectTest {
|
||||
.put("key2", 2)
|
||||
.put("key3", new String(string1));
|
||||
|
||||
assertFalse("Should eval to false", obj1.similar(obj2));
|
||||
JSONObject obj4 = new JSONObject()
|
||||
.put("key1", "abc")
|
||||
.put("key2", 2.0)
|
||||
.put("key3", new String(string1));
|
||||
|
||||
assertFalse("Should eval to false", obj1.similar(obj2));
|
||||
|
||||
assertTrue("Should eval to true", obj1.similar(obj3));
|
||||
|
||||
assertTrue("Should eval to true", obj1.similar(obj4));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user