Skip to content

Commit

Permalink
* test/testdbm (test_dbm): Use APR_ASSERT_SUCCESS to give better
Browse files Browse the repository at this point in the history
  errors in failure cases.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1913256 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Oct 24, 2023
1 parent e93513f commit e56cfc6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/testdbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ static void test_dbm(abts_case *tc, void *data)
const char *nofile = apr_pstrcat(p, "data/no-such-test-", type, NULL);

rv = apr_dbm_open_ex(&db, type, file, APR_DBM_RWCREATE, APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);

APR_ASSERT_SUCCESS(tc, "open database r/w", rv);
if (rv != APR_SUCCESS)
return;

Expand All @@ -192,7 +191,7 @@ static void test_dbm(abts_case *tc, void *data)
apr_dbm_close(db);

rv = apr_dbm_open_ex(&db, type, file, APR_DBM_READONLY, APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
APR_ASSERT_SUCCESS(tc, "open database r/o", rv);

if (rv != APR_SUCCESS)
return;
Expand Down

0 comments on commit e56cfc6

Please sign in to comment.