test: drop unnecessary comparison and use correct assertion macros

Follow-up for 8951706784.
Fixes CID#1608873 and CID#1608874.
This commit is contained in:
Yu Watanabe
2025-04-09 13:31:42 +09:00
parent 3d5f31c133
commit 3861bfb99f

View File

@@ -30,9 +30,9 @@ TEST(memfd_get_sealed) {
ASSERT_OK(memfd_get_size(fd, &size));
ASSERT_EQ(size, new_size / 2);
ASSERT_OK(memfd_get_sealed(fd) == 0);
ASSERT_OK(memfd_set_sealed(fd) >= 0);
ASSERT_OK(memfd_get_sealed(fd) > 0);
ASSERT_OK_ZERO(memfd_get_sealed(fd));
ASSERT_OK(memfd_set_sealed(fd));
ASSERT_OK_POSITIVE(memfd_get_sealed(fd));
}
DEFINE_TEST_MAIN(LOG_DEBUG);