mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-29 23:42:40 +02:00
java: added testcases for empty array and empty map
This commit is contained in:
parent
b4fc79c38e
commit
c43e5e0c95
@ -177,6 +177,9 @@ public class TestPackUnpack {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testArray() throws Exception {
|
public void testArray() throws Exception {
|
||||||
|
List<Integer> emptyList = new ArrayList<Integer>();
|
||||||
|
testArray(emptyList, Schema.parse("(array int)"));
|
||||||
|
|
||||||
for (int i = 0; i < 1000; i++) {
|
for (int i = 0; i < 1000; i++) {
|
||||||
Schema schema = Schema.parse("(array int)");
|
Schema schema = Schema.parse("(array int)");
|
||||||
List<Integer> l = new ArrayList<Integer>();
|
List<Integer> l = new ArrayList<Integer>();
|
||||||
@ -209,6 +212,9 @@ public class TestPackUnpack {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMap() throws Exception {
|
public void testMap() throws Exception {
|
||||||
|
Map<Integer, Integer> emptyMap = new HashMap<Integer, Integer>();
|
||||||
|
testMap(emptyMap, Schema.parse("(map int int)"));
|
||||||
|
|
||||||
for (int i = 0; i < 1000; i++) {
|
for (int i = 0; i < 1000; i++) {
|
||||||
Schema schema = Schema.parse("(map int int)");
|
Schema schema = Schema.parse("(map int int)");
|
||||||
Map<Integer, Integer> m = new HashMap<Integer, Integer>();
|
Map<Integer, Integer> m = new HashMap<Integer, Integer>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user