提交 39a2c357 authored 作者: Thomas Mueller's avatar Thomas Mueller

Only run the spatial tests only if the JTS jar file is in the classpath.

上级 0da3e2b3
...@@ -10,6 +10,8 @@ import java.sql.ResultSet; ...@@ -10,6 +10,8 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import org.h2.test.TestBase; import org.h2.test.TestBase;
import org.h2.value.DataType;
import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.geom.Polygon;
...@@ -30,10 +32,12 @@ public class TestSpatial extends TestBase { ...@@ -30,10 +32,12 @@ public class TestSpatial extends TestBase {
@Override @Override
public void test() throws SQLException { public void test() throws SQLException {
deleteDb("spatial"); if (DataType.GEOMETRY_CLASS != null) {
testSpatialValues(); deleteDb("spatial");
testMemorySpatialIndex(); testSpatialValues();
deleteDb("spatial"); testMemorySpatialIndex();
deleteDb("spatial");
}
} }
private void testSpatialValues() throws SQLException { private void testSpatialValues() throws SQLException {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论