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

Method BufferTestRanges

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

Source from the content-addressed store, hash-verified

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