forked from catchorg/Catch2
Implemented more reporter methods and started to fill out Section impl
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_SECTION_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_SECTION_HPP_INCLUDED
|
||||
|
||||
#include "catch_capture.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Catch
|
||||
@@ -21,15 +23,27 @@ namespace Catch
|
||||
{
|
||||
public:
|
||||
Section( const std::string& name, const std::string& description )
|
||||
: m_name( name ),
|
||||
m_sectionIncluded( ResultsCapture::acceptSectionStart( name, description, m_successes, m_failures ) )
|
||||
{
|
||||
(name, description); // !TBD notify the runner
|
||||
}
|
||||
|
||||
~Section()
|
||||
{
|
||||
ResultsCapture::acceptSectionEnd( m_name, m_successes, m_failures );
|
||||
}
|
||||
|
||||
// This indicates whether the section should be executed or not
|
||||
operator bool()
|
||||
{
|
||||
// !TBD get this from runner
|
||||
return true;
|
||||
return m_sectionIncluded;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
std::size_t m_successes;
|
||||
std::size_t m_failures;
|
||||
bool m_sectionIncluded;
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
Reference in New Issue
Block a user