[ODE] Latest Commit

Jon Watte (ODE) hplus-ode at mindcontrol.org
Fri Oct 28 14:39:41 MST 2005


> However, the idea that testing code would end up on the final binary 
> library, either just as extra bagage or actually affecting performance 
> keeps bothering me, can someone
> care to explain how this will not happen?

If you really care about that (and I don't quite see why -- being able 
to validate the shipping code is useful), it's no harder than this:

#if !defined( FINAL_MODE )

class BoxTest : public UnitTest {

};
BoxTest boxTest;

#endif

It's not that different from, say, CXXTEST_RUNNING, or other such 
defines used by various unit testing frameworks.

In a statically linked library, the testing code won't be included if 
you never call it. In a dynamically linked library, the testing code 
will never be paged in if you never call it. Neither way would the 
testing code actually 'get in the way' IMO.

Cheers,

			/ h+




More information about the ODE mailing list