Skip to content

Commit

Permalink
add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jul 10, 2022
1 parent d8a370e commit adc8882
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/src/test/java/com/alibaba/fastjson2/issues/Issue513.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,24 @@ public void test2() {
public static class Bean1 {
public Collection values;
}

@Test
public void test3() {
Bean3 bean = JSON.parseObject("{\"values\":Set[\"1541357098843803649\"]}", Bean3.class);
Set set = (Set) bean.values;
assertEquals(1, set.size());
assertTrue(set.contains("1541357098843803649"));
}

public static class Bean3 {
private Collection values;

public Collection getValues() {
return values;
}

public void setValues(Collection values) {
this.values = values;
}
}
}

0 comments on commit adc8882

Please sign in to comment.