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

Function AssertZeroPadded

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

Source from the content-addressed store, hash-verified

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

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