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

Function TestRleValues

cpp/src/arrow/util/rle_encoding_test.cc:829–836  ·  view source on GitHub ↗

ValidateRle on 'num_vals' values with width 'bit_width'. If 'value' != -1, that value is used, otherwise alternating values are used.

Source from the content-addressed store, hash-verified

827// ValidateRle on 'num_vals' values with width 'bit_width'. If 'value' != -1, that value
828// is used, otherwise alternating values are used.
829void TestRleValues(int bit_width, int num_vals, int value = -1) {
830 const uint64_t mod = (bit_width == 64) ? 1 : 1LL << bit_width;
831 std::vector<int> values;
832 for (int v = 0; v < num_vals; ++v) {
833 values.push_back((value != -1) ? value : static_cast<int>(v % mod));
834 }
835 ValidateRleBitPacked(values, bit_width, NULL, -1);
836}
837
838TEST(RleBitPacked, TestValues) {
839 for (int width = 1; width <= MAX_WIDTH; ++width) {

Callers 1

TESTFunction · 0.85

Calls 2

ValidateRleBitPackedFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected