Horizon
Public Member Functions | Protected Types | Protected Attributes | List of all members
Catch::TestCaseTracking::ITracker Class Referenceabstract
Inheritance diagram for Catch::TestCaseTracking::ITracker:
Catch::TestCaseTracking::TrackerBase Catch::Generators::GeneratorTracker Catch::TestCaseTracking::SectionTracker

Public Member Functions

 ITracker (NameAndLocation const &nameAndLoc, ITracker *parent)
 
NameAndLocation const & nameAndLocation () const
 
ITrackerparent () const
 
virtual bool isComplete () const =0
 Returns true if tracker run to completion (successfully or not)
 
bool isSuccessfullyCompleted () const
 Returns true if tracker run to completion succesfully.
 
bool isOpen () const
 Returns true if tracker has started but hasn't been completed.
 
bool hasStarted () const
 Returns true iff tracker has started.
 
virtual void close ()=0
 
virtual void fail ()=0
 
void markAsNeedingAnotherRun ()
 
void addChild (ITrackerPtr &&child)
 Register a nested ITracker.
 
ITrackerfindChild (NameAndLocation const &nameAndLocation)
 Returns ptr to specific child if register with this tracker. More...
 
bool hasChildren () const
 Have any children been added?
 
void openChild ()
 Marks tracker as executing a child, doing se recursively up the tree.
 
virtual bool isSectionTracker () const
 Returns true if the instance is a section tracker. More...
 
virtual bool isGeneratorTracker () const
 Returns true if the instance is a generator tracker. More...
 

Protected Types

enum  CycleState {
  NotStarted , Executing , ExecutingChildren , NeedsAnotherRun ,
  CompletedSuccessfully , Failed
}
 

Protected Attributes

ITrackerm_parent = nullptr
 
Children m_children
 
CycleState m_runState = NotStarted
 

Member Function Documentation

◆ findChild()

ITracker * Catch::TestCaseTracking::ITracker::findChild ( NameAndLocation const &  nameAndLocation)

Returns ptr to specific child if register with this tracker.

Returns nullptr if not found.

◆ isGeneratorTracker()

bool Catch::TestCaseTracking::ITracker::isGeneratorTracker ( ) const
virtual

Returns true if the instance is a generator tracker.

Subclasses should override to true if they are, replaces RTTI for internal debug checks.

Reimplemented in Catch::Generators::GeneratorTracker.

◆ isSectionTracker()

bool Catch::TestCaseTracking::ITracker::isSectionTracker ( ) const
virtual

Returns true if the instance is a section tracker.

Subclasses should override to true if they are, replaces RTTI for internal debug checks.

Reimplemented in Catch::TestCaseTracking::SectionTracker.


The documentation for this class was generated from the following files: