You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/01/20 03:55:50 UTC
svn commit: r370709 - in /webservices/axis2/trunk/c/test:
core/deployment/test_deployment.c core/description/test_description.c
unit/util/util_class_loader_test.c unit/util/util_stream_test.c
unit/util/util_test.c
Author: damitha
Date: Thu Jan 19 18:55:42 2006
New Revision: 370709
URL: http://svn.apache.org/viewcvs?rev=370709&view=rev
Log:
Formatted out put.
Modified:
webservices/axis2/trunk/c/test/core/deployment/test_deployment.c
webservices/axis2/trunk/c/test/core/description/test_description.c
webservices/axis2/trunk/c/test/unit/util/util_class_loader_test.c
webservices/axis2/trunk/c/test/unit/util/util_stream_test.c
webservices/axis2/trunk/c/test/unit/util/util_test.c
Modified: webservices/axis2/trunk/c/test/core/deployment/test_deployment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/deployment/test_deployment.c?rev=370709&r1=370708&r2=370709&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/deployment/test_deployment.c (original)
+++ webservices/axis2/trunk/c/test/core/deployment/test_deployment.c Thu Jan 19 18:55:42 2006
@@ -17,9 +17,13 @@
axis2_array_list_t *in_phases = NULL;
axis2_char_t *axis2c_home = NULL;
+ printf("******************************************\n");
+ printf("testing dep_engine_load method \n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
-
+
axis2c_home = AXIS2_GETENV("AXIS2C_HOME");
dep_engine = axis2_dep_engine_create_with_repos_name(&env,
axis2c_home);
@@ -62,9 +66,8 @@
axis2_char_t *oname = NULL;
int count = 0;
- /*for(hi2 = axis2_hash_first(ops, &env); hi2; axis2_hash_next(&env, hi2))
+ for(hi2 = axis2_hash_first(ops, &env); hi2; hi2 = axis2_hash_next(&env, hi2))
{
- printf ("count = %d \n", count++);
if (!hi2)
break;
axis2_hash_this(hi2, NULL, NULL, &op);
@@ -75,7 +78,7 @@
oname = AXIS2_QNAME_GET_LOCALPART(qname, &env);
printf("op name = %s\n", oname);
}
- } */
+ }
}
else
printf("ops count = zero\n");
@@ -111,7 +114,9 @@
axis2_dep_engine_t *dep_engine = NULL;
axis2_char_t *axis2c_home = NULL;
+ printf("******************************************\n");
printf("testing conf_builder_populate_conf method \n");
+ printf("******************************************\n");
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
@@ -149,11 +154,12 @@
axis2_transport_receiver_t *transport_recv = NULL;
axis2_param_t *impl_info_param = NULL;
axis2_bool_t *is_running = AXIS2_FALSE;
- axis2_char_t *expected = NULL;
axis2_char_t *axis2c_home = NULL;
- expected = "application";
+ printf("******************************************\n");
printf("testing axis2_transport_recv load\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
@@ -186,7 +192,10 @@
axis2_char_t *axis2c_home = NULL;
axis2_msg_ctx_t *msg_ctx = NULL;
+ printf("******************************************\n");
printf("testing axis2_transport_sender load\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
@@ -213,11 +222,11 @@
int main()
{
- /*axis2_test_dep_engine_do_deploy();
- axis2_test_engine_conf_builder_populate_conf();*/
+ axis2_test_dep_engine_do_deploy();
+ axis2_test_engine_conf_builder_populate_conf();
axis2_test_dep_engine_load();
- /*axis2_test_transport_receiver_load();*/
- /*axis2_test_transport_sender_load();*/
+ axis2_test_transport_receiver_load();
+ axis2_test_transport_sender_load();
return 0;
}
Modified: webservices/axis2/trunk/c/test/core/description/test_description.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/description/test_description.c?rev=370709&r1=370708&r2=370709&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/description/test_description.c (original)
+++ webservices/axis2/trunk/c/test/core/description/test_description.c Thu Jan 19 18:55:42 2006
@@ -12,9 +12,13 @@
struct axis2_module_desc *moduleref= NULL;
axis2_status_t status = AXIS2_FAILURE;
+
+ printf("******************************************\n");
+ printf("testing axis2_op_engage_module\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
-
struct axis2_op *op = axis2_op_create(&env);
moduleref = axis2_module_desc_create(&env);
@@ -42,9 +46,13 @@
axis2_status_t status = AXIS2_FAILURE;
+
+ printf("******************************************\n");
+ printf("testing axis2_svc_add_module_ops\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
-
qname = axis2_qname_create(&env, "name1", NULL, NULL);
svc = axis2_svc_create_with_qname(&env, qname);
module_desc = axis2_module_desc_create(&env);
@@ -70,13 +78,16 @@
struct axis2_svc *svc = NULL;
struct axis2_qname *qname = NULL;
struct axis2_module_desc *moduleref = NULL;
- struct axis2_conf *axis2_config = NULL;
-
+ struct axis2_conf *axis2_config = NULL;
axis2_status_t status = AXIS2_FAILURE;
+
+ printf("******************************************\n");
+ printf("testing axis2_svc_engage_module\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
-
qname = axis2_qname_create(&env, "name1", NULL, NULL);
svc = axis2_svc_create_with_qname(&env, qname);
moduleref = axis2_module_desc_create(&env);
@@ -107,9 +118,13 @@
struct axis2_op *op = NULL;
axis2_status_t status = NULL;
+
+ printf("******************************************\n");
+ printf("testing axis2_svc_get_op\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
-
qname = axis2_qname_create(&env, "op1", NULL, NULL);
op = axis2_op_create_with_qname(&env, qname);
qname = axis2_qname_create(&env, "svc1", NULL, NULL);
Modified: webservices/axis2/trunk/c/test/unit/util/util_class_loader_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/util/util_class_loader_test.c?rev=370709&r1=370708&r2=370709&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/unit/util/util_class_loader_test.c (original)
+++ webservices/axis2/trunk/c/test/unit/util/util_class_loader_test.c Thu Jan 19 18:55:42 2006
@@ -3,160 +3,7 @@
#include <axis2_msg_recv.h>
#include <axis2_param.h>
#include <axis2_class_loader.h>
-/*
-axis2_status_t AXIS2_CALL
-axis2_test_class_loader_load_lib (axis2_env_t **env,
- axis2_dll_desc_t *dll_desc)
-{
- axis2_char_t *dll_name = NULL;
- AXIS2_DLHANDLER dl_handler = NULL;
- axis2_status_t status = AXIS2_FAILURE;
-
- dll_name = "/home/damitha/programs/axis2c/lib/libaxis2_receivers.so";
- printf("dll_name:%s\n", dll_name);
- dl_handler = AXIS2_PLATFORM_LOADLIB(dll_name);
- if(NULL == dl_handler)
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_LOADING_FAILED,
- AXIS2_FAILURE);
- return AXIS2_FAILURE;
- }
- status = AXIS2_DLL_DESC_SET_DL_HANDLER(dll_desc, env, dl_handler);
- if(AXIS2_FAILURE == status)
- {
- AXIS2_FREE((*env)->allocator, dl_handler);
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_LOADING_FAILED,
- AXIS2_FAILURE);
- return AXIS2_FAILURE;
- }
-
- return AXIS2_SUCCESS;
-}
-*/
-/*
-void *
-axis2_test_class_loader_create_dll (axis2_env_t **env,
- axis2_param_t *impl_info_param)
-{
- axis2_msg_recv_t *msg_recv = NULL;
- void *handler = NULL;
- void *module = NULL;
- CREATE_FUNCT create_funct = NULL;
- axis2_dll_desc_t *dll_desc = NULL;
- axis2_status_t status = AXIS2_FAILURE;
- axis2_dll_type_t dll_type = AXIS2_SVC_DLL;
-
- dll_desc = AXIS2_PARAM_GET_VALUE(impl_info_param, env);
- if(!dll_desc)
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_CREATE_FAILED,
- AXIS2_FAILURE);
- return NULL;
- }
- status = axis2_class_loader_load_lib(env, dll_desc);
- printf("load lib status:%d\n", status);
- if (AXIS2_SUCCESS == status)
- {
- CREATE_FUNCT create_funct = NULL;
- DELETE_FUNCT delete_funct = NULL;
- AXIS2_DLHANDLER dl_handler = NULL;
-
- dl_handler = AXIS2_DLL_DESC_GET_DL_HANDLER(dll_desc, env);
- create_funct = (CREATE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler,
- AXIS2_CREATE_FUNCTION);
- status = AXIS2_DLL_DESC_SET_CREATE_FUNCT(dll_desc, env, create_funct);
- if(AXIS2_FAILURE == status)
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_CREATE_FAILED,
- AXIS2_FAILURE);
- return NULL;
- }
-
- delete_funct = (DELETE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler,
- AXIS2_DELETE_FUNCTION);
-
- status = AXIS2_DLL_DESC_SET_DELETE_FUNCT(dll_desc, env, delete_funct);
- printf("status of setting delete:%d\n", status);
- if(AXIS2_FAILURE == status)
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_CREATE_FAILED,
- AXIS2_FAILURE);
- return NULL;
- }
- }
- else
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_CREATE_FAILED,
- AXIS2_FAILURE);
- return NULL;
- }
-
- create_funct = AXIS2_DLL_DESC_GET_CREATE_FUNCT(dll_desc, env);
-
- dll_type = AXIS2_DLL_DESC_GET_TYPE(dll_desc, env);
- if(AXIS2_SVC_DLL == dll_type)
- {
- create_funct(&svc_skeli, env);
- if(NULL == svc_skeli)
- {
- AXIS2_ERROR_SET((*env)->error,
- AXIS2_ERROR_SVC_SKELETON_CREATION_FAILED,AXIS2_FAILURE);
- return NULL;
- }
- return svc_skeli;
- }
- if(AXIS2_HANDLER_DLL == dll_type)
- {
- create_funct(&handler, env);
- if(NULL == handler)
- {
- AXIS2_ERROR_SET((*env)->error,
- AXIS2_ERROR_HANDLER_CREATION_FAILED,AXIS2_FAILURE);
- return NULL;
- }
- return handler;
- }
- if(AXIS2_MODULE_DLL == dll_type)
- {
- create_funct(&module, env);
- if(NULL == module)
- {
- AXIS2_ERROR_SET((*env)->error,
- AXIS2_ERROR_MODULE_CREATION_FAILED,AXIS2_FAILURE);
- return NULL;
- }
- return module;
- }
- if(AXIS2_MSG_RECV_DLL == dll_type)
- {
- axis2_char_t *result = NULL;
- printf("came6**\n");
- create_funct(&msg_recv, env);
- printf("came7\n");
- if(NULL == msg_recv)
- {
- printf("msg_recv is null\n");
- AXIS2_ERROR_SET((*env)->error,
- AXIS2_ERROR_MSG_RECV_CREATION_FAILED,AXIS2_FAILURE);
- return NULL;
- }
- result = AXIS2_MSG_RECV_GET_SCOPE(msg_recv, env);
- printf("result:%s\n", result);
- return msg_recv;
- }
-
- return NULL;
-}
-*/
-/*
-axis2_status_t AXIS2_CALL
-axis2_test_class_loader_init(axis2_env_t **env)
-{
- AXIS2_PLATFORM_LOADLIBINIT();
- return AXIS2_SUCCESS;
-}
-*/
void Testaxis2_class_loader_create_dll(CuTest *tc)
{
axis2_dll_desc_t *dll_desc = NULL;
@@ -167,10 +14,13 @@
axis2_char_t *expected = NULL;
axis2_char_t *axis2c_home = NULL;
+ printf("******************************************\n");
+ printf("testing axis2_class_loader_create_dll\n");
+ printf("******************************************\n");
expected = "application";
- printf("testing axis2_class_loader_create\n");
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
+
dll_desc = axis2_dll_desc_create(&env);
Modified: webservices/axis2/trunk/c/test/unit/util/util_stream_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/util/util_stream_test.c?rev=370709&r1=370708&r2=370709&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/unit/util/util_stream_test.c (original)
+++ webservices/axis2/trunk/c/test/unit/util/util_stream_test.c Thu Jan 19 18:55:42 2006
@@ -1,12 +1,17 @@
#include "util_stream_test.h"
-void Testaxis2_stream_write(CuTest *tc) {
- printf("testing axis2_stream_write\n");
-
+void Testaxis2_stream_write(CuTest *tc)
+{
char actual[10];
+
+ printf("******************************************\n");
+ printf("testing axis2_stream_write\n");
+ printf("******************************************\n");
+
axis2_allocator_t *allocator = axis2_allocator_init(NULL);
axis2_error_t *error = axis2_error_create(allocator);
axis2_env_t *env = axis2_env_create_with_error(allocator, error);
+
axis2_stream_t *stream = axis2_stream_create_basic(&env);
char *expected = (char*) strdup("aaaaaaaaa");
char *write_array = (char*)strdup("aaaaaaaaa");
Modified: webservices/axis2/trunk/c/test/unit/util/util_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/util/util_test.c?rev=370709&r1=370708&r2=370709&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/unit/util/util_test.c (original)
+++ webservices/axis2/trunk/c/test/unit/util/util_test.c Thu Jan 19 18:55:42 2006
@@ -7,7 +7,8 @@
CuSuite* axis2_utilGetSuite()
{
CuSuite* suite = CuSuiteNew();
- SUITE_ADD_TEST(suite, Testaxis2_class_loader_create_dll);
+
+ SUITE_ADD_TEST(suite, Testaxis2_class_loader_create_dll);
SUITE_ADD_TEST(suite, Testaxis2_stream_write);
SUITE_ADD_TEST(suite, Testaxis2_log_write);
SUITE_ADD_TEST(suite, Testaxis2_hash_get);