Skip to content

Commit

Permalink
test initfromschema
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Sep 17, 2023
1 parent f75c8c9 commit 779cdfe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/geoarrow/array_writer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 779cdfe

Please sign in to comment.