diff --git a/.gitignore b/.gitignore
index e5053ab7..d85f383d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,7 @@ testng/
# IntelliJ files
*.iml
-.idea/
\ No newline at end of file
+.idea/
+
+# MacOS
+.DS_Store
diff --git a/src/main/java/org/opengis/cite/gpkg12/TableVerifier.java b/src/main/java/org/opengis/cite/gpkg12/TableVerifier.java
index 397cdf0f..7e0504bb 100644
--- a/src/main/java/org/opengis/cite/gpkg12/TableVerifier.java
+++ b/src/main/java/org/opengis/cite/gpkg12/TableVerifier.java
@@ -126,6 +126,7 @@ private static void verifyColumns(final Connection connection
throw new RuntimeException(String.format("Required column: %s.%s is missing", tableName, column.getKey())); // TODO this needs to be in the error string table
}
+ // We shouldn't be picky on table defaults as long as the content is correct
final ColumnDefinition columnDefinition = columns.get(column.getKey());
if(columnDefinition != null)
@@ -133,7 +134,7 @@ private static void verifyColumns(final Connection connection
if(!columnDefinition.equals(column.getValue()) ||
!checkExpressionEquivalence(connection,
columnDefinition.getDefaultValue(),
- column.getValue().getDefaultValue())) // .equals() for ColumnDefinition skips comparing default values. It's better to check for functional equivalence rather than exact string equality. This avoids issues with difference in white space as well as other trivial annoyances
+ column.getValue().getDefaultValue()))
{
throw new RuntimeException(String.format("Required column %s is defined as:\n%s\nbut should be:\n%s",
column.getKey(),
@@ -145,20 +146,40 @@ private static void verifyColumns(final Connection connection
}
}
+ /**
+ * .equals() for ColumnDefinition skips comparing default values.
+ * It's better to check for functional equivalence
+ * rather than exact string equality.
+ * This avoids issues with difference in white space
+ * as well as other trivial annoyances.
+ * @param connection
+ * @param definition
+ * @param required
+ * @return
+ * @throws SQLException
+ */
private static boolean checkExpressionEquivalence(final Connection connection,
- final String expression1,
- final String expression2) throws SQLException
+ final String definition,
+ final String required) throws SQLException
{
- if((expression1 == null) || (expression2 == null))
+ if((definition == null) || (required == null))
{
- return (expression1 == null) && (expression2 == null);
+ return (definition == null) && (required == null);
}
+ // Sometimes people use a synonym here and functional equivalence
+ // isn't possible because now is always changing
+ if(required.replaceAll("\\s+","").equalsIgnoreCase("strftime('%Y-%m-%dT%H:%M:%fZ','now')")){
+ if (definition.replaceAll("\\s+","").equalsIgnoreCase("strftime('%Y-%m-%dT%H:%M:%fZ',current_timestamp)")){
+ return true;
+ }
+ }
+
try(final Statement statement = connection.createStatement())
{
final String query = String.format("SELECT (%s) = (%s);",
- expression1,
- expression2);
+ definition,
+ required);
try(final ResultSet results = statement.executeQuery(query))
{
diff --git a/src/main/java/org/opengis/cite/gpkg12/core/DataContentsTests.java b/src/main/java/org/opengis/cite/gpkg12/core/DataContentsTests.java
index 0d3e6fff..a30c9789 100644
--- a/src/main/java/org/opengis/cite/gpkg12/core/DataContentsTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/core/DataContentsTests.java
@@ -36,7 +36,7 @@
*
*
*
* @author Luke Lambert
@@ -49,13 +49,13 @@ public class DataContentsTests extends CommonFixture
* "http://www.geopackage.org/spec/#table_column_data_types">GeoPackage
* Data Types.
*
- * @see File Contents - Requirement 5
*
* @throws SQLException
* If an SQL query causes an error
*/
- @Test(description = "See OGC 12-128r12: Requirement 5")
+ @Test(description = "See OGC 12-128r14: Requirement 5")
public void columnDataTypes() throws SQLException
{
// 1
@@ -103,13 +103,13 @@ public void columnDataTypes() throws SQLException
* "http://www.geopackage.org/spec/#gpkg_contents_sql">gpkg_contents Table
* Definition SQL.
*
- * @see Table Definition - Requirement 13
*
* @throws SQLException
* If an SQL query causes an error
*/
- @Test(description = "See OGC 12-128r12: Requirement 13")
+ @Test(description = "See OGC 12-128r14: Requirement 13")
public void contentsTableDefinition() throws SQLException
{
try
@@ -143,13 +143,13 @@ public void contentsTableDefinition() throws SQLException
* The {@code table_name} column value in a {@code gpkg_contents} table row
* SHALL contain the name of a SQLite table or view.
*
- * @see Table Data Values - Requirement 14
*
* @throws SQLException
* If an SQL query causes an error
*/
- @Test(description = "See OGC 12-128r12: Requirement 14")
+ @Test(description = "See OGC 12-128r14: Requirement 14")
public void contentsTablesExist() throws SQLException
{
final String query = "SELECT DISTINCT table_name " +
@@ -182,13 +182,13 @@ public void contentsTablesExist() throws SQLException
* and a decimal fraction of a second, with a 'Z' ('zulu') suffix
* indicating UTC.
*
- * @see Table Data Values - Requirement 15
*
* @throws SQLException
* If an SQL query causes an error
*/
- @Test(description = "See OGC 12-128r12: Requirement 15")
+ @Test(description = "See OGC 12-128r14: Requirement 15")
public void timestampFormat() throws SQLException
{
// 1
@@ -224,13 +224,13 @@ public void timestampFormat() throws SQLException
* reference values in the {@code gpkg_spatial_ref_sys} table {@code
* srs_id} column.
*
- * @see Table Data Values - Requirement 16
*
* @throws SQLException
* If an SQL query causes an error
*/
- @Test(description = "See OGC 12-128r12: Requirement 16")
+ @Test(description = "See OGC 12-128r14: Requirement 16")
public void srsIdReferencesSrsTable() throws SQLException
{
try(final Statement statement = this.databaseConnection.createStatement();
@@ -245,22 +245,23 @@ public void srsIdReferencesSrsTable() throws SQLException
* Verify that a GeoPackage contains a features or tiles table and
* gpkg_contents table row describing it.
*
- * @see Options - Requirement 17
*
* @throws SQLException
* If an SQL query causes an error
*/
- @Test(description = "See OGC 12-128r12: Requirement 17")
+ @Test(description = "See OGC 12-128r14: Requirement 17")
public void optValidGeoPackage() throws SQLException
{
- try(final Statement statement = this.databaseConnection.createStatement();
- final ResultSet resultSet = statement.executeQuery("SELECT COUNT(*) FROM gpkg_contents WHERE data_type IN ('tiles', 'features')"))
- {
- resultSet.next();
- assertTrue(resultSet.getInt(1) > 0,
- ErrorMessage.format(ErrorMessageKeys.OPTIONS_NO_FEATURES_OR_TILES));
- }
+ //no op: requirement removed
+// try(final Statement statement = this.databaseConnection.createStatement();
+// final ResultSet resultSet = statement.executeQuery("SELECT COUNT(*) FROM gpkg_contents WHERE data_type IN ('tiles', 'features')"))
+// {
+// resultSet.next();
+// assertTrue(resultSet.getInt(1) > 0,
+// ErrorMessage.format(ErrorMessageKeys.OPTIONS_NO_FEATURES_OR_TILES));
+// }
}
private static final Pattern TEXT_TYPE = Pattern.compile("TEXT\\([0-9]+\\)");
private static final Pattern BLOB_TYPE = Pattern.compile("BLOB\\([0-9]+\\)");
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/ExtensionsTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/ExtensionsTests.java
index bdebfce3..0462cc5e 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/ExtensionsTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/ExtensionsTests.java
@@ -115,7 +115,7 @@ public void extensionsTableValues() throws SQLException
try ( // 1
final Statement statement = this.databaseConnection.createStatement();
- final ResultSet resultSet = statement.executeQuery("SELECT table_name, column_name FROM gpkg_extensions;");
+ final ResultSet resultSet = statement.executeQuery("SELECT lower(table_name) AS table_name, column_name FROM gpkg_extensions;");
) {
// 2
while (resultSet.next()) {
@@ -132,13 +132,13 @@ public void extensionsTableValues() throws SQLException
// 4
final Statement statement2 = this.databaseConnection.createStatement();
- final ResultSet resultSet2 = statement2.executeQuery("SELECT DISTINCT ge.table_name AS ge_table, sm.tbl_name FROM gpkg_extensions AS ge LEFT OUTER JOIN sqlite_master AS sm ON ge.table_name = sm.tbl_name;");
+ final ResultSet resultSet2 = statement2.executeQuery("SELECT DISTINCT lower(ge.table_name) AS ge_table, lower(sm.tbl_name) AS tbl_name FROM gpkg_extensions AS ge LEFT OUTER JOIN sqlite_master AS sm ON lower(ge.table_name) = lower(sm.tbl_name);");
) {
while (resultSet2.next()) {
// 4a
final String geTable = resultSet2.getString("ge_table");
final String tableName = resultSet2.getString("tbl_name");
- assertTrue(((geTable == null) && (tableName == null)) || tableName.equals(geTable), ErrorMessage.format(ErrorMessageKeys.INVALID_DATA_TABLE, "gpkg_extensions", geTable));
+ assertTrue(((geTable == null) && (tableName == null)) || ((tableName != null) && tableName.equals(geTable)), ErrorMessage.format(ErrorMessageKeys.INVALID_DATA_TABLE, "gpkg_extensions", geTable));
}
}
}
@@ -163,7 +163,7 @@ public void extensionsColumnValues() throws SQLException
// 1
final Statement statement = this.databaseConnection.createStatement();
- final ResultSet resultSet = statement.executeQuery("SELECT table_name, column_name FROM gpkg_extensions WHERE column_name IS NOT NULL;");
+ final ResultSet resultSet = statement.executeQuery("SELECT lower(table_name) AS table_name, lower(column_name) AS column_name FROM gpkg_extensions WHERE column_name IS NOT NULL;");
) {
// 2
while (resultSet.next()) {
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/crswkt/CRSWKT.java b/src/main/java/org/opengis/cite/gpkg12/extensions/crswkt/CRSWKT.java
index ba32d30a..5210d32e 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/crswkt/CRSWKT.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/crswkt/CRSWKT.java
@@ -34,10 +34,8 @@ public class CRSWKT extends CommonFixture
@BeforeClass
public void activeExtension(ITestContext testContext) throws SQLException {
Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
- ErrorMessage.format(ErrorMessageKeys.MISSING_TABLE, "gpkg_extensions"));
-
-
-
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "CRS WKT Extension"));
+
try (
final Statement statement = this.databaseConnection.createStatement();
final ResultSet resultSet = statement.executeQuery("SELECT count(*) from gpkg_extensions WHERE extension_name = 'gpkg_crs_wkt';");
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/elevation/ElevationTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/elevation/ElevationTests.java
index cfb9218d..fe2ba5a3 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/elevation/ElevationTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/elevation/ElevationTests.java
@@ -22,6 +22,7 @@
import org.opengis.cite.gpkg12.ErrorMessage;
import org.opengis.cite.gpkg12.ErrorMessageKeys;
import org.opengis.cite.gpkg12.tiles.TileTests;
+import org.opengis.cite.gpkg12.util.DatabaseUtility;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.BeforeClass;
@@ -49,6 +50,9 @@ public ElevationTests(){
@BeforeClass
public void a_ValidateExtensionPresent(ITestContext testContext) throws SQLException {
+ Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "Elevation Extension"));
+
try (
final Statement statement1 = this.databaseConnection.createStatement();
ResultSet resultSet1 = statement1.executeQuery("SELECT COUNT(*) FROM gpkg_extensions WHERE table_name = 'gpkg_2d_gridded_coverage_ancillary';");
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/metadata/MetadataTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/metadata/MetadataTests.java
index b293eb5c..8e26b5f8 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/metadata/MetadataTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/metadata/MetadataTests.java
@@ -52,7 +52,6 @@ public class MetadataTests extends CommonFixture
@BeforeClass
public void setUp() throws SQLException
{
-
this.metadataValues = new LinkedList<>();
try(final Statement statement = this.databaseConnection.createStatement())
@@ -100,6 +99,9 @@ public void activeExtension(ITestContext testContext) throws SQLException {
Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_metadata"),
ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "Metadata Option"));
} else {
+ Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "Metadata Extension"));
+
Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
ErrorMessage.format(ErrorMessageKeys.MISSING_TABLE, "gpkg_extensions"));
@@ -255,6 +257,11 @@ public void metadataReferencesTableDefinition()
@Test(description = "See OGC 12-128r13: Requirement 140")
public void metadataExtensionTableValues() throws SQLException
{
+ // This requirement was not introduced until GPKG 1.2
+ if ((getGeopackageVersion() == GeoPackageVersion.V102) || (getGeopackageVersion() == GeoPackageVersion.V110)) {
+ return;
+ }
+
try (
// 1
final Statement statement = this.databaseConnection.createStatement();
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/nonlinear/NonlinearTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/nonlinear/NonlinearTests.java
index 5787c130..1568f55b 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/nonlinear/NonlinearTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/nonlinear/NonlinearTests.java
@@ -10,6 +10,7 @@
import org.opengis.cite.gpkg12.ErrorMessage;
import org.opengis.cite.gpkg12.ErrorMessageKeys;
import org.opengis.cite.gpkg12.features.FeaturesTests;
+import org.opengis.cite.gpkg12.util.DatabaseUtility;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.BeforeClass;
@@ -46,12 +47,15 @@ public class NonlinearTests extends FeaturesTests {
*/
@BeforeClass
public void validateExtensionPresent(ITestContext testContext) throws SQLException {
+ Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "Non-Linear Geometry Types Extension"));
+
try (
final Statement statement1 = this.databaseConnection.createStatement();
ResultSet resultSet1 = statement1.executeQuery("SELECT COUNT(*) FROM gpkg_extensions WHERE extension_name LIKE 'gpkg_geom_%';");
) {
resultSet1.next();
- Assert.assertTrue(resultSet1.getInt(1) > 0, ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "RTree Spatial Index Extension"));
+ Assert.assertTrue(resultSet1.getInt(1) > 0, ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "Non-Linear Geometry Types Extension"));
}
}
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/rtreeindex/RTreeIndexTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/rtreeindex/RTreeIndexTests.java
index 84b27778..ed70d3dc 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/rtreeindex/RTreeIndexTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/rtreeindex/RTreeIndexTests.java
@@ -8,6 +8,7 @@
import org.opengis.cite.gpkg12.CommonFixture;
import org.opengis.cite.gpkg12.ErrorMessage;
import org.opengis.cite.gpkg12.ErrorMessageKeys;
+import org.opengis.cite.gpkg12.util.DatabaseUtility;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.BeforeClass;
@@ -22,7 +23,7 @@
*
*
*
* @author Jeff Yutzler
@@ -36,13 +37,16 @@ public class RTreeIndexTests extends CommonFixture {
* implementation of spatial indexes on a geometry column.
*
* @see F.8. Metadata - Requirement 75
+ * "_blank">Requirement 75
*
* @param testContext the ITestContext to use
* @throws SQLException on any error
*/
@BeforeClass
public void validateExtensionPresent(ITestContext testContext) throws SQLException {
+ Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "RTree Spatial Index Extension"));
+
try (
final Statement statement1 = this.databaseConnection.createStatement();
ResultSet resultSet1 = statement1.executeQuery("SELECT COUNT(*) FROM gpkg_extensions WHERE extension_name = 'gpkg_rtree_index';");
@@ -65,29 +69,30 @@ public void setUp() throws SQLException {
/**
* A GeoPackage that implements spatial indexes SHALL have a
- * gpkg_extensions table that contains a row for each spatially indexed
- * column with extension_name "gpkg_rtree_index", the table_name of the
- * table with a spatially indexed column, and the column_name of the
- * spatially indexed column.
+ * `gpkg_extensions` table that contains a row for each spatially
+ * indexed column with `extension_name` "gpkg_rtree_index", the
+ * `table_name` of the table with a spatially indexed column, the
+ * `column_name` of the spatially indexed column, and a `scope` of
+ * "write-only".
*
* @throws SQLException on any error
*
* @see F.8. Metadata - Requirement 76
+ * "_blank">Requirement 76
*
*/
- @Test(description = "See OGC 12-128r13: Requirement 76")
+ @Test(description = "See OGC 12-128r14: Requirement 76")
public void extensionsTableRows() throws SQLException
{
try (
final Statement statement1 = this.databaseConnection.createStatement();
- ResultSet resultSet1 = statement1.executeQuery("SELECT ge.table_name AS getn, ge.column_name AS gecn, ge.scope AS ges, ggc.column_name AS ggccn FROM gpkg_extensions ge LEFT OUTER JOIN gpkg_geometry_columns ggc ON ge.table_name = ggc.table_name WHERE extension_name = 'gpkg_rtree_index'");
+ ResultSet resultSet1 = statement1.executeQuery("SELECT table_name, column_name, scope FROM gpkg_extensions WHERE extension_name = 'gpkg_rtree_index'");
) {
while (resultSet1.next()){
- resultSet1.getString("ggccn");
+ resultSet1.getString("column_name");
Assert.assertTrue(!resultSet1.wasNull(),
- ErrorMessage.format(ErrorMessageKeys.INVALID_RTREE_REFERENCE, resultSet1.getString("getn"), resultSet1.getString("gecn")));
- Assert.assertTrue("write-only".equals(resultSet1.getString("ges")),
+ ErrorMessage.format(ErrorMessageKeys.INVALID_RTREE_REFERENCE, resultSet1.getString("table_name"), resultSet1.getString("column_name")));
+ Assert.assertTrue("write-only".equals(resultSet1.getString("scope")),
ErrorMessage.format(ErrorMessageKeys.ILLEGAL_EXTENSION_DATA_SCOPE, "gpkg_rtree_index", "write-only"));
}
}
@@ -107,10 +112,10 @@ public void extensionsTableRows() throws SQLException
* @throws SQLException on any error
*
* @see F.8. Metadata - Requirement 77
+ * "_blank">Requirement 77
*
*/
- @Test(description = "See OGC 12-128r13: Requirement 77")
+ @Test(description = "See OGC 12-128r14: Requirement 77")
public void extensionIndexImplementation() throws SQLException
{
try (
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/schema/SchemaTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/schema/SchemaTests.java
index cfd47356..08590d0f 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/schema/SchemaTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/schema/SchemaTests.java
@@ -42,8 +42,8 @@ public void activeExtension(ITestContext testContext) throws SQLException {
minIsInclusive = "minIsInclusive";
maxIsInclusive = "maxIsInclusive";
} else {
- Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
- ErrorMessage.format(ErrorMessageKeys.MISSING_TABLE, "gpkg_extensions"));
+ Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "Schema Extension"));
try (
final Statement statement = this.databaseConnection.createStatement();
diff --git a/src/main/java/org/opengis/cite/gpkg12/extensions/webp/WebPTests.java b/src/main/java/org/opengis/cite/gpkg12/extensions/webp/WebPTests.java
index ffe7ff9a..ffdc40c5 100644
--- a/src/main/java/org/opengis/cite/gpkg12/extensions/webp/WebPTests.java
+++ b/src/main/java/org/opengis/cite/gpkg12/extensions/webp/WebPTests.java
@@ -21,6 +21,7 @@
import org.opengis.cite.gpkg12.ErrorMessage;
import org.opengis.cite.gpkg12.ErrorMessageKeys;
import org.opengis.cite.gpkg12.tiles.TileTests;
+import org.opengis.cite.gpkg12.util.DatabaseUtility;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.BeforeClass;
@@ -57,6 +58,9 @@ public class WebPTests extends TileTests {
*/
@BeforeClass
public void a_ValidateExtensionPresent(ITestContext testContext) throws SQLException {
+ Assert.assertTrue(DatabaseUtility.doesTableOrViewExist(this.databaseConnection, "gpkg_extensions"),
+ ErrorMessage.format(ErrorMessageKeys.CONFORMANCE_CLASS_NOT_USED, "WebP Extension"));
+
try (
final Statement statement1 = this.databaseConnection.createStatement();
ResultSet resultSet1 = statement1.executeQuery("SELECT COUNT(*) FROM gpkg_extensions WHERE extension_name = 'gpkg_webp';");
diff --git a/src/test/java/org/opengis/cite/gpkg12/VerifyTestNGController.java b/src/test/java/org/opengis/cite/gpkg12/VerifyTestNGController.java
index 0a0eaa55..a32f4e33 100644
--- a/src/test/java/org/opengis/cite/gpkg12/VerifyTestNGController.java
+++ b/src/test/java/org/opengis/cite/gpkg12/VerifyTestNGController.java
@@ -52,26 +52,29 @@ public void loadDefaultTestRunProperties() throws InvalidPropertiesFormatExcepti
@Test
public void cleanTestRun() throws Exception {
-
+
+// runTests(ClassLoader.getSystemResource("gpkg/ek7demo-osm_tiles-20170526.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/gpkg-test-5208.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_spatial_index_extension.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_no_extensions.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/gdal_sample_v1.2_no_extensions_with_gpkg_ogr_contents.gpkg"), 0);
- runTests(ClassLoader.getSystemResource("gpkg/sample1_0.gpkg"), 1); // R77
+ runTests(ClassLoader.getSystemResource("gpkg/empty.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/states10.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/bluemarble.gpkg"), 0);
+ runTests(ClassLoader.getSystemResource("gpkg/gdal_sample.gpkg"), 0);
// runTests(ClassLoader.getSystemResource("gpkg/ERDC_Whitehorse_GeoPackage.gpkg"), 0);
runTests(ClassLoader.getSystemResource("gpkg/elevation.gpkg"), 0); // These two are the id notnull thing
- runTests(ClassLoader.getSystemResource("gpkg/empty.gpkg"), 1); // Failing on R17 which is silly because it is empty
+ runTests(ClassLoader.getSystemResource("gpkg/coastline-polyline-hydro-115mil-and-smaller.gpkg"), 0);
+ runTests(ClassLoader.getSystemResource("gpkg/sample1_0.gpkg"), 1); // R77
runTests(ClassLoader.getSystemResource("gpkg/simple_sewer_features.gpkg"), 1); // This is an invalid 1.0 or 1.1 GPKG - it has an invalid metadata table (md_standard_URI instead of md_standard_uri)
runTests(ClassLoader.getSystemResource("gpkg/sample1_1.gpkg"), 1); // R77
runTests(ClassLoader.getSystemResource("gpkg/sample1_2.gpkg"), 1); // R77
runTests(ClassLoader.getSystemResource("gpkg/sample1_2F10.gpkg"), 2); // Default "undefined", R77
- runTests(ClassLoader.getSystemResource("gpkg/gdal_sample.gpkg"), 0);
- runTests(ClassLoader.getSystemResource("gpkg/geonames_belgium.gpkg"), 5); // lower case data types, wrong date default, R77
- runTests(ClassLoader.getSystemResource("gpkg/haiti-vectors-split.gpkg"), 5); // lower case data types, wrong date default, R77
+ runTests(ClassLoader.getSystemResource("gpkg/geonames_belgium.gpkg"), 3); // lower case data types, R77
+ runTests(ClassLoader.getSystemResource("gpkg/haiti-vectors-split.gpkg"), 3); // lower case data types, R77
runTests(ClassLoader.getSystemResource("gpkg/bentiu_southsudan-osm-20170213.gpkg"), 2); //R5, R29
+// runTests(ClassLoader.getSystemResource("gpkg/ek7demo.gpkg"), 7);
}
private void runTests(URL testSubject, int fails) throws Exception {
this.testRunProps.setProperty(TestRunArg.IUT.toString(), testSubject.toURI().toString());
diff --git a/src/test/resources/gpkg/coastline-polyline-hydro-115mil-and-smaller.gpkg b/src/test/resources/gpkg/coastline-polyline-hydro-115mil-and-smaller.gpkg
new file mode 100644
index 00000000..9405e5a9
Binary files /dev/null and b/src/test/resources/gpkg/coastline-polyline-hydro-115mil-and-smaller.gpkg differ