|
Boost Users : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2003-07-07 09:41:08
I'm deploying a library which implements some basic invariant checking
when a certain control macro is defined.
class A
{
void foo1(){VERIFY(*invariant conditions *); ...}
...
void foon(){VERIFY(*invariant conditions *); ...}
};
I use the word VERIFY for reference purposes only.
Now, VERIFY is resolved to a call to assert(), which is sensible
enough as:
* Invariant errors are critical
* Invariant checking is only enabled explictly by the user, presumably
under testing conditions.
On a second thought, it'd be nice if VERIFY could be seamlessly
integrated into the Boost Test Framework, i.e. invariant errors are
caught by the test execution monitor as other errors defined by
BOOST_CHECK, BOOST_REQUIRE etc. Unfortunately, replacing
VERIFY with say BOOST_REQUIRE forces the user to link with
the Boost Test Framewok object modules.
So my question is:
Is there some macro/facility/whatever which behaves like assert():
a) works without the Boost Test Framework
b) *AND* integrates into the BTF in those cases where the BTF is used?
Regards,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
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