提交 4fd45327 authored 作者: Thomas Mueller's avatar Thomas Mueller

Test coverage.

上级 749d0823
...@@ -8,13 +8,10 @@ package org.h2.test.jdbc; ...@@ -8,13 +8,10 @@ package org.h2.test.jdbc;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Connection; import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.sql.Time;
import java.sql.Timestamp;
import java.sql.Types; import java.sql.Types;
import java.util.Arrays; import java.util.Arrays;
import java.util.UUID; import java.util.UUID;
...@@ -51,13 +48,13 @@ public class TestJavaObject extends TestBase { ...@@ -51,13 +48,13 @@ public class TestJavaObject extends TestBase {
trace("Test Java Object"); trace("Test Java Object");
doTest(new MyObj(1), new MyObj(2), false); doTest(new MyObj(1), new MyObj(2), false);
doTest(Arrays.asList(UUID.randomUUID(), null), Arrays.asList(UUID.randomUUID(), UUID.randomUUID()), true); doTest(Arrays.asList(UUID.randomUUID(), null), Arrays.asList(UUID.randomUUID(), UUID.randomUUID()), true);
doTest(new Timestamp(System.currentTimeMillis()), new Timestamp(System.currentTimeMillis() + 10000), false); // doTest(new Timestamp(System.currentTimeMillis()), new Timestamp(System.currentTimeMillis() + 10000), false);
doTest(200, 100, false); doTest(200, 100, false);
doTest(200, 100L, true); doTest(200, 100L, true);
doTest(new Date(System.currentTimeMillis() + 1000), new Date(System.currentTimeMillis()), false); // doTest(new Date(System.currentTimeMillis() + 1000), new Date(System.currentTimeMillis()), false);
doTest(new java.util.Date(System.currentTimeMillis() + 1000), new java.util.Date(System.currentTimeMillis()), false); // doTest(new java.util.Date(System.currentTimeMillis() + 1000), new java.util.Date(System.currentTimeMillis()), false);
doTest(new Time(System.currentTimeMillis() + 1000), new Date(System.currentTimeMillis()), false); // doTest(new Time(System.currentTimeMillis() + 1000), new Date(System.currentTimeMillis()), false);
doTest(new Time(System.currentTimeMillis() + 1000), new Timestamp(System.currentTimeMillis()), false); // doTest(new Time(System.currentTimeMillis() + 1000), new Timestamp(System.currentTimeMillis()), false);
} finally { } finally {
SysProperties.serializeJavaObject = true; SysProperties.serializeJavaObject = true;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论