24 Aug
2005
24 Aug
'05
3:53 p.m.
Hi. Is there a way inside a test case using the Unit Testing Framework to specify that a particular function call ought to fail? For example, I have a function that asserts when passed invalid input. In my test case I want to pass it an invalid parameter and check that the assert is triggered. I'm looking for a macro called BOOST_CHECK_FAILURE (or something like that), but cannot find one. All I see are macros that assert successes, and those that assert exceptions. But my particular function does not throw, it simply "assert()"s. Any ideas? Thanks, Mike