Skip to content

Commit feb4a6f

Browse files
committed
More JSON5 test cases
1 parent 5d04bfa commit feb4a6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

convex-core/src/test/java/convex/core/utils/JSONUtilsTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ public void testParse() {
8585
assertThrows(ParseException.class,()->JSONUtils.parse("{"));
8686
assertThrows(ParseException.class,()->JSONUtils.parse("3]"));
8787
assertThrows(ParseException.class,()->JSONUtils.parse("[,]"));
88+
assertThrows(ParseException.class,()->JSONUtils.parse("{,}"));
8889

8990
// Trailing commas allowed
9091
assertEquals(JSONUtils.parse("[3]"),JSONUtils.parse("[3,]"));
92+
assertEquals(JSONUtils.parse("[1, 3]"),JSONUtils.parse("[1,3, ]"));
9193
assertEquals(JSONUtils.parse("{\"foo\":1}"),JSONUtils.parse("{\"foo\":1,}"));
9294

9395

0 commit comments

Comments
 (0)