]> git.ipfire.org Git - pakfire.git/commitdiff
tests: build: Use the correct macros to check for errors
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2025 16:33:32 +0000 (16:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2025 16:33:32 +0000 (16:33 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/build.c

index 9f7b404cdf75c5c0681d6aef4cb4bb1e85bd748d..bf9f60671fe118bafdf2e6a401f4344fa7ead47c 100644 (file)
@@ -46,10 +46,10 @@ static int test_create_with_invalid_ids(const struct test* t) {
        struct pakfire_build* build = NULL;
 
        // Try to create a build with an invalid UUID
-       ASSERT(pakfire_build_create(&build, t->ctx, t->config, NULL, "ABC", 0) == -EINVAL);
+       ASSERT_ERROR(pakfire_build_create(&build, t->ctx, t->config, NULL, "ABC", 0), EINVAL);
 
        // Try to create a build with an empty UUID
-       ASSERT(pakfire_build_create(&build, t->ctx, t->config, NULL, "", 0) == -EINVAL);
+       ASSERT_ERROR(pakfire_build_create(&build, t->ctx, t->config, NULL, "", 0), EINVAL);
 
        return EXIT_SUCCESS;