[postgis-devel] Cunit and lwerror

Olivier Courtin olivier.courtin at oslandia.com
Sun Jan 24 11:31:01 PST 2010


On Jan 24, 2010, at 5:25 PM, Paul Ramsey wrote:


> You could override the default handlers in your unit tests and provide
> handlers that returned the strings instead of outputting them on
> stderr?

That's a good suggestion !

I tryed something in this way (patch attached), but still meet 2  
problems:

1) Common usage with lwerror is to call them directly (i.e without a  
return as
     prefix), so i never been able to catch the error message in the  
cunit test itself

2) If i suppress the exit instruction in lwerror handler, i introduce  
possible
      (huge) side effect...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF
Type: application/octet-stream
Size: 1718 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100124/8effae2d/attachment.obj>
-------------- next part --------------

--
Olivier




More information about the postgis-devel mailing list