MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_bitmap_set_body

Function test_bitmap_set_body

app/redis-6.2.6/deps/jemalloc/test/unit/bitmap.c:204–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202#undef NB
203}
204TEST_END
205
206static void
207test_bitmap_set_body(const bitmap_info_t *binfo, size_t nbits) {
208 size_t i;
209 bitmap_t *bitmap = (bitmap_t *)malloc(bitmap_size(binfo));
210 assert_ptr_not_null(bitmap, "Unexpected malloc() failure");
211 bitmap_init(bitmap, binfo, false);
212
213 for (i = 0; i < nbits; i++) {
214 bitmap_set(bitmap, binfo, i);
215 }
216 assert_true(bitmap_full(bitmap, binfo), "All bits should be set");
217 free(bitmap);
218}
219
220TEST_BEGIN(test_bitmap_set) {
221 size_t nbits;

Callers 1

bitmap.cFile · 0.85

Calls 6

mallocFunction · 0.85
bitmap_sizeFunction · 0.85
bitmap_initFunction · 0.85
bitmap_setFunction · 0.85
bitmap_fullFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected