Changed the way info messages are handled.

This fixes issue with SCOPED_INFO and makes output more readable.
Needs some refactoring.
This commit is contained in:
Phil Nash 2013-02-02 19:58:04 +00:00
parent d658dea1dd
commit 207b27b3c5
16 changed files with 334 additions and 301 deletions

View file

@ -21,19 +21,25 @@ namespace Catch {
class AssertionResult;
struct AssertionInfo;
struct SectionInfo;
class MessageBuilder;
class ScopedMessageBuilder;
struct IResultCapture {
virtual ~IResultCapture();
virtual void testEnded( AssertionResult const& result ) = 0;
virtual void assertionEnded( AssertionResult const& result ) = 0;
virtual bool sectionStarted( SectionInfo const& sectionInfo,
Counts& assertions ) = 0;
virtual void sectionEnded( SectionInfo const& name, Counts const& assertions ) = 0;
virtual void pushScopedInfo( ScopedInfo* scopedInfo ) = 0;
virtual void popScopedInfo( ScopedInfo* scopedInfo ) = 0;
virtual void pushScopedInfo( ScopedInfo* scopedInfo ) = 0; // !TBD Deprecated
virtual void popScopedInfo( ScopedInfo* scopedInfo ) = 0; // !TBD Deprecated
virtual void pushScopedMessage( ScopedMessageBuilder const& _builder ) = 0;
virtual void popScopedMessage( ScopedMessageBuilder const& _builder ) = 0;
virtual bool shouldDebugBreak() const = 0;
virtual void acceptMessage( const MessageBuilder& messageBuilder ) = 0;
virtual ResultAction::Value acceptExpression( ExpressionResultBuilder const& assertionResult, AssertionInfo const& assertionInfo ) = 0;
virtual std::string getCurrentTestName() const = 0;