Skip to content
Prev Previous commit
Next Next commit
Added close statements for parser
  • Loading branch information
rbrinkster committed Jun 22, 2015
commit 66c17bf709fe4c0ef212e3fe16af889349367b53
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void testEmptyObject() throws JSONException {

assertEquals(JsonParser.Event.START_OBJECT, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
parser.close();
}

@Test
Expand All @@ -60,6 +61,7 @@ public void testSimpleObject() throws JSONException {
assertEquals(JsonParser.Event.KEY_NAME, parser.next());
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
parser.close();
}

@Test
Expand All @@ -79,6 +81,7 @@ public void testArray() throws JSONException {
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
assertEquals(JsonParser.Event.END_ARRAY, parser.next());
parser.close();
}

@Test
Expand All @@ -100,6 +103,7 @@ public void testNestedStructure() throws JSONException {
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
assertEquals(JsonParser.Event.END_ARRAY, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
parser.close();
}

}