MCPcopy Create free account
hub / github.com/catboost/catboost / TestAndImpl

Function TestAndImpl

util/generic/bitmap_ut.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105 template <class TBitMapImpl>
106 void TestAndImpl() {
107 TBitMapImpl bitmap1;
108 TBitMapImpl bitmap2;
109
110 size_t initBits1[] = {10, 20, 50, 100};
111 size_t initBits2[] = {10, 11, 22, 50};
112
113 INIT_BITMAP(bitmap1, initBits1);
114 INIT_BITMAP(bitmap2, initBits2);
115
116 bitmap1.And(bitmap2);
117
118 UNIT_ASSERT_EQUAL(bitmap1.Count(), 2);
119 UNIT_ASSERT_EQUAL(bitmap2.Count(), 4);
120
121 size_t resBits[] = {10, 50};
122
123 CHECK_BITMAP(bitmap1, resBits);
124 CHECK_BITMAP(bitmap2, initBits2);
125 }
126
127 Y_UNIT_TEST(TestAndFixed) {
128 TestAndImpl<TBitMap<101>>();

Callers

nothing calls this directly

Calls 2

AndMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected