Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification in test cases #2454

Merged
merged 16 commits into from
Jul 29, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions gson/src/test/java/com/google/gson/JsonParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@
*/
public class JsonParserTest {

@Test
@Test(expected = JsonSyntaxException.class)
public void testParseInvalidJson() {
try {
JsonParser.parseString("[[]");
fail();
} catch (JsonSyntaxException expected) { }
JsonParser.parseString("[[]");
}

@Test
Expand Down Expand Up @@ -79,13 +76,9 @@ public void testParseUnquotedSingleWordStringFails() {
assertThat(JsonParser.parseString("Test").getAsString()).isEqualTo("Test");
}

@Test
@Test(expected = JsonSyntaxException.class)
public void testParseUnquotedMultiWordStringFails() {
String unquotedSentence = "Test is a test..blah blah";
try {
JsonParser.parseString(unquotedSentence);
fail();
} catch (JsonSyntaxException expected) { }
JsonParser.parseString("Test is a test..blah blah");
}

@Test
Expand Down