Skip to content

Commit

Permalink
Added close statements for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrinkster committed Jun 22, 2015
1 parent 6885adf commit 66c17bf
Showing 1 changed file with 4 additions and 0 deletions.
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();
}

}

0 comments on commit 66c17bf

Please sign in to comment.