diff options
author | damitha | 2010-07-08 06:38:10 +0000 |
---|---|---|
committer | damitha | 2010-07-08 06:38:10 +0000 |
commit | c8d5aeb5d3048e8a037f1884b59cef8adf7e25b2 (patch) | |
tree | 6edd50a5f63708b4c916614809082d9c1090b262 /util/test/util/test_log.c | |
parent | 4a01960cba446e046d5687279c024fa60b576d85 (diff) | |
download | axis2c-c8d5aeb5d3048e8a037f1884b59cef8adf7e25b2.tar.gz axis2c-c8d5aeb5d3048e8a037f1884b59cef8adf7e25b2.tar.bz2 |
Added the simple test suite suggested in AXIS2C-1412
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@961590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'util/test/util/test_log.c')
-rw-r--r-- | util/test/util/test_log.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/util/test/util/test_log.c b/util/test/util/test_log.c index 4539b4e..195b756 100644 --- a/util/test/util/test_log.c +++ b/util/test/util/test_log.c @@ -21,26 +21,30 @@ #include <axutil_log.h> #include <axutil_log_default.h> #include <axutil_allocator.h> -#include <test_log.h> +#include "test_log.h" #include <string.h> -const axutil_env_t * + +axutil_env_t * create_env_with_error_log( ) { + axutil_env_t *env = NULL; + axutil_log_t *log22 = NULL; + axutil_error_t *error = NULL; axutil_allocator_t *allocator = axutil_allocator_init(NULL); if (!allocator) { printf("allocator is NULL\n"); return NULL; } - axutil_error_t *error = axutil_error_create(allocator); + error = axutil_error_create(allocator); if (!error) { printf("cannot create error\n"); return NULL; } - axutil_log_t *log22 = axutil_log_create(allocator, NULL, NULL); + log22 = axutil_log_create(allocator, NULL, NULL); if (!log22) { printf("cannot create log\n"); @@ -51,7 +55,7 @@ create_env_with_error_log( */ log22->level = AXIS2_LOG_LEVEL_DEBUG; /* log22->enabled = 0; */ - const axutil_env_t *env = + env = axutil_env_create_with_error_log(allocator, error, log22); if (!env) { @@ -161,8 +165,8 @@ void run_test_log( ) { - printf("\n####start of run_test_log test suite\n\n"); const axutil_env_t *env = create_env_with_error_log(); + printf("\n####start of run_test_log test suite\n\n"); if (!env) return; test_axutil_log_write(env); |