paleolimbot commented on code in PR #334:
URL: https://github.com/apache/arrow-nanoarrow/pull/334#discussion_r1424312790


##########
extensions/nanoarrow_ipc/src/nanoarrow/nanoarrow_ipc_files_test.cc:
##########
@@ -180,6 +266,41 @@ class TestFile {
     EXPECT_TRUE(maybe_table.ValueUnsafe()->Equals(**maybe_table_arrow, true));
   }
 
+  void TestIPCCheckJSON(const std::string& dir_prefix) {
+    if (expected_return_code_ != NANOARROW_OK) {
+      GTEST_SKIP() << path_ << " is not currently supported by the IPC reader";
+    }
+
+    ArrowError error;
+    ArrowErrorInit(&error);
+
+    nanoarrow::UniqueArrayStream ipc_stream;
+    ASSERT_EQ(GetArrowArrayStreamIPC(dir_prefix, ipc_stream.get(), &error), 
NANOARROW_OK)
+        << error.message;
+
+    nanoarrow::UniqueArrayStream json_stream;
+    int result = GetArrowArrayStreamCheckJSON(dir_prefix, json_stream.get(), 
&error);
+    // Skip instead of fail for ENOTSUP
+    if (result == ENOTSUP) {
+      GTEST_SKIP() << "File contains type(s) not supported by the testing JSON 
reader: "
+                   << error.message;
+    }
+    ASSERT_EQ(result, NANOARROW_OK) << error.message;

Review Comment:
   Probably! It's a bit of a project to make that transformation in all the 
tests and hasn't been a priority so far (it only saves a few characters).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to