mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 16:00:51 -07:00
Updates tests to include all opt methods and verify for missing keys.
This commit is contained in:
parent
62524b531d
commit
a2c311527b
2 changed files with 47 additions and 6 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue