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

Method BufferTestRanges

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

Source from the content-addressed store, hash-verified

383 };
384
385 std::vector<Range> BufferTestRanges(const Buffer& buffer) {
386 const int64_t buffer_size = buffer.size() * 8; // in bits
387 std::vector<Range> ranges;
388 for (const int64_t offset : kTestOffsets) {
389 for (const int64_t length_adjust : kTestOffsets) {
390 int64_t length = std::min(buffer_size - offset, length_adjust);
391 EXPECT_GE(length, 0);
392 ranges.push_back({offset, length});
393 length = std::min(buffer_size - offset, buffer_size - length_adjust);
394 EXPECT_GE(length, 0);
395 ranges.push_back({offset, length});
396 }
397 }
398 return ranges;
399 }
400
401 protected:
402 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