Skip to content

Commit

Permalink
Update gson/src/test/java/com/google/gson/ToNumberPolicyTest.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 87c20bc commit b402098
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gson/src/test/java/com/google/gson/ToNumberPolicyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ public void testLongOrDouble() throws IOException {

e = assertThrows(MalformedJsonException.class, () -> strategy.readNumber(fromString("NaN")));
assertThat(e).hasMessageThat().isEqualTo(
"Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $"
+ "\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");
"Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $"
+ "\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");

e = assertThrows(MalformedJsonException.class, () -> strategy.readNumber(fromString("Infinity")));
assertThat(e).hasMessageThat().isEqualTo(
"Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $"
+ "\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");
"Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $"
+ "\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");

e = assertThrows(MalformedJsonException.class, () -> strategy.readNumber(fromString("-Infinity")));
assertThat(e).hasMessageThat().isEqualTo(
"Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $"
+ "\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");
"Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $"
+ "\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");
}

@Test
Expand Down

0 comments on commit b402098

Please sign in to comment.