package com.alibaba.json.bvt.parser.deser.list;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.junit.Assert;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.serializer.SerializerFeature;

import junit.framework.TestCase;

public class ListStringFieldTest_array_big extends TestCase {
    public void test_list() throws Exception {
        Model model = new Model();
        model.values = new ArrayList<String>();
        for (int i = 0; i < 1000; ++i) {
            char[] chars = new char[512];
            Arrays.fill(chars, (char) ('0' + (i % 10))); 
            model.values.add(new String(chars));
        }
        
        String text = JSON.toJSONString(model, SerializerFeature.BeanToArray);
        
        Model model2 = JSON.parseObject(text, Model.class, Feature.SupportArrayToBean);
        Assert.assertEquals(model.values.size(), model2.values.size());
        for (int i = 0; i < model.values.size(); ++i) {
            Assert.assertEquals(model.values.get(i), model2.values.get(i));    
        }
    }

    public static class Model {
        public List<String> values;
    }
}

@@ -1116,16 +1116,566 @@
  %7D%0A    %7D
+%0A    %0A    public void test_list_empty() throws Exception %7B%0A        Model model = new Model();%0A        model.values = new ArrayList%3CString%3E();%0A        %0A        String text = JSON.toJSONString(model, SerializerFeature.BeanToArray);%0A        %0A        Model model2 = JSON.parseObject(text, Model.class, Feature.SupportArrayToBean);%0A        Assert.assertEquals(model.values.size(), model2.values.size());%0A        for (int i = 0; i %3C model.values.size(); ++i) %7B%0A            Assert.assertEquals(model.values.get(i), model2.values.get(i));    %0A        %7D%0A    %7D
 %0A%0A    pu

add testcase