mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-10 12:34:30 +08:00
Updates tests to include all opt methods and verify for missing keys.
This commit is contained in:
@@ -373,7 +373,10 @@ public class JSONArrayTest {
|
||||
assertTrue("Array opt value out of range",
|
||||
null == jsonArray.opt(-1));
|
||||
|
||||
assertTrue("Array opt boolean",
|
||||
assertTrue("Array opt value out of range",
|
||||
null == jsonArray.opt(jsonArray.length()));
|
||||
|
||||
assertTrue("Array opt boolean",
|
||||
Boolean.TRUE == jsonArray.optBoolean(0));
|
||||
assertTrue("Array opt boolean default",
|
||||
Boolean.FALSE == jsonArray.optBoolean(-1, Boolean.FALSE));
|
||||
|
Reference in New Issue
Block a user