Skip to content

Commit

Permalink
missing coverage lines
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Nov 27, 2023
1 parent 77f95dd commit 4ef3c67
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/nanoarrow/nanoarrow_testing_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,31 @@ TEST(NanoarrowTestingTest, NanoarrowTestingTestFieldMap) {
R"(], "metadata": null})");
}

TEST(NanoarrowTestingTest, NanoarrowTestingTestFieldStruct) {
// Empty
TestFieldRoundtrip(
R"({"name": null, "nullable": true, "type": {"name": "struct"}, "children": [)"
R"(], "metadata": null})");

// Non-empty
TestFieldRoundtrip(
R"({"name": null, "nullable": true, "type": {"name": "struct"}, "children": [)"
R"({"name": null, "nullable": true, "type": {"name": "null"}, "children": [], "metadata": null})"
R"(], "metadata": null})");
}

TEST(NanoarrowTestingTest, NanoarrowTestingTestFieldList) {
TestFieldRoundtrip(
R"({"name": null, "nullable": true, "type": {"name": "list"}, "children": [)"
R"({"name": null, "nullable": true, "type": {"name": "null"}, "children": [], "metadata": null})"
R"(], "metadata": null})");

TestFieldRoundtrip(
R"({"name": null, "nullable": true, "type": {"name": "largelist"}, "children": [)"
R"({"name": null, "nullable": true, "type": {"name": "null"}, "children": [], "metadata": null})"
R"(], "metadata": null})");
}

TEST(NanoarrowTestingTest, NanoarrowTestingTestFieldFixedSizeList) {
TestFieldRoundtrip(
R"({"name": null, "nullable": true, "type": {"name": "fixedsizelist", "listSize": 12}, "children": [)"
Expand Down

0 comments on commit 4ef3c67

Please sign in to comment.