mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05: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