Revirtualised IResultCapture methods

Didn't really impact runtime anyway, but will need to use interface for threading support.
This commit is contained in:
Phil Nash committed 2017-12-05 16:23:10 +00:00
1 parent 51e281a684
commit 533cdc6bc1
4 files changed
+57 -29

No files matched your search

@@ -11,6 +11,7 @@
#include <string>
#include "catch_stringref.h"
#include "catch_result_type.h"
namespace Catch {
@@ -22,6 +23,9 @@ namespace Catch {
struct Counts;
struct BenchmarkInfo;
struct BenchmarkStats;
struct AssertionReaction;
struct ITransientExpression;
struct IResultCapture {
@@ -40,6 +44,31 @@ namespace Catch {
virtual void handleFatalErrorCondition( StringRef message ) = 0;
virtual void handleExpr
( AssertionInfo const& info,
ITransientExpression const& expr,
AssertionReaction& reaction ) = 0;
virtual void handleMessage
( AssertionInfo const& info,
ResultWas::OfType resultType,
StringRef const& message,
AssertionReaction& reaction ) = 0;
virtual void handleUnexpectedExceptionNotThrown
( AssertionInfo const& info,
AssertionReaction& reaction ) = 0;
virtual void handleUnexpectedInflightException
( AssertionInfo const& info,
std::string const& message,
AssertionReaction& reaction ) = 0;
virtual void handleIncomplete
( AssertionInfo const& info ) = 0;
virtual void handleNonExpr
( AssertionInfo const &info,
ResultWas::OfType resultType,
AssertionReaction &reaction ) = 0;
virtual bool lastAssertionPassed() = 0;
virtual void assertionPassed() = 0;