Skip to content

Commit

Permalink
TEst Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sheinbergon committed Dec 23, 2023
1 parent 9935553 commit 5b04585
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[![Github Workflow Status](https://img.shields.io/github/actions/workflow/status/sheinbergon/dremio-udf-gis/release-ci.yml?branch=23.1.x&logo=githubactions&style=for-the-badge)](https://github.com/sheinbergon/dremio-udf-gis/actions?query=workflow%3Arelease-actions)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/sheinbergon/dremio-udf-gis?logo=github&color=%2340E0D0&style=for-the-badge)](https://github.com/sheinbergon/dremio-udf-gis/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/org.sheinbergon/dremio-udf-gis?logo=apachemaven&color=Crimson&style=for-the-badge)](https://search.maven.org/search?q=g:org.sheinbergon%20a:dremio-udf-gis*)
[![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/sheinbergon/dremio-udf-gis?logo=snyk&color=432f95&style=for-the-badge)](https://app.snyk.io/org/sheinbergon/project/94183993-505b-439c-9078-6276fa4c1626)
[![Coveralls](https://img.shields.io/coveralls/github/sheinbergon/dremio-udf-gis?logo=coveralls&style=for-the-badge)](https://coveralls.io/github/sheinbergon/dremio-udf-gis)
[![Liberapay](https://img.shields.io/liberapay/patrons/sheinbergon?logo=liberapay&style=for-the-badge)](https://liberapay.com/sheinbergon/donate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ internal class STGeomFromGeoJsonTests : GeometryInputFunSpec.NullableVarChar<STG
testGeometryInput(
"Calling ST_GeomFromGeoJSON on a POINT",
"""
{"type":"Point","coordinates":[0.5,0.5]}
{"type":"Point","coordinates":[0.5,0.5],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}
""".trimIndent(),
byteArrayOf(1, 1, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, 63, 0, 0, 0, 0, 0, 0, -32, 63)
byteArrayOf(1, 1, 0, 0, 32, -26, 16, 0, 0, 0, 0, 0, 0, 0, 0, -32, 63, 0, 0, 0, 0, 0, 0, -32, 63)
)

testInvalidGeometryInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import org.sheinbergon.dremio.udf.gis.util.reset
import org.sheinbergon.dremio.udf.gis.util.setBinary
import org.sheinbergon.dremio.udf.gis.util.setUtf8
import org.sheinbergon.dremio.udf.gis.util.valueIsNotSet
import java.util.*

abstract class GeometryInputFunSpec<F : SimpleFunction, I : ValueHolder, V : Any> : FunSpec() {

Expand Down Expand Up @@ -100,10 +99,7 @@ abstract class GeometryInputFunSpec<F : SimpleFunction, I : ValueHolder, V : Any
}

private fun NullableVarBinaryHolder.valueIs(bytes: ByteArray) =
print(Arrays.toString(GeometryHelpers.toEWKB(GeometryHelpers.toGeometry(this))))
.also {
GeometryHelpers.toEWKB(GeometryHelpers.toGeometry(this)) shouldBe bytes
}
GeometryHelpers.toEWKB(GeometryHelpers.toGeometry(this)) shouldBe bytes

protected abstract fun I.set(value: V)
protected abstract val function: F
Expand Down

0 comments on commit 5b04585

Please sign in to comment.