Removed some cruft and warnings

This commit is contained in:
Phil Nash 2013-03-13 08:04:50 +00:00
parent 7542685a2f
commit dc2735c23d
6 changed files with 163 additions and 214 deletions

View File

@ -63,7 +63,6 @@ namespace Catch {
BasicReporter::~BasicReporter() {}
StreamingReporterBase::~StreamingReporterBase() {}
CumulativeReporterBase::~CumulativeReporterBase() {}
ConsoleReporter::~ConsoleReporter() {}
IRunner::~IRunner() {}
IMutableContext::~IMutableContext() {}

View File

@ -291,74 +291,6 @@ namespace Catch
std::vector<TestGroupNode> groups;
};
// !TBD: Derived helper that implements the streaming interface but holds the stats
// - declares a new interface where methods are called at the end of each event
// - this would be used by the JUnit reporter, for example.
// - it may be used by the basic reporter, too, but that would clear down the stack
// as it goes
struct CumulativeReporterBase : SharedImpl<IStreamingReporter> {
CumulativeReporterBase( ReporterConfig const& _config )
: m_config( _config ),
stream( _config.stream() )
{}
virtual ~CumulativeReporterBase();
virtual void testRunStarting( TestRunInfo const& _testRunInfo ) {
// testRunInfo = _testRunInfo;
}
virtual void testGroupStarting( GroupInfo const& _groupInfo ) {
testGroupNode = TestGroupNode( _groupInfo );
}
virtual void testCaseStarting( TestCaseInfo const& _testInfo ) {
// unusedTestCaseInfo = _testInfo;
}
virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
// Ptr<ThreadedSectionInfo> sectionInfo = new ThreadedSectionInfo( _sectionInfo );
// if( !currentSectionInfo ) {
// currentSectionInfo = sectionInfo;
// }
// else {
// currentSectionInfo->children.push_back( sectionInfo );
// sectionInfo->parent = currentSectionInfo;
// currentSectionInfo = sectionInfo;
// }
}
virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) {
// currentSectionInfo = currentSectionInfo->parent;
}
virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats */ ) {
// unusedTestCaseInfo.reset();
}
virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) {
// testGroupNode-> // populate
// Ptr<TestGroupNode> node ( new TestGroupNode( _testGroupStats ) );
// unusedGroupInfo.reset();
}
virtual void testRunEnded( TestRunStats const& /* _testRunStats */ ) {
// currentSectionInfo.reset();
// unusedTestCaseInfo.reset();
// unusedGroupInfo.reset();
// testRunInfo.reset();
}
ReporterConfig m_config;
// Option<TestRunInfo> testRunInfo;
// Option<GroupInfo> unusedGroupInfo;
// Option<TestCaseInfo> unusedTestCaseInfo;
// Ptr<ThreadedSectionInfo> currentSectionInfo;
// Ptr<TestGroupNode> testGroupNode;
Option<TestGroupNode> testGroupNode;
std::ostream& stream;
};
// Deprecated
struct IReporter : IShared {
virtual ~IReporter();

View File

@ -10,6 +10,11 @@
#include "catch_common.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
namespace Catch {
// An intrusive reference counting smart pointer.
@ -82,4 +87,8 @@ namespace Catch {
} // end namespace Catch
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TWOBLUECUBES_CATCH_PTR_HPP_INCLUDED

View File

@ -13,6 +13,11 @@
#include <string>
#include <set>
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
namespace Catch {
struct ITestCase;
@ -68,4 +73,8 @@ namespace Catch {
const SourceLineInfo& lineInfo );
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED

View File

@ -234,7 +234,7 @@ namespace Catch {
private:
ReporterConfig m_config;
bool m_currentTestSuccess;
// bool m_currentTestSuccess;
Stats m_testSuiteStats;
Stats* m_currentStats;

View File

@ -2701,132 +2701,132 @@ selftest/main
selftest/expected result/failing tests
...............................................................................
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
catch_self_test.hpp:114:
catch_self_test.hpp:115:
PASSED:
with message:
Tests failed, as expected
@ -2837,236 +2837,236 @@ selftest/main
selftest/expected result/succeeding tests
...............................................................................
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
Message from section one
Message from section two
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
Some information
An error
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
catch_self_test.hpp:103:
catch_self_test.hpp:104:
PASSED:
with message:
Tests passed, as expected
@ -10699,57 +10699,57 @@ No assertions in test case, 'second tag'
[Running: selftest/main]
[Started section: 'selftest/expected result']
[Started section: 'selftest/expected result/failing tests']
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
catch_self_test.hpp:114: succeeded
catch_self_test.hpp:115: succeeded
[with message: Tests failed, as expected]
[End of section: 'selftest/expected result/failing tests' All 26 assertions passed]
@ -10757,101 +10757,101 @@ catch_self_test.hpp:114: succeeded
[Started section: 'selftest/expected result']
[Started section: 'selftest/expected result/succeeding tests']
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
Message from section one
Message from section two
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
Some information
An error
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
catch_self_test.hpp:103: succeeded
catch_self_test.hpp:104: succeeded
[with message: Tests passed, as expected]
[End of section: 'selftest/expected result/succeeding tests' All 46 assertions passed]