mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Some work on sections
This commit is contained in:
parent
5f43a43662
commit
388e9ffde6
@ -261,6 +261,13 @@ public:
|
|||||||
{
|
{
|
||||||
instance().currentResult.setMessage( msg );
|
instance().currentResult.setMessage( msg );
|
||||||
}
|
}
|
||||||
|
static void acceptSectionStart( const std::string& name, const std::string& description )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void acceptSectionEnd( const std::string& name )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MutableResultInfo currentResult;
|
MutableResultInfo currentResult;
|
||||||
|
@ -21,15 +21,25 @@ namespace Catch
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Section( const std::string& name, const std::string& description )
|
Section( const std::string& name, const std::string& description )
|
||||||
|
: m_name( name ), m_description( description )
|
||||||
{
|
{
|
||||||
(name, description); // !TBD notify the runner
|
ResultsCapture::acceptSectionStart( name, description );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~Section()
|
||||||
|
{
|
||||||
|
ResultsCapture::acceptSectionEnd( m_name );
|
||||||
|
}
|
||||||
|
|
||||||
|
// This returns whether the section should be included or not
|
||||||
operator bool()
|
operator bool()
|
||||||
{
|
{
|
||||||
// !TBD get this from runner
|
// !TBD get this from runner
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
|
std::string m_name;
|
||||||
|
std::string m_description;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
Loading…
Reference in New Issue
Block a user