mirror of
https://github.com/alibaba/fastjson.git
synced 2026-10-28 22:04:04 +08:00
improved testcase
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.alibaba.json.bvt.bug;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
@@ -9,7 +11,9 @@ public class Bug_for_DiffType extends TestCase {
|
||||
Model model = new Model();
|
||||
model.setValue(1001);
|
||||
|
||||
JSON.toJSONString(model);
|
||||
String text = JSON.toJSONString(model);
|
||||
Model model2 = JSON.parseObject(text, Model.class);
|
||||
Assert.assertEquals(model.value, model2.value);
|
||||
}
|
||||
|
||||
public static class Model {
|
||||
|
||||
Reference in New Issue
Block a user