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

Function TestRleValues

cpp/src/arrow/util/rle_encoding_test.cc:855–862  ·  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

853// ValidateRle on 'num_vals' values with width 'bit_width'. If 'value' != -1, that value
854// is used, otherwise alternating values are used.
855void TestRleValues(int bit_width, int num_vals, int value = -1) {
856 const uint64_t mod = (bit_width == 64) ? 1 : 1LL << bit_width;
857 std::vector<int> values;
858 for (int v = 0; v < num_vals; ++v) {
859 values.push_back((value != -1) ? value : static_cast<int>(v % mod));
860 }
861 ValidateRleBitPacked(values, bit_width, NULL, -1);
862}
863
864TEST(RleBitPacked, TestValues) {
865 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