Added self-test for section ordering

Added MockReporter for tracking test runs.
Added intrusive smart pointer. Config holds reporter by smart pointer, so we can route the mock reporter through multiple test runs
This commit is contained in:
Phil Nash
2012-05-04 07:55:11 +01:00
parent 83a66a6255
commit b213202ad7
16 changed files with 432 additions and 67 deletions

View File

@@ -38,7 +38,7 @@ namespace Catch
std::string m_label;
};
class BasicReporter : public IReporter
class BasicReporter : public SharedImpl<IReporter>
{
struct SpanInfo
{
@@ -311,7 +311,7 @@ namespace Catch
break;
}
if( resultInfo.hasExpression() && resultInfo.getExpression() != resultInfo.getExpandedExpression() )
if( resultInfo.hasExpandedExpression() )
{
m_config.stream() << " for: ";
TextColour colour( TextColour::ReconstructedExpression );

View File

@@ -19,7 +19,7 @@
namespace Catch
{
class JunitReporter : public Catch::IReporter
class JunitReporter : public SharedImpl<IReporter>
{
struct TestStats
{

View File

@@ -19,7 +19,7 @@
namespace Catch
{
class XmlReporter : public Catch::IReporter
class XmlReporter : public SharedImpl<IReporter>
{
public:
///////////////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@ namespace Catch
)
: m_config( config )
{
}
}
///////////////////////////////////////////////////////////////////////////
static std::string getDescription