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

Method BufferTestRanges

cpp/src/arrow/util/bitmap_test.cc:341–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339 };
340
341 std::vector<Range> BufferTestRanges(const Buffer& buffer) {
342 const int64_t buffer_size = buffer.size() * 8; // in bits
343 std::vector<Range> ranges;
344 for (const int64_t offset : kTestOffsets) {
345 for (const int64_t length_adjust : kTestOffsets) {
346 int64_t length = std::min(buffer_size - offset, length_adjust);
347 EXPECT_GE(length, 0);
348 ranges.push_back({offset, length});
349 length = std::min(buffer_size - offset, buffer_size - length_adjust);
350 EXPECT_GE(length, 0);
351 ranges.push_back({offset, length});
352 }
353 }
354 return ranges;
355 }
356
357 protected:
358 const std::vector<int64_t> kTestOffsets = {0, 1, 6, 7, 8, 33, 63, 64, 65, 71};

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected