diff options
Diffstat (limited to 'src/test/test-cap-list.c')
-rw-r--r-- | src/test/test-cap-list.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test-cap-list.c b/src/test/test-cap-list.c index a9cbf69..49be4a2 100644 --- a/src/test/test-cap-list.c +++ b/src/test/test-cap-list.c @@ -21,7 +21,7 @@ TEST(cap_list) { assert_se(!CAPABILITY_TO_STRING(-1)); if (capability_list_length() <= 62) - assert_se(streq(CAPABILITY_TO_STRING(62), "0x3e")); + ASSERT_STREQ(CAPABILITY_TO_STRING(62), "0x3e"); assert_se(!CAPABILITY_TO_STRING(64)); for (int i = 0; i < capability_list_length(); i++) { @@ -31,7 +31,7 @@ TEST(cap_list) { assert_se(capability_from_name(n) == i); printf("%s = %i\n", n, i); - assert_se(streq(CAPABILITY_TO_STRING(i), n)); + ASSERT_STREQ(CAPABILITY_TO_STRING(i), n); } assert_se(capability_from_name("asdfbsd") == -EINVAL); @@ -70,7 +70,7 @@ static void test_capability_set_one(uint64_t c, const char *t) { uint64_t c1, c_masked = c & all_capabilities(); assert_se(capability_set_to_string(c, &t1) == 0); - assert_se(streq(t1, t)); + ASSERT_STREQ(t1, t); assert_se(capability_set_from_string(t1, &c1) > 0); assert_se(c1 == c_masked); @@ -160,8 +160,8 @@ TEST(capability_set_to_string_negative) { uint64_t m = random_u64() % (UINT64_C(1) << (cap_last_cap() + 1)); - assert_se(capability_set_to_string(m, &a) >= 0); - assert_se(capability_set_to_string_negative(m, &b) >= 0); + ASSERT_OK(capability_set_to_string(m, &a)); + ASSERT_OK(capability_set_to_string_negative(m, &b)); printf("%s (%zu) → ", a, strlen(a)); @@ -170,7 +170,7 @@ TEST(capability_set_to_string_negative) { else printf("%s (%zu)\n", b, strlen(b)); - assert_se(strlen(b) <= strlen(a)); + ASSERT_LE(strlen(b), strlen(a)); } } |