mirror of
https://github.com/alibaba/fastjson.git
synced 2026-10-29 06:06:50 +08:00
add testcase.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.alibaba.json.bvt.parser.deser.floatDeser;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* Created by wenshao on 14/04/2017.
|
||||
*/
|
||||
public class EmptStringTest extends TestCase {
|
||||
public void test_emptyString() throws Exception {
|
||||
Model model = JSON.parseObject("{\"value\":\"\"}", Model.class);
|
||||
assertEquals(0f, model.value);
|
||||
}
|
||||
|
||||
public static class Model {
|
||||
public float value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user