From 6e0eb0870f02efc6f9d1518058465065468751c0 Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Wed, 31 Jan 2024 10:55:38 +0800 Subject: [PATCH] fix test Signed-off-by: Yuan Zhou --- velox/common/memory/tests/MemoryAllocatorTest.cpp | 6 +++++- velox/vector/arrow/tests/ArrowBridgeArrayTest.cpp | 15 +++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/velox/common/memory/tests/MemoryAllocatorTest.cpp b/velox/common/memory/tests/MemoryAllocatorTest.cpp index 7bf2fc6a174c0..b01550568b1fd 100644 --- a/velox/common/memory/tests/MemoryAllocatorTest.cpp +++ b/velox/common/memory/tests/MemoryAllocatorTest.cpp @@ -30,6 +30,10 @@ #include #include +#ifdef linux +#include +#endif // linux + DECLARE_int32(velox_memory_pool_mb); DECLARE_bool(velox_memory_leak_check_enabled); @@ -1407,7 +1411,7 @@ TEST_P(MemoryAllocatorTest, contiguousAllocation) { ASSERT_EQ(movedAllocation.pool(), pool_.get()); *allocation = std::move(movedAllocation); ASSERT_TRUE(!allocation->empty()); // NOLINT - ASSERT_TRUE(movedAllocation.empty()); + ASSERT_TRUE(movedAllocation.empty()); // NOLINT ASSERT_EQ(allocation->pool(), pool_.get()); } ASSERT_THROW(allocation->setPool(pool_.get()), VeloxRuntimeError); diff --git a/velox/vector/arrow/tests/ArrowBridgeArrayTest.cpp b/velox/vector/arrow/tests/ArrowBridgeArrayTest.cpp index bade5c8b16dab..2679ea9ad6127 100644 --- a/velox/vector/arrow/tests/ArrowBridgeArrayTest.cpp +++ b/velox/vector/arrow/tests/ArrowBridgeArrayTest.cpp @@ -185,8 +185,9 @@ class ArrowBridgeArrayExportTest : public testing::Test { << "mismatch at index " << i; break; default: - VELOX_USER_FAIL(fmt::format( - "Timestamp unit not supported: {}.", options_.timestampUnit)); + VELOX_USER_FAIL( + "Timestamp unit not supported: {}.", + static_cast(options_.timestampUnit)); } } else { EXPECT_EQ(inputData[i], values[i]) << "mismatch at index " << i; @@ -1033,8 +1034,9 @@ class ArrowBridgeArrayImportTest : public ArrowBridgeArrayExportTest { rawValues[i] = inputValues[i]->toNanos(); break; default: - VELOX_USER_FAIL(fmt::format( - "Timestamp unit not supported: {}.", options_.timestampUnit)); + VELOX_USER_FAIL( + "Timestamp unit not supported: {}.", + static_cast(options_.timestampUnit)); } } else { rawValues[i] = *inputValues[i]; @@ -1179,8 +1181,9 @@ class ArrowBridgeArrayImportTest : public ArrowBridgeArrayExportTest { << "mismatch at index " << i; break; default: - VELOX_USER_FAIL(fmt::format( - "Timestamp unit not supported: {}.", options_.timestampUnit)); + VELOX_USER_FAIL( + "Timestamp unit not supported: {}.", + static_cast(options_.timestampUnit)); } } } else {