Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Zhou <[email protected]>
  • Loading branch information
zhouyuan committed Feb 6, 2024
1 parent 20ffe58 commit 6e0eb08
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion velox/common/memory/tests/MemoryAllocatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

#ifdef linux
#include <fstream>
#endif // linux

DECLARE_int32(velox_memory_pool_mb);
DECLARE_bool(velox_memory_leak_check_enabled);

Expand Down Expand Up @@ -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);
Expand Down
15 changes: 9 additions & 6 deletions velox/vector/arrow/tests/ArrowBridgeArrayTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(options_.timestampUnit));
}
} else {
EXPECT_EQ(inputData[i], values[i]) << "mismatch at index " << i;
Expand Down Expand Up @@ -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<int>(options_.timestampUnit));
}
} else {
rawValues[i] = *inputValues[i];
Expand Down Expand Up @@ -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<int>(options_.timestampUnit));
}
}
} else {
Expand Down

0 comments on commit 6e0eb08

Please sign in to comment.