Skip to content

Commit 45294cb

Browse files
committed
fix test to expect parsed object
1 parent 9fe3e30 commit 45294cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/org/json/junit/JSONTokenerTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import static org.junit.Assert.assertEquals;
88
import static org.junit.Assert.assertFalse;
9-
import static org.junit.Assert.assertThrows;
9+
import static org.junit.Assert.assertSame;
1010
import static org.junit.Assert.assertTrue;
1111
import static org.junit.Assert.fail;
1212

@@ -331,6 +331,7 @@ public void testAutoClose(){
331331
public void testInvalidInput_shouldThrowJSONException() {
332332
String input = "{\"invalidInput\": [],}";
333333
JSONTokener tokener = new JSONTokener(input);
334-
assertThrows(JSONException.class, () -> tokener.nextValue());
334+
Object value = tokener.nextValue();
335+
assertEquals(new JSONObject(input).toString(), value.toString());
335336
}
336337
}

0 commit comments

Comments
 (0)