diff options
author | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2004-06-07 21:21:35 +0000 |
---|---|---|
committer | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2004-06-07 21:21:35 +0000 |
commit | a9ba3b84bee7872b82dc38e6f4ded710b2f65c8a (patch) | |
tree | 6b948a49808b3ef086fbcd00ff9fb4207df836b1 /test/testlock.c | |
parent | e519c61cf1cd50ccf8f4c2561a4295299a2d89a8 (diff) | |
download | libapr-a9ba3b84bee7872b82dc38e6f4ded710b2f65c8a.tar.gz |
Presently if we fail in apr_assert_success we get the line number for
testutil.c reported. Not very useful. This change adds the passing of
the (correct) line number and also a macro to ease said passing.
I've changed all instances of apr_assert_success to use the new macro, but
not all the tests build on this platform so others should check that all
is well for them.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testlock.c')
-rw-r--r-- | test/testlock.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/testlock.c b/test/testlock.c index 259c5beae..9c8a14dfc 100644 --- a/test/testlock.c +++ b/test/testlock.c @@ -187,20 +187,20 @@ static void test_thread_rwlock(abts_case *tc, void *data) ABTS_NOT_IMPL(tc, "rwlocks not implemented"); return; } - apr_assert_success(tc, "rwlock_create", s1); + APR_ASSERT_SUCCESS(tc, "rwlock_create", s1); ABTS_PTR_NOTNULL(tc, rwlock); i = 0; x = 0; s1 = apr_thread_create(&t1, NULL, thread_rwlock_func, NULL, p); - apr_assert_success(tc, "create thread 1", s1); + APR_ASSERT_SUCCESS(tc, "create thread 1", s1); s2 = apr_thread_create(&t2, NULL, thread_rwlock_func, NULL, p); - apr_assert_success(tc, "create thread 2", s2); + APR_ASSERT_SUCCESS(tc, "create thread 2", s2); s3 = apr_thread_create(&t3, NULL, thread_rwlock_func, NULL, p); - apr_assert_success(tc, "create thread 3", s3); + APR_ASSERT_SUCCESS(tc, "create thread 3", s3); s4 = apr_thread_create(&t4, NULL, thread_rwlock_func, NULL, p); - apr_assert_success(tc, "create thread 4", s4); + APR_ASSERT_SUCCESS(tc, "create thread 4", s4); apr_thread_join(&s1, t1); apr_thread_join(&s2, t2); @@ -217,17 +217,17 @@ static void test_cond(abts_case *tc, void *data) int count1, count2, count3, count4; int sum; - apr_assert_success(tc, "create put mutex", + APR_ASSERT_SUCCESS(tc, "create put mutex", apr_thread_mutex_create(&put.mutex, APR_THREAD_MUTEX_DEFAULT, p)); ABTS_PTR_NOTNULL(tc, put.mutex); - apr_assert_success(tc, "create nready mutex", + APR_ASSERT_SUCCESS(tc, "create nready mutex", apr_thread_mutex_create(&nready.mutex, APR_THREAD_MUTEX_DEFAULT, p)); ABTS_PTR_NOTNULL(tc, nready.mutex); - apr_assert_success(tc, "create condvar", + APR_ASSERT_SUCCESS(tc, "create condvar", apr_thread_cond_create(&nready.cond, p)); ABTS_PTR_NOTNULL(tc, nready.cond); @@ -254,7 +254,7 @@ static void test_cond(abts_case *tc, void *data) apr_thread_join(&s3, p4); apr_thread_join(&s4, c1); - apr_assert_success(tc, "destroy condvar", + APR_ASSERT_SUCCESS(tc, "destroy condvar", apr_thread_cond_destroy(nready.cond)); sum = count1 + count2 + count3 + count4; |