diff --git a/src/geoarrow/array_writer_test.cc b/src/geoarrow/array_writer_test.cc index 08c5c281..7e24105a 100644 --- a/src/geoarrow/array_writer_test.cc +++ b/src/geoarrow/array_writer_test.cc @@ -6,12 +6,21 @@ #include "wkx_testing.hpp" -TEST(ArrayWriterTest, ArrayWriterTestBasic) { +TEST(ArrayWriterTest, ArrayWriterTestInitFromType) { struct GeoArrowArrayWriter writer; ASSERT_EQ(GeoArrowArrayWriterInitFromType(&writer, GEOARROW_TYPE_WKT), GEOARROW_OK); GeoArrowArrayWriterReset(&writer); } +TEST(ArrayWriterTest, ArrayWriterTestInitFromSchema) { + struct GeoArrowArrayWriter writer; + struct ArrowSchema schema; + ASSERT_EQ(GeoArrowSchemaInitExtension(&schema, GEOARROW_TYPE_WKT), GEOARROW_OK); + ASSERT_EQ(GeoArrowArrayWriterInitFromSchema(&writer, &schema), GEOARROW_OK); + schema.release(&schema); + GeoArrowArrayWriterReset(&writer); +} + TEST(ArrayWriterTest, ArrayWriterTestWKT) { struct GeoArrowArrayWriter writer; ASSERT_EQ(GeoArrowArrayWriterInitFromType(&writer, GEOARROW_TYPE_WKT), GEOARROW_OK);