mirror of https://github.com/catchorg/Catch2.git
Completed CumulativeReporterBase and reimplemented JUnitReporter in terms of it
This commit is contained in:
parent
1f519dd856
commit
2ddb9d3802
|
@ -116,7 +116,9 @@ namespace Catch {
|
||||||
bool empty() const {
|
bool empty() const {
|
||||||
return file.empty();
|
return file.empty();
|
||||||
}
|
}
|
||||||
|
bool operator == ( SourceLineInfo const& other ) const {
|
||||||
|
return line == other.line && file == other.file;
|
||||||
|
}
|
||||||
std::string file;
|
std::string file;
|
||||||
std::size_t line;
|
std::size_t line;
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,6 +58,8 @@ namespace Catch {
|
||||||
TestCaseStats::~TestCaseStats() {}
|
TestCaseStats::~TestCaseStats() {}
|
||||||
TestGroupStats::~TestGroupStats() {}
|
TestGroupStats::~TestGroupStats() {}
|
||||||
TestRunStats::~TestRunStats() {}
|
TestRunStats::~TestRunStats() {}
|
||||||
|
CumulativeReporterBase::SectionNode::~SectionNode() {}
|
||||||
|
CumulativeReporterBase::~CumulativeReporterBase() {}
|
||||||
|
|
||||||
BasicReporter::~BasicReporter() {}
|
BasicReporter::~BasicReporter() {}
|
||||||
StreamingReporterBase::~StreamingReporterBase() {}
|
StreamingReporterBase::~StreamingReporterBase() {}
|
||||||
|
@ -84,7 +86,7 @@ namespace Catch {
|
||||||
|
|
||||||
INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "basic", BasicReporter )
|
INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "basic", BasicReporter )
|
||||||
INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "xml", XmlReporter )
|
INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "xml", XmlReporter )
|
||||||
INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "junit", JunitReporter )
|
INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "junit2", JunitReporter2 )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,20 +46,6 @@ namespace Catch
|
||||||
bool shouldRedirectStdOut;
|
bool shouldRedirectStdOut;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<typename T, typename ChildT=T>
|
|
||||||
struct Node : SharedImpl<> {
|
|
||||||
Node( T const& _value, Node* _parent = NULL )
|
|
||||||
: value( _value ),
|
|
||||||
parent( _parent )
|
|
||||||
{}
|
|
||||||
virtual ~Node() {}
|
|
||||||
|
|
||||||
T value;
|
|
||||||
std::vector<Ptr<Node> > children;
|
|
||||||
Node* parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct LazyStat : Option<T> {
|
struct LazyStat : Option<T> {
|
||||||
LazyStat() : used( false ) {}
|
LazyStat() : used( false ) {}
|
||||||
|
@ -238,8 +224,6 @@ namespace Catch
|
||||||
|
|
||||||
struct StreamingReporterBase : SharedImpl<IStreamingReporter> {
|
struct StreamingReporterBase : SharedImpl<IStreamingReporter> {
|
||||||
|
|
||||||
typedef Ptr<Node<SectionInfo> > SectionInfoNode;
|
|
||||||
|
|
||||||
StreamingReporterBase( ReporterConfig const& _config )
|
StreamingReporterBase( ReporterConfig const& _config )
|
||||||
: m_config( _config.fullConfig() ),
|
: m_config( _config.fullConfig() ),
|
||||||
stream( _config.stream() )
|
stream( _config.stream() )
|
||||||
|
@ -260,8 +244,7 @@ namespace Catch
|
||||||
currentTestCaseInfo = _testInfo;
|
currentTestCaseInfo = _testInfo;
|
||||||
}
|
}
|
||||||
virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
|
virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
|
||||||
Ptr<Node<SectionInfo> > sectionInfo = new Node<SectionInfo>( _sectionInfo );
|
m_sectionStack.push_back( _sectionInfo );
|
||||||
m_sectionStack.push_back( sectionInfo );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) {
|
virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) {
|
||||||
|
@ -281,30 +264,137 @@ namespace Catch
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr<IConfig> m_config;
|
Ptr<IConfig> m_config;
|
||||||
|
std::ostream& stream;
|
||||||
|
|
||||||
LazyStat<TestRunInfo> currentTestRunInfo;
|
LazyStat<TestRunInfo> currentTestRunInfo;
|
||||||
LazyStat<GroupInfo> currentGroupInfo;
|
LazyStat<GroupInfo> currentGroupInfo;
|
||||||
LazyStat<TestCaseInfo> currentTestCaseInfo;
|
LazyStat<TestCaseInfo> currentTestCaseInfo;
|
||||||
std::ostream& stream;
|
|
||||||
|
|
||||||
std::vector<SectionInfoNode> m_sectionStack;
|
std::vector<SectionInfo> m_sectionStack;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CumulativeReporterBase : StreamingReporterBase {
|
struct CumulativeReporterBase : SharedImpl<IStreamingReporter> {
|
||||||
virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;
|
template<typename T, typename ChildNodeT>
|
||||||
virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;
|
struct Node : SharedImpl<> {
|
||||||
|
explicit Node( T const& _value ) : value( _value ) {}
|
||||||
|
virtual ~Node() {}
|
||||||
|
|
||||||
virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;
|
typedef std::vector<Ptr<ChildNodeT> > ChildNodes;
|
||||||
virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;
|
T value;
|
||||||
|
ChildNodes children;
|
||||||
|
};
|
||||||
|
struct SectionNode : SharedImpl<> {
|
||||||
|
explicit SectionNode( SectionStats const& _stats ) : stats( _stats ) {}
|
||||||
|
virtual ~SectionNode();
|
||||||
|
|
||||||
virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
|
bool operator == ( SectionNode const& other ) const {
|
||||||
|
return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;
|
||||||
|
}
|
||||||
|
bool operator == ( Ptr<SectionNode> const& other ) const {
|
||||||
|
return operator==( *other );
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
|
SectionStats stats;
|
||||||
virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
|
typedef std::vector<Ptr<SectionNode> > ChildSections;
|
||||||
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
|
typedef std::vector<AssertionStats> Assertions;
|
||||||
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;
|
ChildSections childSections;
|
||||||
virtual void testRunEnded( TestRunStats const& testRunStats ) = 0;
|
Assertions assertions;
|
||||||
|
std::string stdOut;
|
||||||
|
std::string stdErr;
|
||||||
|
};
|
||||||
|
friend bool operator == ( Ptr<SectionNode> const& node, SectionInfo const& other ) {
|
||||||
|
return node->stats.sectionInfo.lineInfo == other.lineInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef Node<TestCaseStats, SectionNode> TestCaseNode;
|
||||||
|
typedef Node<TestGroupStats, TestCaseNode> TestGroupNode;
|
||||||
|
typedef Node<TestRunStats, TestGroupNode> TestRunNode;
|
||||||
|
|
||||||
|
CumulativeReporterBase( ReporterConfig const& _config )
|
||||||
|
: m_config( _config.fullConfig() ),
|
||||||
|
stream( _config.stream() )
|
||||||
|
{}
|
||||||
|
~CumulativeReporterBase();
|
||||||
|
|
||||||
|
virtual void testRunStarting( TestRunInfo const& ) {}
|
||||||
|
virtual void testGroupStarting( GroupInfo const& ) {}
|
||||||
|
|
||||||
|
virtual void testCaseStarting( TestCaseInfo const& ) {}
|
||||||
|
|
||||||
|
virtual void sectionStarting( SectionInfo const& sectionInfo ) {
|
||||||
|
SectionStats incompleteStats( sectionInfo, Counts(), 0, false );
|
||||||
|
Ptr<SectionNode> node;
|
||||||
|
if( m_sectionStack.empty() ) {
|
||||||
|
if( !m_rootSection )
|
||||||
|
m_rootSection = new SectionNode( incompleteStats );
|
||||||
|
node = m_rootSection;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SectionNode& parentNode = *m_sectionStack.back();
|
||||||
|
SectionNode::ChildSections::const_iterator it =
|
||||||
|
std::find( parentNode.childSections.begin(), parentNode.childSections.end(), sectionInfo );
|
||||||
|
if( it == parentNode.childSections.end() ) {
|
||||||
|
node = new SectionNode( incompleteStats );
|
||||||
|
parentNode.childSections.push_back( node );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
node = *it;
|
||||||
|
}
|
||||||
|
m_sectionStack.push_back( node );
|
||||||
|
m_deepestSection = node;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void assertionStarting( AssertionInfo const& ) {}
|
||||||
|
|
||||||
|
virtual bool assertionEnded( AssertionStats const& assertionStats ) {
|
||||||
|
assert( !m_sectionStack.empty() );
|
||||||
|
SectionNode& sectionNode = *m_sectionStack.back();
|
||||||
|
sectionNode.assertions.push_back( assertionStats );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
virtual void sectionEnded( SectionStats const& sectionStats ) {
|
||||||
|
assert( !m_sectionStack.empty() );
|
||||||
|
SectionNode& node = *m_sectionStack.back();
|
||||||
|
node.stats = sectionStats;
|
||||||
|
m_sectionStack.pop_back();
|
||||||
|
}
|
||||||
|
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) {
|
||||||
|
Ptr<TestCaseNode> node = new TestCaseNode( testCaseStats );
|
||||||
|
assert( m_sectionStack.size() == 0 );
|
||||||
|
node->children.push_back( m_rootSection );
|
||||||
|
m_testCases.push_back( node );
|
||||||
|
m_rootSection.reset();
|
||||||
|
|
||||||
|
assert( m_deepestSection );
|
||||||
|
m_deepestSection->stdOut = testCaseStats.stdOut;
|
||||||
|
m_deepestSection->stdErr = testCaseStats.stdErr;
|
||||||
|
}
|
||||||
|
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) {
|
||||||
|
Ptr<TestGroupNode> node = new TestGroupNode( testGroupStats );
|
||||||
|
node->children.swap( m_testCases );
|
||||||
|
m_testGroups.push_back( node );
|
||||||
|
}
|
||||||
|
virtual void testRunEnded( TestRunStats const& testRunStats ) {
|
||||||
|
Ptr<TestRunNode> node = new TestRunNode( testRunStats );
|
||||||
|
node->children.swap( m_testGroups );
|
||||||
|
m_testRuns.push_back( node );
|
||||||
|
testRunEnded();
|
||||||
|
}
|
||||||
|
virtual void testRunEnded() = 0;
|
||||||
|
|
||||||
|
Ptr<IConfig> m_config;
|
||||||
|
std::ostream& stream;
|
||||||
|
std::vector<AssertionStats> m_assertions;
|
||||||
|
std::vector<std::vector<Ptr<SectionNode> > > m_sections;
|
||||||
|
std::vector<Ptr<TestCaseNode> > m_testCases;
|
||||||
|
std::vector<Ptr<TestGroupNode> > m_testGroups;
|
||||||
|
|
||||||
|
std::vector<Ptr<TestRunNode> > m_testRuns;
|
||||||
|
|
||||||
|
Ptr<SectionNode> m_rootSection;
|
||||||
|
Ptr<SectionNode> m_deepestSection;
|
||||||
|
std::vector<Ptr<SectionNode> > m_sectionStack;
|
||||||
|
|
||||||
std::vector<Ptr<Node<TestGroupStats> > > m_groups;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Deprecated
|
// Deprecated
|
||||||
|
|
|
@ -127,7 +127,7 @@ namespace Catch {
|
||||||
AutoReg::AutoReg( TestFunction function,
|
AutoReg::AutoReg( TestFunction function,
|
||||||
SourceLineInfo const& lineInfo,
|
SourceLineInfo const& lineInfo,
|
||||||
NameAndDesc const& nameAndDesc ) {
|
NameAndDesc const& nameAndDesc ) {
|
||||||
registerTestCase( new FreeFunctionTestCase( function ), "global", nameAndDesc, lineInfo );
|
registerTestCase( new FreeFunctionTestCase( function ), "", nameAndDesc, lineInfo );
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoReg::~AutoReg() {}
|
AutoReg::~AutoReg() {}
|
||||||
|
|
|
@ -174,9 +174,17 @@ inline std::string toString( unsigned int value ) {
|
||||||
|
|
||||||
inline std::string toString( const double value ) {
|
inline std::string toString( const double value ) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << std::setprecision (std::numeric_limits<double>::digits10 + 1)
|
oss << std::setprecision( 10 )
|
||||||
|
<< std::fixed
|
||||||
<< value;
|
<< value;
|
||||||
return oss.str();
|
std::string d = oss.str();
|
||||||
|
std::size_t i = d.find_last_not_of( '0' );
|
||||||
|
if( i != std::string::npos && i != d.size()-1 ) {
|
||||||
|
if( d[i] == '.' )
|
||||||
|
i++;
|
||||||
|
d = d.substr( 0, i+1 );
|
||||||
|
}
|
||||||
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string toString( bool value ) {
|
inline std::string toString( bool value ) {
|
||||||
|
|
|
@ -29,7 +29,6 @@ namespace Catch {
|
||||||
ReporterPreferences prefs;
|
ReporterPreferences prefs;
|
||||||
prefs.shouldRedirectStdOut = false;
|
prefs.shouldRedirectStdOut = false;
|
||||||
return prefs;
|
return prefs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void noMatchingTestCases( std::string const& spec ) {
|
virtual void noMatchingTestCases( std::string const& spec ) {
|
||||||
|
@ -267,14 +266,14 @@ namespace Catch {
|
||||||
if( m_sectionStack.size() > 1 ) {
|
if( m_sectionStack.size() > 1 ) {
|
||||||
Colour colourGuard( Colour::Headers );
|
Colour colourGuard( Colour::Headers );
|
||||||
|
|
||||||
std::vector<SectionInfoNode>::const_iterator
|
std::vector<SectionInfo>::const_iterator
|
||||||
it = m_sectionStack.begin()+1, // Skip first section (test case)
|
it = m_sectionStack.begin()+1, // Skip first section (test case)
|
||||||
itEnd = m_sectionStack.end();
|
itEnd = m_sectionStack.end();
|
||||||
for( ; it != itEnd; ++it )
|
for( ; it != itEnd; ++it )
|
||||||
printHeaderString( (*it)->value.name, 2 );
|
printHeaderString( it->name, 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceLineInfo lineInfo = m_sectionStack.front()->value.lineInfo;
|
SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
|
||||||
|
|
||||||
if( !lineInfo.empty() ){
|
if( !lineInfo.empty() ){
|
||||||
stream << getDashes() << "\n";
|
stream << getDashes() << "\n";
|
||||||
|
|
|
@ -17,7 +17,210 @@
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
class JunitReporter : public SharedImpl<IReporter> {
|
class JunitReporter : public CumulativeReporterBase {
|
||||||
|
public:
|
||||||
|
JunitReporter( ReporterConfig const& _config )
|
||||||
|
: CumulativeReporterBase( _config ),
|
||||||
|
xml( _config.stream() )
|
||||||
|
{}
|
||||||
|
|
||||||
|
~JunitReporter();
|
||||||
|
|
||||||
|
static std::string getDescription() {
|
||||||
|
return "Reports test results in an XML format that looks like Ant's junitreport target";
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void noMatchingTestCases( std::string const& /*spec*/ ) {}
|
||||||
|
|
||||||
|
virtual ReporterPreferences getPreferences() const {
|
||||||
|
ReporterPreferences prefs;
|
||||||
|
prefs.shouldRedirectStdOut = true;
|
||||||
|
return prefs;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void testRunStarting( TestRunInfo const& runInfo ) {
|
||||||
|
CumulativeReporterBase::testRunStarting( runInfo );
|
||||||
|
xml.startElement( "testsuites" );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void testGroupStarting( GroupInfo const& groupInfo ) {
|
||||||
|
suiteTimer.start();
|
||||||
|
stdOutForSuite.str("");
|
||||||
|
stdErrForSuite.str("");
|
||||||
|
unexpectedExceptions = 0;
|
||||||
|
CumulativeReporterBase::testGroupStarting( groupInfo );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool assertionEnded( AssertionStats const& assertionStats ) {
|
||||||
|
if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException )
|
||||||
|
unexpectedExceptions++;
|
||||||
|
return CumulativeReporterBase::assertionEnded( assertionStats );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) {
|
||||||
|
stdOutForSuite << testCaseStats.stdOut;
|
||||||
|
stdErrForSuite << testCaseStats.stdErr;
|
||||||
|
CumulativeReporterBase::testCaseEnded( testCaseStats );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) {
|
||||||
|
double suiteTime = suiteTimer.getElapsedSeconds();
|
||||||
|
CumulativeReporterBase::testGroupEnded( testGroupStats );
|
||||||
|
writeGroup( *m_testGroups.back(), suiteTime );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void testRunEnded() {
|
||||||
|
xml.endElement();
|
||||||
|
}
|
||||||
|
|
||||||
|
void writeGroup( TestGroupNode const& groupNode, double suiteTime ) {
|
||||||
|
XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" );
|
||||||
|
TestGroupStats const& stats = groupNode.value;
|
||||||
|
xml.writeAttribute( "name", stats.groupInfo.name );
|
||||||
|
xml.writeAttribute( "errors", unexpectedExceptions );
|
||||||
|
xml.writeAttribute( "failures", stats.totals.assertions.failed-unexpectedExceptions );
|
||||||
|
xml.writeAttribute( "tests", stats.totals.assertions.total() );
|
||||||
|
xml.writeAttribute( "hostname", "tbd" ); // !TBD
|
||||||
|
if( m_config->showDurations() == ShowDurations::Never )
|
||||||
|
xml.writeAttribute( "time", "" );
|
||||||
|
else
|
||||||
|
xml.writeAttribute( "time", suiteTime );
|
||||||
|
xml.writeAttribute( "timestamp", "tbd" ); // !TBD
|
||||||
|
|
||||||
|
// Write test cases
|
||||||
|
for( TestGroupNode::ChildNodes::const_iterator
|
||||||
|
it = groupNode.children.begin(), itEnd = groupNode.children.end();
|
||||||
|
it != itEnd;
|
||||||
|
++it )
|
||||||
|
writeTestCase( **it );
|
||||||
|
|
||||||
|
xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite.str() ), false );
|
||||||
|
xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite.str() ), false );
|
||||||
|
}
|
||||||
|
|
||||||
|
void writeTestCase( TestCaseNode const& testCaseNode ) {
|
||||||
|
TestCaseStats const& stats = testCaseNode.value;
|
||||||
|
|
||||||
|
// All test cases have exactly one section - which represents the
|
||||||
|
// test case itself. That section may have 0-n nested sections
|
||||||
|
assert( testCaseNode.children.size() == 1 );
|
||||||
|
SectionNode const& rootSection = *testCaseNode.children.front();
|
||||||
|
|
||||||
|
std::string className = stats.testInfo.className;
|
||||||
|
|
||||||
|
if( className.empty() ) {
|
||||||
|
if( rootSection.childSections.empty() )
|
||||||
|
className = "global";
|
||||||
|
}
|
||||||
|
writeSection( className, "", rootSection );
|
||||||
|
}
|
||||||
|
|
||||||
|
void writeSection( std::string const& className,
|
||||||
|
std::string const& rootName,
|
||||||
|
SectionNode const& sectionNode ) {
|
||||||
|
std::string name = trim( sectionNode.stats.sectionInfo.name );
|
||||||
|
if( !rootName.empty() )
|
||||||
|
name = rootName + "/" + name;
|
||||||
|
|
||||||
|
if( !sectionNode.assertions.empty() ||
|
||||||
|
!sectionNode.stdOut.empty() ||
|
||||||
|
!sectionNode.stdErr.empty() ) {
|
||||||
|
XmlWriter::ScopedElement e = xml.scopedElement( "testcase" );
|
||||||
|
if( className.empty() ) {
|
||||||
|
xml.writeAttribute( "classname", name );
|
||||||
|
xml.writeAttribute( "name", "root" );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xml.writeAttribute( "classname", className );
|
||||||
|
xml.writeAttribute( "name", name );
|
||||||
|
}
|
||||||
|
xml.writeAttribute( "time", toString( sectionNode.stats.durationInSeconds ) );
|
||||||
|
|
||||||
|
writeAssertions( sectionNode );
|
||||||
|
|
||||||
|
if( !sectionNode.stdOut.empty() )
|
||||||
|
xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), false );
|
||||||
|
if( !sectionNode.stdErr.empty() )
|
||||||
|
xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), false );
|
||||||
|
}
|
||||||
|
for( SectionNode::ChildSections::const_iterator
|
||||||
|
it = sectionNode.childSections.begin(),
|
||||||
|
itEnd = sectionNode.childSections.end();
|
||||||
|
it != itEnd;
|
||||||
|
++it )
|
||||||
|
if( className.empty() )
|
||||||
|
writeSection( name, "", **it );
|
||||||
|
else
|
||||||
|
writeSection( className, name, **it );
|
||||||
|
}
|
||||||
|
|
||||||
|
void writeAssertions( SectionNode const& sectionNode ) {
|
||||||
|
for( SectionNode::Assertions::const_iterator
|
||||||
|
it = sectionNode.assertions.begin(), itEnd = sectionNode.assertions.end();
|
||||||
|
it != itEnd;
|
||||||
|
++it )
|
||||||
|
writeAssertion( *it );
|
||||||
|
}
|
||||||
|
void writeAssertion( AssertionStats const& stats ) {
|
||||||
|
AssertionResult const& result = stats.assertionResult;
|
||||||
|
if( !result.isOk() ) {
|
||||||
|
std::string elementName;
|
||||||
|
switch( result.getResultType() ) {
|
||||||
|
case ResultWas::ThrewException:
|
||||||
|
elementName = "error";
|
||||||
|
break;
|
||||||
|
case ResultWas::ExplicitFailure:
|
||||||
|
elementName = "failure";
|
||||||
|
break;
|
||||||
|
case ResultWas::ExpressionFailed:
|
||||||
|
elementName = "failure";
|
||||||
|
break;
|
||||||
|
case ResultWas::DidntThrowException:
|
||||||
|
elementName = "failure";
|
||||||
|
break;
|
||||||
|
|
||||||
|
// We should never see these here:
|
||||||
|
case ResultWas::Info:
|
||||||
|
case ResultWas::Warning:
|
||||||
|
case ResultWas::Ok:
|
||||||
|
case ResultWas::Unknown:
|
||||||
|
case ResultWas::FailureBit:
|
||||||
|
case ResultWas::Exception:
|
||||||
|
elementName = "internalError";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlWriter::ScopedElement e = xml.scopedElement( elementName );
|
||||||
|
|
||||||
|
xml.writeAttribute( "message", result.getExpandedExpression() );
|
||||||
|
xml.writeAttribute( "type", result.getTestMacroName() );
|
||||||
|
|
||||||
|
std::ostringstream oss;
|
||||||
|
if( !result.getMessage().empty() )
|
||||||
|
oss << result.getMessage() << "\n";
|
||||||
|
for( std::vector<MessageInfo>::const_iterator
|
||||||
|
it = stats.infoMessages.begin(),
|
||||||
|
itEnd = stats.infoMessages.end();
|
||||||
|
it != itEnd;
|
||||||
|
++it )
|
||||||
|
if( it->type == ResultWas::Info )
|
||||||
|
oss << it->message << "\n";
|
||||||
|
|
||||||
|
oss << "at " << result.getSourceInfo();
|
||||||
|
xml.writeText( oss.str(), false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlWriter xml;
|
||||||
|
Timer suiteTimer;
|
||||||
|
std::ostringstream stdOutForSuite;
|
||||||
|
std::ostringstream stdErrForSuite;
|
||||||
|
unsigned int unexpectedExceptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
INTERNAL_CATCH_REGISTER_REPORTER( "junit", JunitReporter )
|
||||||
|
|
||||||
|
class JunitReporter2 : public SharedImpl<IReporter> {
|
||||||
|
|
||||||
struct TestStats {
|
struct TestStats {
|
||||||
std::string m_element;
|
std::string m_element;
|
||||||
|
@ -65,12 +268,12 @@ namespace Catch {
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JunitReporter( ReporterConfig const& config )
|
JunitReporter2( ReporterConfig const& config )
|
||||||
: m_config( config ),
|
: m_config( config ),
|
||||||
m_testSuiteStats( "AllTests" ),
|
m_testSuiteStats( "AllTests" ),
|
||||||
m_currentStats( &m_testSuiteStats )
|
m_currentStats( &m_testSuiteStats )
|
||||||
{}
|
{}
|
||||||
virtual ~JunitReporter();
|
// virtual ~JunitReporter2();
|
||||||
|
|
||||||
static std::string getDescription() {
|
static std::string getDescription() {
|
||||||
return "Reports test results in an XML format that looks like Ant's junitreport target";
|
return "Reports test results in an XML format that looks like Ant's junitreport target";
|
||||||
|
|
|
@ -186,7 +186,7 @@ with expansion:
|
||||||
ConditionTests.cpp: FAILED:
|
ConditionTests.cpp: FAILED:
|
||||||
CHECK( data.float_nine_point_one > 9.2 )
|
CHECK( data.float_nine_point_one > 9.2 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 9.199999999999999
|
9.1 > 9.2
|
||||||
|
|
||||||
ConditionTests.cpp: FAILED:
|
ConditionTests.cpp: FAILED:
|
||||||
CHECK( data.str_hello > "hello" )
|
CHECK( data.str_hello > "hello" )
|
||||||
|
@ -907,13 +907,13 @@ ApproxTests.cpp:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) )
|
REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
3.142857142857143 == Approx( 3.141 )
|
3.1428571429 == Approx( 3.141 )
|
||||||
|
|
||||||
ApproxTests.cpp:
|
ApproxTests.cpp:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) )
|
REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
3.142857142857143 != Approx( 3.141 )
|
3.1428571429 != Approx( 3.141 )
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
./succeeding/TestClass/succeedingCase
|
./succeeding/TestClass/succeedingCase
|
||||||
|
@ -1253,7 +1253,7 @@ ConditionTests.cpp:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one < 9.2 )
|
REQUIRE( data.float_nine_point_one < 9.2 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 < 9.199999999999999
|
9.1 < 9.2
|
||||||
|
|
||||||
ConditionTests.cpp:
|
ConditionTests.cpp:
|
||||||
PASSED:
|
PASSED:
|
||||||
|
@ -1350,7 +1350,7 @@ with expansion:
|
||||||
ConditionTests.cpp: FAILED:
|
ConditionTests.cpp: FAILED:
|
||||||
CHECK( data.float_nine_point_one > 9.2 )
|
CHECK( data.float_nine_point_one > 9.2 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 9.199999999999999
|
9.1 > 9.2
|
||||||
|
|
||||||
ConditionTests.cpp: FAILED:
|
ConditionTests.cpp: FAILED:
|
||||||
CHECK( data.str_hello > "hello" )
|
CHECK( data.str_hello > "hello" )
|
||||||
|
@ -7175,28 +7175,28 @@ No test cases matched '~dummy 4'
|
||||||
No tests ran
|
No tests ran
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="~dummy" errors="10" failures="81" tests="756" hostname="tbd" time="" timestamp="tbd">
|
<testsuite name="~dummy" errors="10" failures="99" tests="756" hostname="tbd" time="0.027385" timestamp="tbd">
|
||||||
<testcase classname="global" name="./succeeding/Approx/simple" time="0"/>
|
<testcase classname="global" name="./succeeding/Approx/simple" time="0.000086"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/epsilon" time="0"/>
|
<testcase classname="global" name="./succeeding/Approx/epsilon" time="0.000022"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/float" time="0"/>
|
<testcase classname="global" name="./succeeding/Approx/float" time="0.000022"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/int" time="0"/>
|
<testcase classname="global" name="./succeeding/Approx/int" time="0.00002"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/mixed" time="0"/>
|
<testcase classname="global" name="./succeeding/Approx/mixed" time="0.00005"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/custom" time="0"/>
|
<testcase classname="global" name="./succeeding/Approx/custom" time="0.000073"/>
|
||||||
<testcase classname="global" name="Approximate PI" time="0"/>
|
<testcase classname="global" name="Approximate PI" time="0.00002"/>
|
||||||
<testcase classname="TestClass" name="./succeeding/TestClass/succeedingCase" time="0"/>
|
<testcase classname="TestClass" name="./succeeding/TestClass/succeedingCase" time="0.000007"/>
|
||||||
<testcase classname="TestClass" name="./failing/TestClass/failingCase" time="0">
|
<testcase classname="TestClass" name="./failing/TestClass/failingCase" time="0.0">
|
||||||
<failure message=""hello" == "world"" type="REQUIRE">
|
<failure message=""hello" == "world"" type="REQUIRE">
|
||||||
ClassTests.cpp
|
ClassTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="Fixture" name="./succeeding/Fixture/succeedingCase" time="0"/>
|
<testcase classname="Fixture" name="./succeeding/Fixture/succeedingCase" time="0.000009"/>
|
||||||
<testcase classname="Fixture" name="./failing/Fixture/failingCase" time="0">
|
<testcase classname="Fixture" name="./failing/Fixture/failingCase" time="0.0">
|
||||||
<failure message="1 == 2" type="REQUIRE">
|
<failure message="1 == 2" type="REQUIRE">
|
||||||
ClassTests.cpp
|
ClassTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/conditions/equality" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/equality" time="0.000079"/>
|
||||||
<testcase classname="global" name="./failing/conditions/equality" time="0">
|
<testcase classname="global" name="./failing/conditions/equality" time="0.000139">
|
||||||
<failure message="7 == 6" type="CHECK">
|
<failure message="7 == 6" type="CHECK">
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7237,8 +7237,8 @@ ConditionTests.cpp
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/conditions/inequality" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/inequality" time="0.000093"/>
|
||||||
<testcase classname="global" name="./failing/conditions/inequality" time="0">
|
<testcase classname="global" name="./failing/conditions/inequality" time="0.000048">
|
||||||
<failure message="7 != 7" type="CHECK">
|
<failure message="7 != 7" type="CHECK">
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7255,8 +7255,8 @@ ConditionTests.cpp
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/conditions/ordered" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/ordered" time="0.000138"/>
|
||||||
<testcase classname="global" name="./failing/conditions/ordered" time="0">
|
<testcase classname="global" name="./failing/conditions/ordered" time="0.000135">
|
||||||
<failure message="7 > 7" type="CHECK">
|
<failure message="7 > 7" type="CHECK">
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7287,7 +7287,7 @@ ConditionTests.cpp
|
||||||
<failure message="9.1 > 10" type="CHECK">
|
<failure message="9.1 > 10" type="CHECK">
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 > 9.199999999999999" type="CHECK">
|
<failure message="9.1 > 9.2" type="CHECK">
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<failure message=""hello" > "hello"" type="CHECK">
|
<failure message=""hello" > "hello"" type="CHECK">
|
||||||
|
@ -7315,14 +7315,14 @@ ConditionTests.cpp
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/conditions/int literals" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/int literals" time="0.000105"/>
|
||||||
<testcase classname="global" name="./succeeding/conditions//long_to_unsigned_x" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions//long_to_unsigned_x" time="0.000037"/>
|
||||||
<testcase classname="global" name="./succeeding/conditions/const ints to int literal" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/const ints to int literal" time="0.00003"/>
|
||||||
<testcase classname="global" name="./succeeding/conditions/negative ints" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/negative ints" time="0.000038"/>
|
||||||
<testcase classname="global" name="./succeeding/conditions/computed ints" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/computed ints" time="0.000007"/>
|
||||||
<testcase classname="global" name="./succeeding/conditions/ptr" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/ptr" time="0.000066"/>
|
||||||
<testcase classname="global" name="./succeeding/conditions/not" time="0"/>
|
<testcase classname="global" name="./succeeding/conditions/not" time="0.000048"/>
|
||||||
<testcase classname="global" name="./failing/conditions/not" time="0">
|
<testcase classname="global" name="./failing/conditions/not" time="0.000042">
|
||||||
<failure message="false != false" type="CHECK">
|
<failure message="false != false" type="CHECK">
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7348,189 +7348,171 @@ ConditionTests.cpp
|
||||||
ConditionTests.cpp
|
ConditionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/exceptions/explicit" time="0"/>
|
<testcase classname="global" name="./succeeding/exceptions/explicit" time="0.000041"/>
|
||||||
<testcase classname="global" name="./failing/exceptions/explicit" time="0">
|
<testcase classname="global" name="./failing/exceptions/explicit" time="0.000045">
|
||||||
<error message="thisThrows()" type="CHECK_THROWS_AS">
|
<error message="thisThrows()" type="CHECK_THROWS_AS">
|
||||||
|
expected exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
<failure message="thisDoesntThrow()" type="CHECK_THROWS_AS">
|
<failure message="thisDoesntThrow()" type="CHECK_THROWS_AS">
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<error message="thisThrows()" type="CHECK_NOTHROW">
|
<error message="thisThrows()" type="CHECK_NOTHROW">
|
||||||
|
expected exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/implicit" time="0">
|
<testcase classname="global" name="./failing/exceptions/implicit" time="0.0">
|
||||||
<error type="TEST_CASE">
|
<error type="TEST_CASE">
|
||||||
|
unexpected exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/implicit/2" time="0">
|
<testcase classname="global" name="./failing/exceptions/implicit/2" time="0.0">
|
||||||
<error message="{Unknown expression after the reported line}">
|
<error message="{Unknown expression after the reported line}">
|
||||||
|
unexpected exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/implicit/3" time="0">
|
<testcase classname="./failing/exceptions/implicit/3" name="section name" time="0.000004">
|
||||||
<error type="TEST_CASE">
|
<error type="TEST_CASE">
|
||||||
|
unexpected exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/implicit/4" time="0">
|
<testcase classname="global" name="./failing/exceptions/implicit/4" time="0.000016">
|
||||||
<error message="thisThrows() == 0" type="CHECK">
|
<error message="thisThrows() == 0" type="CHECK">
|
||||||
|
expected exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/exceptions/implicit" time="0"/>
|
<testcase classname="global" name="./failing/exceptions/custom" time="0.0">
|
||||||
<testcase classname="global" name="./failing/exceptions/custom" time="0">
|
|
||||||
<error type="TEST_CASE">
|
<error type="TEST_CASE">
|
||||||
|
custom exception
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/custom/nothrow" time="0">
|
<testcase classname="global" name="./failing/exceptions/custom/nothrow" time="0.0">
|
||||||
<error message="throwCustom()" type="REQUIRE_NOTHROW">
|
<error message="throwCustom()" type="REQUIRE_NOTHROW">
|
||||||
|
custom exception - not std
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/custom/throw" time="0">
|
<testcase classname="global" name="./failing/exceptions/custom/throw" time="0.000018">
|
||||||
<error message="throwCustom()" type="REQUIRE_THROWS_AS">
|
<error message="throwCustom()" type="REQUIRE_THROWS_AS">
|
||||||
|
custom exception - not std
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/exceptions/custom/double" time="0">
|
<testcase classname="global" name="./failing/exceptions/custom/double" time="0.0">
|
||||||
<error type="TEST_CASE">
|
<error type="TEST_CASE">
|
||||||
|
3.14
|
||||||
ExceptionTests.cpp
|
ExceptionTests.cpp
|
||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/exceptions/notimplemented" time="0"/>
|
<testcase classname="global" name="./succeeding/exceptions/notimplemented" time="0.000018"/>
|
||||||
<testcase classname="global" name="./succeeding/generators/1" time="0"/>
|
<testcase classname="global" name="./succeeding/generators/1" time="0.000016"/>
|
||||||
<testcase classname="global" name="./succeeding/generators/2" time="0"/>
|
<testcase classname="global" name="./succeeding/generators/2" time="0.000009"/>
|
||||||
<testcase classname="global" name="./succeeding/message" time="0">
|
<testcase classname="global" name="./succeeding/message" time="0.000014"/>
|
||||||
<info type="INFO">
|
<testcase classname="global" name="./succeeding/succeed" time="0.000008"/>
|
||||||
MessageTests.cpp
|
<testcase classname="global" name="./failing/message/info/1" time="0.0">
|
||||||
</info>
|
|
||||||
<warning type="WARN">
|
|
||||||
MessageTests.cpp
|
|
||||||
</warning>
|
|
||||||
</testcase>
|
|
||||||
<testcase classname="global" name="./succeeding/succeed" time="0"/>
|
|
||||||
<testcase classname="global" name="./failing/message/info/1" time="0">
|
|
||||||
<info type="INFO">
|
|
||||||
MessageTests.cpp
|
|
||||||
</info>
|
|
||||||
<info type="INFO">
|
|
||||||
MessageTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="2 == 1" type="REQUIRE">
|
<failure message="2 == 1" type="REQUIRE">
|
||||||
|
this message should be logged
|
||||||
|
so should this
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./mixed/message/info/2" time="0">
|
<testcase classname="global" name="./mixed/message/info/2" time="0.000044">
|
||||||
<info type="INFO">
|
|
||||||
MessageTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="2 == 1" type="CHECK">
|
<failure message="2 == 1" type="CHECK">
|
||||||
|
this message should be logged
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<info type="INFO">
|
|
||||||
MessageTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="2 == 0" type="CHECK">
|
<failure message="2 == 0" type="CHECK">
|
||||||
|
and this, but later
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/message/fail" time="0">
|
<testcase classname="global" name="./failing/message/fail" time="0.0">
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
|
This is a failure
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/message/sections" time="0">
|
<testcase classname="./failing/message/sections" name="one" time="0.000014">
|
||||||
<failure type="FAIL">
|
|
||||||
MessageTests.cpp
|
|
||||||
</failure>
|
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
|
Message from section one
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/message/sections/stdout" time="0">
|
<testcase classname="./failing/message/sections" name="two" time="0.000015">
|
||||||
|
<failure type="FAIL">
|
||||||
|
Message from section two
|
||||||
|
MessageTests.cpp
|
||||||
|
</failure>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="./succeeding/message/sections/stdout" name="two" time="0.000001">
|
||||||
<system-out>
|
<system-out>
|
||||||
Message from section one
|
Message from section one
|
||||||
Message from section two
|
Message from section two
|
||||||
</system-out>
|
</system-out>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./mixed/message/scoped" time="0">
|
<testcase classname="global" name="./mixed/message/scoped" time="0.0">
|
||||||
<info type="INFO">
|
|
||||||
MessageTests.cpp
|
|
||||||
</info>
|
|
||||||
<info type="CAPTURE">
|
|
||||||
MessageTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="10 < 10" type="REQUIRE">
|
<failure message="10 < 10" type="REQUIRE">
|
||||||
|
current counter 10
|
||||||
|
i := 10
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/nofail" time="0">
|
<testcase classname="global" name="./succeeding/nofail" time="0.000007"/>
|
||||||
<failure message="1 == 2" type="CHECK_NOFAIL">
|
<testcase classname="global" name="just failure" time="0.0">
|
||||||
MessageTests.cpp
|
|
||||||
</failure>
|
|
||||||
</testcase>
|
|
||||||
<testcase classname="global" name="just info" time="0"/>
|
|
||||||
<testcase classname="global" name="just failure" time="0">
|
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
|
Previous info should not be seen
|
||||||
MessageTests.cpp
|
MessageTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/Misc/Sections" time="0"/>
|
<testcase classname="./succeeding/Misc/Sections" name="s1" time="0.000012"/>
|
||||||
<testcase classname="global" name="./succeeding/Misc/Sections/nested" time="0"/>
|
<testcase classname="./succeeding/Misc/Sections" name="s2" time="0.000006"/>
|
||||||
<testcase classname="global" name="./mixed/Misc/Sections/nested2" time="0">
|
<testcase classname="./succeeding/Misc/Sections/nested" name="s1" time="0.000023"/>
|
||||||
|
<testcase classname="./succeeding/Misc/Sections/nested" name="s1/s2" time="0.000005"/>
|
||||||
|
<testcase classname="./mixed/Misc/Sections/nested2" name="s1/s2" time="0.000017">
|
||||||
<failure message="1 == 2" type="REQUIRE">
|
<failure message="1 == 2" type="REQUIRE">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./Sections/nested/a/b" time="0"/>
|
<testcase classname="./mixed/Misc/Sections/nested2" name="s1/s3" time="0.000006"/>
|
||||||
<testcase classname="global" name="./mixed/Misc/Sections/loops" time="0">
|
<testcase classname="./mixed/Misc/Sections/nested2" name="s1/s4" time="0.000007"/>
|
||||||
|
<testcase classname="./mixed/Misc/Sections/loops" name="s1" time="0.000007">
|
||||||
<failure message="0 > 1" type="CHECK">
|
<failure message="0 > 1" type="CHECK">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./mixed/Misc/loops" time="0">
|
<testcase classname="global" name="./mixed/Misc/loops" time="0.000089">
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="1 == 0" type="CHECK">
|
<failure message="1 == 0" type="CHECK">
|
||||||
|
Testing if fib[0] (1) is even
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="1 == 0" type="CHECK">
|
<failure message="1 == 0" type="CHECK">
|
||||||
|
Testing if fib[1] (1) is even
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="1 == 0" type="CHECK">
|
<failure message="1 == 0" type="CHECK">
|
||||||
|
Testing if fib[3] (3) is even
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="1 == 0" type="CHECK">
|
<failure message="1 == 0" type="CHECK">
|
||||||
|
Testing if fib[4] (5) is even
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="1 == 0" type="CHECK">
|
<failure message="1 == 0" type="CHECK">
|
||||||
|
Testing if fib[6] (13) is even
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="1 == 0" type="CHECK">
|
<failure message="1 == 0" type="CHECK">
|
||||||
|
Testing if fib[7] (21) is even
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/Misc/stdout,stderr" time="0">
|
<testcase classname="global" name="./succeeding/Misc/stdout,stderr" time="0.000011">
|
||||||
<system-out>
|
<system-out>
|
||||||
Some information
|
Some information
|
||||||
</system-out>
|
</system-out>
|
||||||
|
@ -7538,20 +7520,16 @@ Some information
|
||||||
An error
|
An error
|
||||||
</system-err>
|
</system-err>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/Misc/null strings" time="0"/>
|
<testcase classname="global" name="./succeeding/Misc/null strings" time="0.000021"/>
|
||||||
<testcase classname="global" name="./failing/info" time="0">
|
<testcase classname="global" name="./failing/info" time="0.0">
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<info type="CAPTURE">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="false" type="REQUIRE">
|
<failure message="false" type="REQUIRE">
|
||||||
|
hi
|
||||||
|
i := 7
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/checkedif" time="0"/>
|
<testcase classname="global" name="./succeeding/checkedif" time="0.000012"/>
|
||||||
<testcase classname="global" name="./failing/checkedif" time="0">
|
<testcase classname="global" name="./failing/checkedif" time="0.0">
|
||||||
<failure message="false" type="CHECKED_IF">
|
<failure message="false" type="CHECKED_IF">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7559,8 +7537,8 @@ MiscTests.cpp
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/checkedelse" time="0"/>
|
<testcase classname="global" name="./succeeding/checkedelse" time="0.000013"/>
|
||||||
<testcase classname="global" name="./failing/checkedelse" time="0">
|
<testcase classname="global" name="./failing/checkedelse" time="0.0">
|
||||||
<failure message="false" type="CHECKED_ELSE">
|
<failure message="false" type="CHECKED_ELSE">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7568,63 +7546,65 @@ MiscTests.cpp
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./misc/xmlentitycheck" time="0"/>
|
<testcase classname="global" name="./manual/onechar" time="0.0">
|
||||||
<testcase classname="global" name="./manual/onechar" time="0">
|
|
||||||
<info type="INFO">
|
|
||||||
MiscTests.cpp
|
|
||||||
</info>
|
|
||||||
<failure message="false" type="REQUIRE">
|
<failure message="false" type="REQUIRE">
|
||||||
|
3
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/atomic if" time="0"/>
|
<testcase classname="global" name="./succeeding/atomic if" time="0.000011"/>
|
||||||
<testcase classname="global" name="./succeeding/matchers" time="0"/>
|
<testcase classname="global" name="./succeeding/matchers" time="0.000052"/>
|
||||||
<testcase classname="global" name="./failing/matchers/Contains" time="0">
|
<testcase classname="global" name="./failing/matchers/Contains" time="0.000011">
|
||||||
<failure message=""this string contains 'abc' as a substring" contains: "not there"" type="CHECK_THAT">
|
<failure message=""this string contains 'abc' as a substring" contains: "not there"" type="CHECK_THAT">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/matchers/StartsWith" time="0">
|
<testcase classname="global" name="./failing/matchers/StartsWith" time="0.000012">
|
||||||
<failure message=""this string contains 'abc' as a substring" starts with: "string"" type="CHECK_THAT">
|
<failure message=""this string contains 'abc' as a substring" starts with: "string"" type="CHECK_THAT">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/matchers/EndsWith" time="0">
|
<testcase classname="global" name="./failing/matchers/EndsWith" time="0.000012">
|
||||||
<failure message=""this string contains 'abc' as a substring" ends with: "this"" type="CHECK_THAT">
|
<failure message=""this string contains 'abc' as a substring" ends with: "this"" type="CHECK_THAT">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/matchers/Equals" time="0">
|
<testcase classname="global" name="./failing/matchers/Equals" time="0.000011">
|
||||||
<failure message=""this string contains 'abc' as a substring" equals: "something else"" type="CHECK_THAT">
|
<failure message=""this string contains 'abc' as a substring" equals: "something else"" type="CHECK_THAT">
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="string" time="0"/>
|
<testcase classname="global" name="string" time="0.00001"/>
|
||||||
<testcase classname="global" name="./succeeding/matchers/AllOf" time="0"/>
|
<testcase classname="global" name="./succeeding/matchers/AllOf" time="0.000022"/>
|
||||||
<testcase classname="global" name="./succeeding/matchers/AnyOf" time="0"/>
|
<testcase classname="global" name="./succeeding/matchers/AnyOf" time="0.000041"/>
|
||||||
<testcase classname="global" name="./succeeding/matchers/Equals" time="0"/>
|
<testcase classname="global" name="./succeeding/matchers/Equals" time="0.000011"/>
|
||||||
<testcase classname="global" name="Factorials are computed" time="0"/>
|
<testcase classname="global" name="Factorials are computed" time="0.000053"/>
|
||||||
<testcase classname="global" name="empty" time="0"/>
|
<testcase classname="global" name="Nice descriptive name" time="0.000008"/>
|
||||||
<testcase classname="global" name="Nice descriptive name" time="0">
|
<testcase classname="vectors can be sized and resized" name="root" time="0.000049"/>
|
||||||
<warning type="WARN">
|
<testcase classname="vectors can be sized and resized" name="resizing bigger changes size and capacity" time="0.000016"/>
|
||||||
MiscTests.cpp
|
<testcase classname="vectors can be sized and resized" name="resizing smaller changes size but not capacity" time="0.000025"/>
|
||||||
</warning>
|
<testcase classname="vectors can be sized and resized" name="resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="0.000006"/>
|
||||||
</testcase>
|
<testcase classname="vectors can be sized and resized" name="reserving bigger changes capacity but not size" time="0.000013"/>
|
||||||
<testcase classname="global" name="first tag" time="0"/>
|
<testcase classname="vectors can be sized and resized" name="reserving smaller does not change size or capacity" time="0.000012"/>
|
||||||
<testcase classname="global" name="second tag" time="0"/>
|
<testcase classname="./failing/CatchSectionInfiniteLoop" name="root" time="0.0">
|
||||||
<testcase classname="global" name="vectors can be sized and resized" time="0"/>
|
|
||||||
<testcase classname="global" name="./failing/CatchSectionInfiniteLoop" time="0">
|
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
|
to infinity and beyond
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
|
to infinity and beyond
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
|
to infinity and beyond
|
||||||
MiscTests.cpp
|
MiscTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="selftest/main" time="0">
|
<testcase classname="./failing/CatchSectionInfiniteLoop" name="Outer/Inner" time="0.000009"/>
|
||||||
|
<testcase classname="selftest/main" name="selftest/expected result/selftest/expected result/failing tests" time="0.003089"/>
|
||||||
|
<testcase classname="selftest/main" name="selftest/expected result/selftest/expected result/succeeding tests" time="0.006112"/>
|
||||||
|
<testcase classname="selftest/main" name="selftest/test counts/selftest/test counts/succeeding tests" time="0.002688"/>
|
||||||
|
<testcase classname="selftest/main" name="selftest/test counts/selftest/test counts/failing tests" time="0.000995">
|
||||||
<system-out>
|
<system-out>
|
||||||
Message from section one
|
Message from section one
|
||||||
Message from section two
|
Message from section two
|
||||||
|
@ -7638,33 +7618,58 @@ An error
|
||||||
An error
|
An error
|
||||||
</system-err>
|
</system-err>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="meta/Misc/Sections" time="0"/>
|
<testcase classname="global" name="meta/Misc/Sections" time="0.000201"/>
|
||||||
<testcase classname="global" name="Process can be configured on command line" time="0"/>
|
<testcase classname="Process can be configured on command line" name="default - no arguments" time="0.000074"/>
|
||||||
<testcase classname="global" name="selftest/test filter" time="0"/>
|
<testcase classname="Process can be configured on command line" name="test lists/1 test" time="0.000076"/>
|
||||||
<testcase classname="global" name="selftest/test filters" time="0"/>
|
<testcase classname="Process can be configured on command line" name="test lists/Specify one test case exclusion using exclude:" time="0.000073"/>
|
||||||
<testcase classname="global" name="selftest/filter/prefix wildcard" time="0"/>
|
<testcase classname="Process can be configured on command line" name="test lists/Specify one test case exclusion using ~" time="0.000077"/>
|
||||||
<testcase classname="global" name="selftest/filter/wildcard at both ends" time="0"/>
|
<testcase classname="Process can be configured on command line" name="test lists/Specify two test cases using -t" time="0.000087"/>
|
||||||
<testcase classname="global" name="selftest/tags" time="0"/>
|
<testcase classname="Process can be configured on command line" name="reporter/-r/console" time="0.000051"/>
|
||||||
<testcase classname="global" name="Long strings can be wrapped" time="0"/>
|
<testcase classname="Process can be configured on command line" name="reporter/-r/xml" time="0.00005"/>
|
||||||
<testcase classname="global" name="Strings can be rendered with colour" time="0">
|
<testcase classname="Process can be configured on command line" name="reporter/--reporter/junit" time="0.000045"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="debugger/-b" time="0.000048"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="debugger/--break" time="0.000043"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="abort/-a aborts after first failure" time="0.000047"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="abort/-x 2 aborts after two failures" time="0.000052"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="abort/-x must be greater than zero" time="0.000074"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="abort/-x must be numeric" time="0.00007"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="nothrow/-e" time="0.000045"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="nothrow/--nothrow" time="0.000044"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="output filename/-o filename" time="0.000047"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="output filename/--out" time="0.000044"/>
|
||||||
|
<testcase classname="Process can be configured on command line" name="combinations/Single character flags can be combined" time="0.000063"/>
|
||||||
|
<testcase classname="global" name="selftest/test filter" time="0.000078"/>
|
||||||
|
<testcase classname="global" name="selftest/test filters" time="0.000042"/>
|
||||||
|
<testcase classname="global" name="selftest/filter/prefix wildcard" time="0.00002"/>
|
||||||
|
<testcase classname="global" name="selftest/filter/wildcard at both ends" time="0.000036"/>
|
||||||
|
<testcase classname="selftest/tags" name="one tag" time="0.000109"/>
|
||||||
|
<testcase classname="selftest/tags" name="two tags" time="0.000117"/>
|
||||||
|
<testcase classname="selftest/tags" name="one tag with characters either side" time="0.000037"/>
|
||||||
|
<testcase classname="selftest/tags" name="start of a tag, but not closed" time="0.000025"/>
|
||||||
|
<testcase classname="selftest/tags" name="hidden" time="0.000034"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/No wrapping" time="0.000027"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped once" time="0.000051"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped twice" time="0.000034"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/Wrapped three times" time="0.00002"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/Short wrap" time="0.000061"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/As container" time="0.000033"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="plain string/Indent first line differently" time="0.000013"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="With newlines/No wrapping" time="0.000032"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="With newlines/Trailing newline" time="0.000027"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="With newlines/Wrapped once" time="0.000032"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="With newlines/Wrapped twice" time="0.00001"/>
|
||||||
|
<testcase classname="Long strings can be wrapped" name="With tabs" time="0.000015"/>
|
||||||
|
<testcase classname="global" name="Strings can be rendered with colour" time="0.000008">
|
||||||
<system-out>
|
<system-out>
|
||||||
hello
|
hello
|
||||||
hello
|
hello
|
||||||
</system-out>
|
</system-out>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="Text can be formatted using the Text class" time="0"/>
|
<testcase classname="global" name="Text can be formatted using the Text class" time="0.000019"/>
|
||||||
<testcase classname="global" name="./succeeding/Tricky/std::pair" time="0"/>
|
<testcase classname="global" name="./succeeding/Tricky/std::pair" time="0.00001"/>
|
||||||
<testcase classname="global" name="./inprogress/failing/Tricky/trailing expression" time="0">
|
<testcase classname="global" name="./inprogress/failing/Tricky/trailing expression" time="0.000012"/>
|
||||||
<warning type="WARN">
|
<testcase classname="global" name="./inprogress/failing/Tricky/compound lhs" time="0.000011"/>
|
||||||
TrickyTests.cpp
|
<testcase classname="global" name="./failing/Tricky/non streamable type" time="0.000014">
|
||||||
</warning>
|
|
||||||
</testcase>
|
|
||||||
<testcase classname="global" name="./inprogress/failing/Tricky/compound lhs" time="0">
|
|
||||||
<warning type="WARN">
|
|
||||||
TrickyTests.cpp
|
|
||||||
</warning>
|
|
||||||
</testcase>
|
|
||||||
<testcase classname="global" name="./failing/Tricky/non streamable type" time="0">
|
|
||||||
<failure message="0x<hex digits> == 0x<hex digits>" type="CHECK">
|
<failure message="0x<hex digits> == 0x<hex digits>" type="CHECK">
|
||||||
TrickyTests.cpp
|
TrickyTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
|
@ -7672,57 +7677,80 @@ TrickyTests.cpp
|
||||||
TrickyTests.cpp
|
TrickyTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./failing/string literals" time="0">
|
<testcase classname="global" name="./failing/string literals" time="0.0">
|
||||||
<failure message=""first" == "second"" type="REQUIRE">
|
<failure message=""first" == "second"" type="REQUIRE">
|
||||||
TrickyTests.cpp
|
TrickyTests.cpp
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/side-effects" time="0"/>
|
<testcase classname="global" name="./succeeding/side-effects" time="0.000021"/>
|
||||||
<testcase classname="global" name="./succeeding/koenig" time="0"/>
|
<testcase classname="global" name="./succeeding/koenig" time="0.000008"/>
|
||||||
<testcase classname="global" name="./succeeding/non-const==" time="0"/>
|
<testcase classname="global" name="./succeeding/non-const==" time="0.000007"/>
|
||||||
<testcase classname="global" name="./succeeding/enum/bits" time="0"/>
|
<testcase classname="global" name="./succeeding/enum/bits" time="0.000009"/>
|
||||||
<testcase classname="global" name="./succeeding/boolean member" time="0"/>
|
<testcase classname="global" name="./succeeding/boolean member" time="0.000017"/>
|
||||||
<testcase classname="global" name="./succeeding/unimplemented static bool" time="0"/>
|
<testcase classname="./succeeding/unimplemented static bool" name="compare to true" time="0.000011"/>
|
||||||
<testcase classname="global" name="./succeeding/SafeBool" time="0"/>
|
<testcase classname="./succeeding/unimplemented static bool" name="compare to false" time="0.00001"/>
|
||||||
<testcase classname="global" name="Assertions then sections" time="0"/>
|
<testcase classname="./succeeding/unimplemented static bool" name="negation" time="0.000005"/>
|
||||||
<testcase classname="global" name="non streamable - with conv. op" time="0"/>
|
<testcase classname="./succeeding/unimplemented static bool" name="double negation" time="0.000005"/>
|
||||||
<testcase classname="global" name="Comparing function pointers" time="0"/>
|
<testcase classname="./succeeding/unimplemented static bool" name="direct" time="0.000008"/>
|
||||||
<testcase classname="global" name="pointer to class" time="0"/>
|
<testcase classname="global" name="./succeeding/SafeBool" time="0.000013"/>
|
||||||
<testcase classname="global" name="X/level/0/a" time="0"/>
|
<testcase classname="Assertions then sections" name="root" time="0.00003"/>
|
||||||
<testcase classname="global" name="X/level/0/b" time="0"/>
|
<testcase classname="Assertions then sections" name="A section" time="0.000021"/>
|
||||||
<testcase classname="global" name="X/level/1/a" time="0"/>
|
<testcase classname="Assertions then sections" name="A section/Another section" time="0.000004"/>
|
||||||
<testcase classname="global" name="X/level/1/b" time="0"/>
|
<testcase classname="Assertions then sections" name="A section/Another other section" time="0.000004"/>
|
||||||
<testcase classname="global" name="Anonymous test case 1" time="0"/>
|
<testcase classname="global" name="non streamable - with conv. op" time="0.000008"/>
|
||||||
<testcase classname="global" name="Test case with one argument" time="0"/>
|
<testcase classname="global" name="Comparing function pointers" time="0.000017"/>
|
||||||
<testcase classname="global" name="Variadic macros" time="0"/>
|
<testcase classname="global" name="pointer to class" time="0.000011"/>
|
||||||
<testcase classname="global" name="Scenario: Do that thing with the thing" time="0"/>
|
<testcase classname="global" name="X/level/0/a" time="0.000004"/>
|
||||||
<testcase classname="global" name="Scenario: Vector resizing affects size and capacity" time="0"/>
|
<testcase classname="global" name="X/level/0/b" time="0.000005"/>
|
||||||
<testcase classname="global" name="Scenario: This is a really long scenario name to see how the list command deals with wrapping" time="0"/>
|
<testcase classname="global" name="X/level/1/a" time="0.000004"/>
|
||||||
<testcase classname="global" name="cmdline" time="0"/>
|
<testcase classname="global" name="X/level/1/b" time="0.000004"/>
|
||||||
<testcase classname="global" name="section tracking" time="0"/>
|
<testcase classname="global" name="Anonymous test case 1" time="0.00001"/>
|
||||||
|
<testcase classname="global" name="Test case with one argument" time="0.000006"/>
|
||||||
|
<testcase classname="Variadic macros" name="Section with one argument" time="0.000007"/>
|
||||||
|
<testcase classname="Scenario: Do that thing with the thing" name="Given: This stuff exists/When: I do this/Then: it should do this" time="0.000025"/>
|
||||||
|
<testcase classname="Scenario: Do that thing with the thing" name="Given: This stuff exists/When: I do this/Then: it should do this/And: do that" time="0.000004"/>
|
||||||
|
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector" time="0.000035"/>
|
||||||
|
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector/When: it is made larger/Then: the size and capacity go up" time="0.00004"/>
|
||||||
|
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector/When: it is made larger/Then: the size and capacity go up/And when: it is made smaller again/Then: the size goes down but the capacity stays the same" time="0.000013"/>
|
||||||
|
<testcase classname="Scenario: Vector resizing affects size and capacity" name="Given: an empty vector/When: we reserve more space/Then: The capacity is increased but the size remains the same" time="0.000012"/>
|
||||||
|
<testcase classname="Scenario: This is a really long scenario name to see how the list command deals with wrapping" name="Given: A section name that is so long that it cannot fit in a single console width/When: The test headers are printed as part of the normal running of the scenario/Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" time="0.000007"/>
|
||||||
|
<testcase classname="cmdline" name="process name" time="0.000016"/>
|
||||||
|
<testcase classname="cmdline" name="arg separated by spaces" time="0.00001"/>
|
||||||
|
<testcase classname="cmdline" name="arg separated by colon" time="0.00001"/>
|
||||||
|
<testcase classname="cmdline" name="arg separated by =" time="0.00001"/>
|
||||||
|
<testcase classname="cmdline" name="long opt" time="0.000009"/>
|
||||||
|
<testcase classname="cmdline" name="a number" time="0.000012"/>
|
||||||
|
<testcase classname="cmdline" name="not a number" time="0.000048"/>
|
||||||
|
<testcase classname="cmdline" name="two parsers" time="0.000056"/>
|
||||||
|
<testcase classname="cmdline" name="methods/in range" time="0.000013"/>
|
||||||
|
<testcase classname="cmdline" name="methods/out of range" time="0.000041"/>
|
||||||
|
<testcase classname="cmdline" name="flags/set" time="0.000007"/>
|
||||||
|
<testcase classname="cmdline" name="flags/not set" time="0.000007"/>
|
||||||
|
<testcase classname="cmdline" name="positional" time="0.000036"/>
|
||||||
|
<testcase classname="section tracking" name="root" time="0.000078"/>
|
||||||
|
<testcase classname="section tracking" name="test case with no sections" time="0.000009"/>
|
||||||
|
<testcase classname="section tracking" name="test case with one section" time="0.000029"/>
|
||||||
|
<testcase classname="section tracking" name="test case with two consecutive sections" time="0.000054"/>
|
||||||
|
<testcase classname="section tracking" name="test case with one section within another" time="0.000048"/>
|
||||||
|
<system-out>
|
||||||
|
Message from section one
|
||||||
|
Message from section two
|
||||||
|
Some information
|
||||||
|
Message from section one
|
||||||
|
Message from section two
|
||||||
|
Some information
|
||||||
|
Message from section one
|
||||||
|
Message from section two
|
||||||
|
Some information
|
||||||
|
hello
|
||||||
|
hello
|
||||||
|
</system-out>
|
||||||
|
<system-err>
|
||||||
|
An error
|
||||||
|
An error
|
||||||
|
An error
|
||||||
|
</system-err>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<system-out>
|
|
||||||
Message from section one
|
|
||||||
Message from section two
|
|
||||||
|
|
||||||
Some information
|
|
||||||
|
|
||||||
Message from section one
|
|
||||||
Message from section two
|
|
||||||
Some information
|
|
||||||
Message from section one
|
|
||||||
Message from section two
|
|
||||||
Some information
|
|
||||||
|
|
||||||
hello
|
|
||||||
hello
|
|
||||||
</system-out>
|
|
||||||
<system-err>
|
|
||||||
An error
|
|
||||||
|
|
||||||
An error
|
|
||||||
An error
|
|
||||||
</system-err>
|
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<Catch name="CatchSelfTest">
|
<Catch name="CatchSelfTest">
|
||||||
<Group name="~dummy">
|
<Group name="~dummy">
|
||||||
|
@ -7950,7 +7978,7 @@ An error
|
||||||
divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 )
|
divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
3.142857142857143 == Approx( 3.141 )
|
3.1428571429 == Approx( 3.141 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/ApproxTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/ApproxTests.cpp" >
|
||||||
|
@ -7958,7 +7986,7 @@ An error
|
||||||
divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 )
|
divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
3.142857142857143 != Approx( 3.141 )
|
3.1428571429 != Approx( 3.141 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
|
@ -8393,7 +8421,7 @@ An error
|
||||||
data.float_nine_point_one < 9.2
|
data.float_nine_point_one < 9.2
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 < 9.199999999999999
|
9.1 < 9.2
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/ConditionTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/ConditionTests.cpp" >
|
||||||
|
@ -8532,7 +8560,7 @@ An error
|
||||||
data.float_nine_point_one > 9.2
|
data.float_nine_point_one > 9.2
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 > 9.199999999999999
|
9.1 > 9.2
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/ConditionTests.cpp" >
|
||||||
|
|
|
@ -67,7 +67,6 @@ TEST_CASE( "meta/Misc/Sections", "looped tests" ) {
|
||||||
#include "../../include/internal/catch_test_spec.h"
|
#include "../../include/internal/catch_test_spec.h"
|
||||||
#include "../../include/reporters/catch_reporter_basic.hpp"
|
#include "../../include/reporters/catch_reporter_basic.hpp"
|
||||||
#include "../../include/reporters/catch_reporter_xml.hpp"
|
#include "../../include/reporters/catch_reporter_xml.hpp"
|
||||||
#include "../../include/reporters/catch_reporter_junit.hpp"
|
|
||||||
|
|
||||||
template<size_t size>
|
template<size_t size>
|
||||||
void parseIntoConfig( const char * (&argv)[size], Catch::ConfigData& config ) {
|
void parseIntoConfig( const char * (&argv)[size], Catch::ConfigData& config ) {
|
||||||
|
|
Loading…
Reference in New Issue