102103104105106107108109110111112
public void test_writeTo_0() throws Exception { SerializeWriter out = new SerializeWriter(); JSONObject json = new JSONObject(); json.writeJSONString(out); Assert.assertEquals("{}", out.toString()); } public void test_writeTo_1() throws Exception {
111112113114115116117118119120121
public void test_writeTo_1() throws Exception { StringWriter out = new StringWriter(); JSONObject json = new JSONObject(); json.writeJSONString(out); Assert.assertEquals("{}", out.toString()); } public void test_writeTo_2() throws Exception {
120121122123124125126127128129130
public void test_writeTo_2() throws Exception { StringBuffer out = new StringBuffer(); JSONObject json = new JSONObject(); json.writeJSONString(out); Assert.assertEquals("{}", out.toString()); } public void test_writeTo_error() throws Exception {
129130131132133134135136137138139
public void test_writeTo_error() throws Exception { JSONException error = null; try { JSONObject json = new JSONObject(); json.writeJSONString(new ErrorAppendable()); } catch (JSONException e) { error = e; } Assert.assertNotNull(error); }