Hi all,

First of all I have to say that it's a good idea (tests for utils). I
analyze some of the test cases and found out that they were not correctly
implemented according to my knowledge. I think we have to figure out why we
need those test cases and what we are going to test using that test cases.
Looking at these implementations, I think no one can get any idea what they
are stands for (but the name says what is going to test). So, I think we
have to first identify what are we going to test and how we going to test
them . Then we can clearly design some test case that correctly check our
implementations for correctness. Followings things are some mistakes I found
out in implementations under allocator test, and date time test. I didn't
look into much about other tests but I think they also have same problems.

When I first look at directory called allocator, I think it contains test
cases for our env->allocator. But what is inside is test for fread and
fwrite functions and function called test_base64() which contains some
axutil_base64_binary_t creation function calls and getter and setter methods
of it. Also some unwanted usage of global variables. Also axutil_env_t
structure creations are wrong. One axutil_env_creation is inside the main
method. It assigned created environment to global variable called env and
inside function implementation another environment creation function is
called and again assigned the return value to the same global variable.

Inside date time test some mistakes that I have mentioned above also visible
and the date time string use to test has wrong format.
axis2_char_t * date_time_str = "2000-11-11 12:30:24";
I don't know whether it was used intentionally. But it must have following
format.
"2002-11-11T12:30:24"

So I think we have to look at these tests seriously and design these tests
to test what we exactly want to test. Please feel free to comment on this.

Thanks

Milinda



--
http://inf-dimensions.blogspot.com "Infinite Dimensions"
http://think2ed.blogspot.com "thinksquared"
http://wsaxc.blogspot.com "Web Services With Axis2/C"

Reply via email to