diff options
Diffstat (limited to 'test/testdir.c')
-rw-r--r-- | test/testdir.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/test/testdir.c b/test/testdir.c index b9a5bb2e4..3eb9a2631 100644 --- a/test/testdir.c +++ b/test/testdir.c @@ -29,11 +29,11 @@ static void test_mkdir(abts_case *tc, void *data) apr_finfo_t finfo; rv = apr_dir_make("data/testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE, p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_stat(&finfo, "data/testdir", APR_FINFO_TYPE, p); - abts_int_equal(tc, APR_SUCCESS, rv); - abts_int_equal(tc, APR_DIR, finfo.filetype); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_DIR, finfo.filetype); } static void test_mkdir_recurs(abts_case *tc, void *data) @@ -43,19 +43,19 @@ static void test_mkdir_recurs(abts_case *tc, void *data) rv = apr_dir_make_recursive("data/one/two/three", APR_UREAD | APR_UWRITE | APR_UEXECUTE, p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_stat(&finfo, "data/one", APR_FINFO_TYPE, p); - abts_int_equal(tc, APR_SUCCESS, rv); - abts_int_equal(tc, APR_DIR, finfo.filetype); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_DIR, finfo.filetype); rv = apr_stat(&finfo, "data/one/two", APR_FINFO_TYPE, p); - abts_int_equal(tc, APR_SUCCESS, rv); - abts_int_equal(tc, APR_DIR, finfo.filetype); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_DIR, finfo.filetype); rv = apr_stat(&finfo, "data/one/two/three", APR_FINFO_TYPE, p); - abts_int_equal(tc, APR_SUCCESS, rv); - abts_int_equal(tc, APR_DIR, finfo.filetype); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_DIR, finfo.filetype); } static void test_remove(abts_case *tc, void *data) @@ -64,10 +64,10 @@ static void test_remove(abts_case *tc, void *data) apr_finfo_t finfo; rv = apr_dir_remove("data/testdir", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_stat(&finfo, "data/testdir", APR_FINFO_TYPE, p); - abts_int_equal(tc, 1, APR_STATUS_IS_ENOENT(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv)); } static void test_removeall_fail(abts_case *tc, void *data) @@ -75,7 +75,7 @@ static void test_removeall_fail(abts_case *tc, void *data) apr_status_t rv; rv = apr_dir_remove("data/one", p); - abts_int_equal(tc, 1, APR_STATUS_IS_ENOTEMPTY(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOTEMPTY(rv)); } static void test_removeall(abts_case *tc, void *data) @@ -83,13 +83,13 @@ static void test_removeall(abts_case *tc, void *data) apr_status_t rv; rv = apr_dir_remove("data/one/two/three", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_remove("data/one/two", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_remove("data/one", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); } static void test_remove_notthere(abts_case *tc, void *data) @@ -97,7 +97,7 @@ static void test_remove_notthere(abts_case *tc, void *data) apr_status_t rv; rv = apr_dir_remove("data/notthere", p); - abts_int_equal(tc, 1, APR_STATUS_IS_ENOENT(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv)); } static void test_mkdir_twice(abts_case *tc, void *data) @@ -105,13 +105,13 @@ static void test_mkdir_twice(abts_case *tc, void *data) apr_status_t rv; rv = apr_dir_make("data/testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE, p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_make("data/testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE, p); - abts_int_equal(tc, 1, APR_STATUS_IS_EEXIST(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EEXIST(rv)); rv = apr_dir_remove("data/testdir", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); } static void test_opendir(abts_case *tc, void *data) @@ -120,7 +120,7 @@ static void test_opendir(abts_case *tc, void *data) apr_dir_t *dir; rv = apr_dir_open(&dir, "data", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); apr_dir_close(dir); } @@ -130,7 +130,7 @@ static void test_opendir_notthere(abts_case *tc, void *data) apr_dir_t *dir; rv = apr_dir_open(&dir, "notthere", p); - abts_int_equal(tc, 1, APR_STATUS_IS_ENOENT(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv)); } static void test_closedir(abts_case *tc, void *data) @@ -139,9 +139,9 @@ static void test_closedir(abts_case *tc, void *data) apr_dir_t *dir; rv = apr_dir_open(&dir, "data", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_close(dir); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); } static void test_rewind(abts_case *tc, void *data) @@ -161,7 +161,7 @@ static void test_rewind(abts_case *tc, void *data) apr_assert_success(tc, "apr_dir_close failed", apr_dir_close(dir)); - abts_str_equal(tc, first.name, second.name); + ABTS_STR_EQUAL(tc, first.name, second.name); } /* Test for a (fixed) bug in apr_dir_read(). This bug only happened @@ -175,46 +175,46 @@ static void test_uncleared_errno(abts_case *tc, void *data) apr_status_t rv; rv = apr_dir_make("dir1", APR_OS_DEFAULT, p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_make("dir2", APR_OS_DEFAULT, p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_file_open(&thefile, "dir1/file1", APR_READ | APR_WRITE | APR_CREATE, APR_OS_DEFAULT, p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_file_close(thefile); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); /* Try to remove dir1. This should fail because it's not empty. However, on a platform with threads disabled (such as FreeBSD), `errno' will be set as a result. */ rv = apr_dir_remove("dir1", p); - abts_int_equal(tc, 1, APR_STATUS_IS_ENOTEMPTY(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOTEMPTY(rv)); /* Read `.' and `..' out of dir2. */ rv = apr_dir_open(&this_dir, "dir2", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_read(&finfo, finfo_flags, this_dir); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_read(&finfo, finfo_flags, this_dir); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); /* Now, when we attempt to do a third read of empty dir2, and the underlying system readdir() returns NULL, the old value of errno shouldn't cause a false alarm. We should get an ENOENT back from apr_dir_read, and *not* the old errno. */ rv = apr_dir_read(&finfo, finfo_flags, this_dir); - abts_int_equal(tc, 1, APR_STATUS_IS_ENOENT(rv)); + ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv)); rv = apr_dir_close(this_dir); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); /* Cleanup */ rv = apr_file_remove("dir1/file1", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_remove("dir1", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_dir_remove("dir2", p); - abts_int_equal(tc, APR_SUCCESS, rv); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); } |