|
From: | Aleksander Morgado |
Subject: | Re: [pdf-devel] time module unit test cases |
Date: | Sun, 11 May 2008 17:29:24 +0200 |
User-agent: | Thunderbird 2.0.0.14 (Macintosh/20080421) |
Hi Anish
I have written basic unit test cases with implementation please find it attached, have a look at it .Though you have mentioned that instead of attaching send it inline . I thought it would be good as their is 28 files.
I reviewed the time module test implementations and the test descriptions, and I have a suggestion: When checking that a given function succeeded, it shouldn't only be checked that the function returned PDF_OK. It must also be checked that the result of the operation is the expected one. For example:
- pdf_time_to_string: Check that the returned string is the expected one (in this case, if the string is dynamically allocated within the function, please also dealloc the memory before exiting the test).
- pdf_time_add_cal_span: Check also that the resulting time_t contains the original time_t plus the span (comparing time variables with `pdf_time_cmp' for example).
And so on with the whole set of tests. Regards, -Aleksander
[Prev in Thread] | Current Thread | [Next in Thread] |