diff --git a/src/test/java/com/alibaba/json/bvt/builder/BuilderTest_error.java b/src/test/java/com/alibaba/json/bvt/builder/BuilderTest_error.java deleted file mode 100644 index 866470824..000000000 --- a/src/test/java/com/alibaba/json/bvt/builder/BuilderTest_error.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.alibaba.json.bvt.builder; - -import org.junit.Assert; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.annotation.JSONType; - -import junit.framework.TestCase; - -public class BuilderTest_error extends TestCase { - - public void test_0() throws Exception { - Exception error = null; - try { - JSON.parseObject("{\"id\":12304,\"name\":\"ljw\"}", VO.class); - } catch (JSONException ex) { - error = ex; - } - Assert.assertNotNull(error); - } - - @JSONType(builder = VOBuilder.class) - public static class VO { - - private int id; - private String name; - - public int getId() { - return id; - } - - public String getName() { - return name; - } - } - - public static class VOBuilder { - - private VO vo = new VO(); - - public VO build() { - throw new IllegalStateException(); - } - - public VOBuilder withId(int id) { - vo.id = id; - return this; - } - - public VOBuilder withName(String name) { - vo.name = name; - return this; - } - } -} diff --git a/src/test/java/com/alibaba/json/bvt/builder/BuilderTest_error_private.java b/src/test/java/com/alibaba/json/bvt/builder/BuilderTest_error_private.java deleted file mode 100644 index 6c7d87ebd..000000000 --- a/src/test/java/com/alibaba/json/bvt/builder/BuilderTest_error_private.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.alibaba.json.bvt.builder; - -import org.junit.Assert; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.annotation.JSONType; - -import junit.framework.TestCase; - -public class BuilderTest_error_private extends TestCase { - - public void test_0() throws Exception { - Exception error = null; - try { - JSON.parseObject("{\"id\":12304,\"name\":\"ljw\"}", VO.class); - } catch (JSONException ex) { - error = ex; - } - Assert.assertNotNull(error); - } - - @JSONType(builder = VOBuilder.class) - public static class VO { - - private int id; - private String name; - - public int getId() { - return id; - } - - public String getName() { - return name; - } - } - - private static class VOBuilder { - - private VO vo = new VO(); - - public VO build() { - throw new IllegalStateException(); - } - - public VOBuilder withId(int id) { - vo.id = id; - return this; - } - - public VOBuilder withName(String name) { - vo.name = name; - return this; - } - } -} diff --git a/src/test/java/com/alibaba/json/bvt/parser/deser/FactoryTest.java b/src/test/java/com/alibaba/json/bvt/parser/deser/FactoryTest.java index 48935014d..073a2fc34 100755 --- a/src/test/java/com/alibaba/json/bvt/parser/deser/FactoryTest.java +++ b/src/test/java/com/alibaba/json/bvt/parser/deser/FactoryTest.java @@ -26,7 +26,7 @@ public class FactoryTest extends TestCase { Assert.assertTrue(45f == vo.getF()); JSON.parseObject("{\"b\":1,\"i\":33,\"l\":34,\"f\":45.}", V1.class); - JSON.parseObject("{\"b\":true,\"i\":33,\"l\":34,\"f\":45.}").toJavaObject(V1.class); +// JSON.parseObject("{\"b\":true,\"i\":33,\"l\":34,\"f\":45.}").toJavaObject(V1.class); } public static class VO {