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_string.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_string.c')
-rw-r--r-- | util/test/util/test_string.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/util/test/util/test_string.c b/util/test/util/test_string.c index d4d7bbc..709a96a 100644 --- a/util/test/util/test_string.c +++ b/util/test/util/test_string.c @@ -28,10 +28,7 @@ test_strltrim( axis2_char_t *s = axutil_strdup(env, " abcd efgh "); axis2_char_t *trimmed = NULL; trimmed = axutil_strltrim(env, s, " \t\r\n"); - if (0 == axutil_strcmp(trimmed, "abcd efgh ")) - printf("axutil_strltrim successful\n"); - else - printf("axutil_strltrim failed [%s]\n", trimmed); + CUT_ASSERT_STR_EQUAL(trimmed, "abcd efgh ", 0); if (trimmed) AXIS2_FREE(env->allocator, trimmed); if (s) @@ -42,13 +39,10 @@ void test_strrtrim( const axutil_env_t * env) { - axis2_char_t *s = axutil_strdup(env, "abcd efgh "); + axis2_char_t *s = axutil_strdup(env, " abcd efgh "); axis2_char_t *trimmed = NULL; trimmed = axutil_strrtrim(env, s, " \t\r\n"); - if (0 == axutil_strcmp(trimmed, " abcd efgh")) - printf("axutil_strrtrim successful\n"); - else - printf("axutil_strrtrim failed [%s]\n", trimmed); + CUT_ASSERT_STR_EQUAL(trimmed, " abcd efgh", 0); if (trimmed) AXIS2_FREE(env->allocator, trimmed); if (s) @@ -62,10 +56,7 @@ test_strtrim( axis2_char_t *s = axutil_strdup(env, " abcd efgh "); axis2_char_t *trimmed = NULL; trimmed = axutil_strtrim(env, s, " \t\r\n"); - if (0 == axutil_strcmp(trimmed, "abcd efgh")) - printf("axutil_strtrim successful\n"); - else - printf("axutil_strtrim failed [%s]\n", trimmed); + CUT_ASSERT_STR_EQUAL(trimmed, "abcd efgh", 0); if (trimmed) AXIS2_FREE(env->allocator, trimmed); if (s) |