|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-09-14 07:09:14
Scott Meyers <usenet_at_[hidden]> writes:
> Hmmm, I'd think this entire constructor would exist only in debug
> builds, e.g.,
>
> class EventLog {
> public:
> #ifdef DEBUG
> EventLog(bool dummyarg);
> #endif
>
> Unfortunately, conditional compilation is not without its own resultant
> spaghetti code and concomitant maintenance headaches.
I'd much rather develop a library of mock objects for testing. Okay a
conforming mock stream may be a little work to write, but you write it
once and you're done.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net