MCPcopy Create free account
hub / github.com/apache/arrow / AssertZeroPadded

Function AssertZeroPadded

cpp/src/arrow/testing/gtest_util.cc:719–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717} // namespace
718
719void AssertZeroPadded(const Array& array) {
720 for (const auto& buffer : array.data()->buffers) {
721 if (buffer) {
722 const int64_t padding = buffer->capacity() - buffer->size();
723 if (padding > 0) {
724 std::vector<uint8_t> zeros(padding);
725 ASSERT_EQ(0, memcmp(buffer->data() + buffer->size(), zeros.data(), padding));
726 }
727 }
728 }
729}
730
731void TestInitialized(const Array& array) { TestInitialized(*array.data()); }
732

Callers 4

TestArrayBasicsMethod · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
FinishAndCheckPaddingFunction · 0.85

Calls 3

dataMethod · 0.45
capacityMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected