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: gerel
Subject: Re: [pdf-devel] time module unit test cases
Date: Sat, 19 Apr 2008 13:59:49 -0300

 > Date: Sat, 19 Apr 2008 09:31:09 +0200
 > From: address@hidden
 > 
 > 
 > 
 > Well, a check like:
 > 
 >    pdf_list_create (foo, bar, baz, list)
 >      ...
 >      if (list == NULL) then error PDF_EBADDATA;
 >      ...
 > 
 > 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. :-)

greetings,

-gerel




reply via email to

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