mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Move default impls of isFooTracker to the interface
This commit is contained in:
parent
c064322a9d
commit
61461dfd1d
@ -45,6 +45,8 @@ namespace TestCaseTracking {
|
||||
return ( it != m_children.end() ) ? it->get() : nullptr;
|
||||
}
|
||||
|
||||
bool ITracker::isSectionTracker() const { return false; }
|
||||
bool ITracker::isGeneratorTracker() const { return false; }
|
||||
|
||||
|
||||
ITracker& TrackerContext::startRun() {
|
||||
@ -106,9 +108,6 @@ namespace TestCaseTracking {
|
||||
}
|
||||
}
|
||||
|
||||
bool TrackerBase::isSectionTracker() const { return false; }
|
||||
bool TrackerBase::isGeneratorTracker() const { return false; }
|
||||
|
||||
void TrackerBase::open() {
|
||||
m_runState = Executing;
|
||||
moveToThis();
|
||||
|
@ -86,9 +86,20 @@ namespace TestCaseTracking {
|
||||
|
||||
virtual void openChild() = 0;
|
||||
|
||||
// Debug/ checking
|
||||
virtual bool isSectionTracker() const = 0;
|
||||
virtual bool isGeneratorTracker() const = 0;
|
||||
/**
|
||||
* Returns true if the instance is a section tracker
|
||||
*
|
||||
* Subclasses should override to true if they are, replaces RTTI
|
||||
* for internal debug checks.
|
||||
*/
|
||||
virtual bool isSectionTracker() const;
|
||||
/**
|
||||
* Returns true if the instance is a generator tracker
|
||||
*
|
||||
* Subclasses should override to true if they are, replaces RTTI
|
||||
* for internal debug checks.
|
||||
*/
|
||||
virtual bool isGeneratorTracker() const;
|
||||
};
|
||||
|
||||
class TrackerContext {
|
||||
@ -142,9 +153,6 @@ namespace TestCaseTracking {
|
||||
|
||||
void openChild() override;
|
||||
|
||||
bool isSectionTracker() const override;
|
||||
bool isGeneratorTracker() const override;
|
||||
|
||||
void open();
|
||||
|
||||
void close() override;
|
||||
|
Loading…
Reference in New Issue
Block a user