java: added testcases for empty array and empty map

This commit is contained in:
Kazuki Ohta 2010-05-23 01:31:15 +09:00
parent b4fc79c38e
commit c43e5e0c95

View File

@ -177,6 +177,9 @@ public class TestPackUnpack {
@Test
public void testArray() throws Exception {
List<Integer> emptyList = new ArrayList<Integer>();
testArray(emptyList, Schema.parse("(array int)"));
for (int i = 0; i < 1000; i++) {
Schema schema = Schema.parse("(array int)");
List<Integer> l = new ArrayList<Integer>();
@ -209,6 +212,9 @@ public class TestPackUnpack {
@Test
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++) {
Schema schema = Schema.parse("(map int int)");
Map<Integer, Integer> m = new HashMap<Integer, Integer>();