MCPcopy
hub / github.com/google/gson / testParseComments

Method testParseComments

src/test/java/com/google/gson/CommentsTest.java:32–44  ·  view source on GitHub ↗

Test for issue 212.

()

Source from the content-addressed store, hash-verified

30 * Test for issue 212.
31 */
32 public void testParseComments() {
33 String json = "[\n"
34 + " // this is a comment\n"
35 + " \"a\",\n"
36 + " /* this is another comment */\n"
37 + " \"b\",\n"
38 + " # this is yet another comment\n"
39 + " \"c\"\n"
40 + "]";
41
42 List<String> abc = new Gson().fromJson(json, new TypeToken<List<String>>() {}.getType());
43 assertEquals(Arrays.asList("a", "b", "c"), abc);
44 }
45}

Callers

nothing calls this directly

Calls 3

fromJsonMethod · 0.80
assertEqualsMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected