-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have made changes to the unit tests of the util module to comply
with the new stream. Pls apply the pathches and commit the code.

- - Sahan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iQEVAwUBQ8IiUanIlEsDdb85AQLkawf/b+fD39pjk2UKHf9DingLQRbJY04oiQuF
g+ykfGmAx8fV3LvVw5dVM3k6EU6yRCnPjrF5iWn63wcve4WjERdo9gkEz7XvJbvR
ng06E7gFjO5WpqLK6jGjPzFOMqbmGKbNtDLm8Nzao1shYCszGZZ6qEv1i3wyHT0u
xJJIyZBlpz6UXeccHFfd3bgusaXMHkUSDw7Nwjh7BOFWp35Bk3LU7TCdZLy+94om
l4Pq1eUiG/Lh1y8dzhawd9o8v6xZY4sRNHbux3olQdGu5IyUrKEO8p6tr1KWF/AS
O8yykhs2G1JbcoxV4CqdKqbZfyv0BYOpCUvBOb6iQ7qsR8OT0VdkVg==
=zo7o
-----END PGP SIGNATURE-----

Index: util_test.c
===================================================================
--- util_test.c (revision 367246)
+++ util_test.c (working copy)
@@ -6,7 +6,6 @@
 
 CuSuite* axis2_utilGetSuite() {
     CuSuite* suite = CuSuiteNew();
-    SUITE_ADD_TEST(suite, Testaxis2_stream_read);
     SUITE_ADD_TEST(suite, Testaxis2_stream_write);
     SUITE_ADD_TEST(suite, Testaxis2_log_write);
     SUITE_ADD_TEST(suite, Testaxis2_hash_get);
Index: util_log_test.c
===================================================================
--- util_log_test.c     (revision 367246)
+++ util_log_test.c     (working copy)
@@ -12,6 +12,7 @@
     axis2_stream_t *stream = axis2_stream_create_basic(&env);
 
     char *expected = strdup("aaaaaaaaa");
+    AXIS2_STREAM_WRITE(stream, &env, "aaaaaaaaa", 10);
     AXIS2_STREAM_READ(stream, &env,  actual, 10);
     AXIS2_LOG_WRITE(env->log, actual, 10);
     CuAssertStrEquals(tc, expected, actual);
Index: util_stream_test.c
===================================================================
--- util_stream_test.c  (revision 367246)
+++ util_stream_test.c  (working copy)
@@ -1,17 +1,5 @@
 #include "util_stream_test.h"
 
-void Testaxis2_stream_read(CuTest *tc) {
-    printf("testing axis2_stream_read\n");
-    char actual[10];
-    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");
-    AXIS2_STREAM_READ(stream, &env, actual, 10);
-    CuAssertStrEquals(tc, expected, actual);
-}
-
 void Testaxis2_stream_write(CuTest *tc) {
     printf("testing axis2_stream_write\n");
 
@@ -21,7 +9,8 @@
     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"); 
+    AXIS2_STREAM_WRITE(stream, &env, write_array, 10);
     AXIS2_STREAM_READ(stream, &env, actual, 10);
-    AXIS2_STREAM_WRITE(stream, &env, actual, 10);
     CuAssertStrEquals(tc, expected, actual);
 }
Index: util_stream_test.h
===================================================================
--- util_stream_test.h  (revision 367246)
+++ util_stream_test.h  (working copy)
@@ -9,7 +9,6 @@
 #include <axis2_error_default.h>
 #include <axis2_stream.h>
 
-void Testaxis2_stream_read(CuTest *tc);
 
 void Testaxis2_stream_write(CuTest *tc);
 

Reply via email to