* Test a basic JSON Array construction and helper 'put' function
*/
public void test_putIntPosition() {
Exception ex = null;
try {
JSONArray jArray = new JSONArray();
// Put the int at the noted position (1)
jArray.put(5, 1);
System.out.println(jArray.toString());
assertTrue(jArray.size() == 6);
Integer i = (Integer)jArray.get(5);
assertTrue(i != null);
assertTrue(i instanceof java.lang.Integer);
assertTrue(jArray.getInt(5) == 1);
// Verify that the 0 position is a null (expanded)
i = (Integer)jArray.get(3);
assertTrue(i == null);
System.out.println(jArray.toString());
} catch (Exception ex1) {
ex = ex1;
ex.printStackTrace();
}
assertTrue(ex == null);