Package com.alibaba.json.bvt.bug

Source Code of com.alibaba.json.bvt.bug.Bug_for_jiangwei1

package com.alibaba.json.bvt.bug;

import junit.framework.Assert;
import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;


public class Bug_for_jiangwei1 extends TestCase {
    public void test_double() throws Exception {
        JSONObject json = JSON.parseObject("{\"val\":12.3}");
        Assert.assertEquals(12.3D, json.getDoubleValue("val"));
    }
   
    public void test_JSONArray_double() throws Exception {
        JSONArray json = JSON.parseArray("[12.3]");
        Assert.assertEquals(12.3D, json.getDoubleValue(0));
    }
}
TOP

Related Classes of com.alibaba.json.bvt.bug.Bug_for_jiangwei1

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.