Skip to content

Commit

Permalink
Update gson/src/test/java/com/google/gson/GsonTest.java
Browse files Browse the repository at this point in the history
Co-authored-by: Marcono1234 <[email protected]>
  • Loading branch information
elevne and Marcono1234 committed Jul 29, 2023
1 parent 760dbea commit 9c57a4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gson/src/test/java/com/google/gson/GsonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ public void testNewJsonWriter_Default() throws IOException {
jsonWriter.value(true);
jsonWriter.endObject();

// Additional top-level value
IllegalStateException e = assertThrows(IllegalStateException.class, () -> jsonWriter.value(1));
assertThat(e).hasMessageThat().isEqualTo("JSON must have only one top-level value.");

Expand Down

0 comments on commit 9c57a4d

Please sign in to comment.