Re: examples on webpage.
Thomas Zander <[email protected]> Mon, 24 Feb 2003 21:58:41 +0100
| Newsgroups | gmane.comp.lib.cppunit.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Feb 12, 2003 at 04:32:49PM -0800, Bart Whiteley wrote:
> Actually, Thomas has a good point. The cookbook example
> has several problems that cause it to not compile.
>
> Read the comments within my attachments to see where the cookbook
> led you astray.
Thanx! This one actually compiled :)
It took some time to get a correct install; my debian version did not link.
I had to compile the sources.
So, I'm of in creating more testunits!
btw; your testrunner:
> bool wasSucessful = runner.run( "", false );
> return wasSucessful;
seems wrong; wasSucessful is 1 when everything went right, but returning
0 is the 'success' return state of main.
So I believe it should be
if(wasSucessful) return 0;
return -1;
And if you want to assume the implied values of the bool (sounds dirty ;).
return !wasSucessful;
--
Thomas Zander
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf