mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03:00
test-bitmap: add tests for bitmap_copy()
This commit is contained in:
parent
ade0eb2190
commit
6b86b9e65d
@ -97,8 +97,19 @@ int main(int argc, const char *argv[]) {
|
||||
|
||||
assert_se(i == (unsigned) -1);
|
||||
|
||||
b2 = bitmap_copy(b);
|
||||
assert_se(b2);
|
||||
assert_se(bitmap_equal(b, b2) == true);
|
||||
assert_se(bitmap_equal(b, b) == true);
|
||||
assert_se(bitmap_equal(b, NULL) == false);
|
||||
assert_se(bitmap_equal(NULL, b) == false);
|
||||
assert_se(bitmap_equal(NULL, NULL) == true);
|
||||
|
||||
bitmap_clear(b);
|
||||
assert_se(bitmap_isclear(b) == true);
|
||||
assert_se(bitmap_equal(b, b2) == false);
|
||||
bitmap_free(b2);
|
||||
b2 = NULL;
|
||||
|
||||
assert_se(bitmap_set(b, (unsigned) -1) == -ERANGE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user