On Mon, 01/22 23:08, Max Reitz wrote: > diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c > index 9091c639b3..2a2aa5bd43 100644 > --- a/tests/test-hbitmap.c > +++ b/tests/test-hbitmap.c > @@ -46,7 +46,7 @@ static void hbitmap_test_check(TestHBitmapData *data, > > i = first; > for (;;) { > - next = hbitmap_iter_next(&hbi); > + next = hbitmap_iter_next(&hbi, true); > if (next < 0) { > next = data->size; > } > @@ -435,25 +435,25 @@ static void > test_hbitmap_iter_granularity(TestHBitmapData *data, > /* Note that hbitmap_test_check has to be invoked manually in this test. > */ > hbitmap_test_init(data, 131072 << 7, 7); > hbitmap_iter_init(&hbi, data->hb, 0); > - g_assert_cmpint(hbitmap_iter_next(&hbi), <, 0); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0); > > hbitmap_test_set(data, ((L2 + L1 + 1) << 7) + 8, 8); > hbitmap_iter_init(&hbi, data->hb, 0); > - g_assert_cmpint(hbitmap_iter_next(&hbi), ==, (L2 + L1 + 1) << 7); > - g_assert_cmpint(hbitmap_iter_next(&hbi), <, 0); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, (L2 + L1 + 1) << 7); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0); > > hbitmap_iter_init(&hbi, data->hb, (L2 + L1 + 2) << 7); > - g_assert_cmpint(hbitmap_iter_next(&hbi), <, 0); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0); > > hbitmap_test_set(data, (131072 << 7) - 8, 8); > hbitmap_iter_init(&hbi, data->hb, 0); > - g_assert_cmpint(hbitmap_iter_next(&hbi), ==, (L2 + L1 + 1) << 7); > - g_assert_cmpint(hbitmap_iter_next(&hbi), ==, 131071 << 7); > - g_assert_cmpint(hbitmap_iter_next(&hbi), <, 0); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, (L2 + L1 + 1) << 7); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, 131071 << 7); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0); > > hbitmap_iter_init(&hbi, data->hb, (L2 + L1 + 2) << 7); > - g_assert_cmpint(hbitmap_iter_next(&hbi), ==, 131071 << 7); > - g_assert_cmpint(hbitmap_iter_next(&hbi), <, 0); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, 131071 << 7); > + g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0); > }
Please add tests for advance=false too.