This is an automated email from the ASF dual-hosted git repository.

willayd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a53325a clean: Assorted Meson and clang-tidy fixes (#673)
3a53325a is described below

commit 3a53325a3c0782582e70c19780edbdd0764112bc
Author: William Ayd <[email protected]>
AuthorDate: Mon Nov 4 09:19:21 2024 -0500

    clean: Assorted Meson and clang-tidy fixes (#673)
---
 .github/workflows/build-and-test.yaml |  1 +
 meson.build                           |  5 +++++
 src/nanoarrow/ipc/decoder_test.cc     | 23 ++++++++++++-----------
 3 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/build-and-test.yaml 
b/.github/workflows/build-and-test.yaml
index db2f6abc..127917ed 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -28,6 +28,7 @@ on:
       - 'CMakeLists.txt'
       - '.github/workflows/build-and-test.yaml'
       - 'src/nanoarrow/**'
+      - 'meson.build'
 
 permissions:
   contents: read
diff --git a/meson.build b/meson.build
index 3a9aa8a2..595b4003 100644
--- a/meson.build
+++ b/meson.build
@@ -46,6 +46,11 @@ add_project_arguments(
     language : 'cpp'
 )
 
+if get_option('buildtype') in ['debug', 'debugoptimized']
+    add_project_arguments('-DNANOARROW_DEBUG', language: 'c')
+    add_project_arguments('-DNANOARROW_DEBUG', language: 'cpp')
+endif
+
 nanoarrow_dep_args = []
 if host_machine.system() == 'windows' and get_option('default_library') == 
'shared'
   add_project_arguments(['-DNANOARROW_BUILD_DLL', '-DNANOARROW_EXPORT_DLL'], 
language: 'c')
diff --git a/src/nanoarrow/ipc/decoder_test.cc 
b/src/nanoarrow/ipc/decoder_test.cc
index 078fcf70..29209ec7 100644
--- a/src/nanoarrow/ipc/decoder_test.cc
+++ b/src/nanoarrow/ipc/decoder_test.cc
@@ -856,14 +856,14 @@ TEST_P(ArrowTypeParameterizedTestFixture, 
NanoarrowIpcNanoarrowArrayRoundtrip) {
     EXPECT_EQ(ArrowIpcDecoderSetSchema(decoder.get(), schema.get(), &error), 
NANOARROW_OK)
         << error.message;
     EXPECT_EQ(ArrowIpcDecoderDecodeHeader(decoder.get(),
-                                          {buffer->data, buffer->size_bytes}, 
&error),
+                                          {{buffer->data}, 
buffer->size_bytes}, &error),
               NANOARROW_OK)
         << error.message;
 
     struct ArrowArrayView* roundtripped;
-    ASSERT_EQ(ArrowIpcDecoderDecodeArrayView(decoder.get(),
-                                             {body_buffer->data, 
body_buffer->size_bytes},
-                                             -1, &roundtripped, nullptr),
+    ASSERT_EQ(ArrowIpcDecoderDecodeArrayView(
+                  decoder.get(), {{body_buffer->data}, 
body_buffer->size_bytes}, -1,
+                  &roundtripped, nullptr),
               NANOARROW_OK);
 
     AssertArrayViewIdentical(roundtripped, array_view.get());
@@ -1232,26 +1232,27 @@ TEST(NanoarrowIpcTest, 
NanoarrowIpcFooterDecodingErrors) {
   ArrowIpcDecoderInit(decoder.get());
 
   // not enough data to get the size+magic
-  EXPECT_EQ(ArrowIpcDecoderPeekFooter(decoder.get(), {nullptr, 3}, &error), 
ESPIPE)
+  EXPECT_EQ(ArrowIpcDecoderPeekFooter(decoder.get(), {{nullptr}, 3}, &error), 
ESPIPE)
       << error.message;
 
   // doesn't end with magic
-  EXPECT_EQ(ArrowIpcDecoderPeekFooter(decoder.get(), {"\0\0\0\0blargh", 10}, 
&error),
+  EXPECT_EQ(ArrowIpcDecoderPeekFooter(decoder.get(), {{"\0\0\0\0blargh"}, 10}, 
&error),
             EINVAL)
       << error.message;
 
   // negative size
   EXPECT_EQ(ArrowIpcDecoderPeekFooter(decoder.get(),
-                                      {"\xFF\xFF\xFF\xFF"
-                                       "ARROW1",
+                                      {{"\xFF\xFF\xFF\xFF"
+                                        "ARROW1"},
                                        10},
                                       &error),
             EINVAL)
       << error.message;
 
   // PeekFooter doesn't check for available data
-  EXPECT_EQ(ArrowIpcDecoderPeekFooter(decoder.get(), {"\xFF\xFF\0\0ARROW1", 
10}, &error),
-            NANOARROW_OK)
+  EXPECT_EQ(
+      ArrowIpcDecoderPeekFooter(decoder.get(), {{"\xFF\xFF\0\0ARROW1"}, 10}, 
&error),
+      NANOARROW_OK)
       << error.message;
   EXPECT_EQ(decoder->header_size_bytes, 0xFFFF);
 
@@ -1259,7 +1260,7 @@ TEST(NanoarrowIpcTest, NanoarrowIpcFooterDecodingErrors) {
 
   // VerifyFooter *does* check for enough available data
   EXPECT_EQ(
-      ArrowIpcDecoderVerifyFooter(decoder.get(), {"\xFF\xFF\0\0ARROW1", 10}, 
&error),
+      ArrowIpcDecoderVerifyFooter(decoder.get(), {{"\xFF\xFF\0\0ARROW1"}, 10}, 
&error),
       ESPIPE)
       << error.message;
   EXPECT_EQ(decoder->header_size_bytes, 0xFFFF);

Reply via email to