When running in a debugger under windows it would be nice if CPPUNIT_ASSERT(false); would stop like a break point as opposed to just reporting it at the end of the run. From what I can see this can be accomplished via adding code similar to that below to Asserter.cpp in the method Asserter::Fail(). This will cause a message to be printed in the IDE that when using visual studio, among others will bring the user straight to the line that contains the failed assertion by double clicking on the line in the debugger.
Asserter::fail( const Message &message,
const SourceLine &sourceLine )
oss << sourceLine.fileName() << "(" << sourceLine.lineNumber() << ") : " << message.shortDescription() << " " << message.details() << std::endl;
#endif // _WIN32
throw Exception( message, sourceLine ); 37 throw Exception( message, sourceLine );
just a thought.
Log in to post a comment.