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

Function AssertBufferEqual

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

Source from the content-addressed store, hash-verified

220}
221
222void AssertBufferEqual(const Buffer& buffer, const std::vector<uint8_t>& expected) {
223 ASSERT_EQ(static_cast<size_t>(buffer.size()), expected.size())
224 << "Mismatching buffer size";
225 const uint8_t* buffer_data = buffer.data();
226 for (size_t i = 0; i < expected.size(); ++i) {
227 ASSERT_EQ(buffer_data[i], expected[i]);
228 }
229}
230
231void AssertBufferEqual(const Buffer& buffer, std::string_view expected) {
232 ASSERT_EQ(static_cast<size_t>(buffer.size()), expected.length())

Callers 15

TESTFunction · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
AssertCudaBufferEqualsFunction · 0.85
TEST_FFunction · 0.85
TestWriteMethod · 0.85
TestWriteMethod · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TestReadsMethod · 0.85
TESTFunction · 0.85
TestSlowInputStreamFunction · 0.85

Calls 5

ToHexStringMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected