pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] time module unit test cases


From: jemarch
Subject: Re: [pdf-devel] time module unit test cases
Date: Sun, 20 Apr 2008 16:55:32 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (powerpc-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)

    > would protect the function for a single case of invalid pointer. But
    > as I mentioned early in C there is not a way (AFAIK) to determine if a
    > pointer is valid or invalid. So you are covering the case list == NULL
    > but not list == 24 (that is likely to be an invalid address) neither
    > list == 25 or list == 1.

   I agree, but my philosophy is, if you can test at least for one
   invalid case, just do it. :-)

I agre in that to check for `list == NULL' increases the robustness of
the code. Anyway, if it is the case then the function documentation
should explicitly say that if the address of the X parameter is NULL
then PDF_EBADDATA is returned in the pdf_status variable.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]