Test for issue 212.
()
| 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 | } |
nothing calls this directly
no test coverage detected