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

Function TEST_F

cpp/src/gandiva/bitmap_accumulator_test.cc:58–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58TEST_F(TestBitMapAccumulator, TestIntersectBitMaps) {
59 const int length = 128;
60 const int nrecords = length * 8;
61 uint8_t src_bitmaps[4][length];
62 uint8_t dst_bitmap[length];
63 uint8_t expected_bitmap[length];
64
65 for (int i = 0; i < 4; i++) {
66 FillBitMap(src_bitmaps[i], i, length);
67 }
68
69 for (int i = 0; i < 4; i++) {
70 std::vector<const uint8_t*> src_bitmap_ptrs;
71 std::vector<int64_t> src_bitmap_offsets(i, 0);
72 for (int j = 0; j < i; ++j) {
73 src_bitmap_ptrs.push_back(src_bitmaps[j]);
74 }
75
76 BitMapAccumulator::IntersectBitMaps(dst_bitmap, src_bitmap_ptrs, src_bitmap_offsets,
77 nrecords);
78 ByteWiseIntersectBitMaps(expected_bitmap, src_bitmap_ptrs, src_bitmap_offsets,
79 nrecords);
80 EXPECT_EQ(memcmp(dst_bitmap, expected_bitmap, length), 0);
81 }
82}
83
84TEST_F(TestBitMapAccumulator, TestIntersectBitMapsWithOffset) {
85 const int length = 128;

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
BitmapEqualsFunction · 0.50

Tested by

no test coverage detected