From 8bc62cb85b0f876cfe160f77390c18adcd78ec4a Mon Sep 17 00:00:00 2001 From: Codegass Date: Wed, 20 Mar 2024 14:39:32 -0400 Subject: [PATCH] add value checking for the testWriterCloseIsIdempotent test case (#2652) --- gson/src/test/java/com/google/gson/stream/JsonWriterTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gson/src/test/java/com/google/gson/stream/JsonWriterTest.java b/gson/src/test/java/com/google/gson/stream/JsonWriterTest.java index 13857696e0..d9435f5600 100644 --- a/gson/src/test/java/com/google/gson/stream/JsonWriterTest.java +++ b/gson/src/test/java/com/google/gson/stream/JsonWriterTest.java @@ -970,7 +970,9 @@ public void testWriterCloseIsIdempotent() throws IOException { writer.beginArray(); writer.endArray(); writer.close(); + assertThat(stringWriter.toString()).isEqualTo("[]"); writer.close(); + assertThat(stringWriter.toString()).isEqualTo("[]"); } @Test