mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Inline some non-virtual functions in ITracker and TrackerContext
This commit is contained in:
parent
00f259aeb2
commit
2befd98da2
@ -51,10 +51,6 @@ namespace TestCaseTracking {
|
|||||||
bool ITracker::isSectionTracker() const { return false; }
|
bool ITracker::isSectionTracker() const { return false; }
|
||||||
bool ITracker::isGeneratorTracker() const { return false; }
|
bool ITracker::isGeneratorTracker() const { return false; }
|
||||||
|
|
||||||
bool ITracker::isSuccessfullyCompleted() const {
|
|
||||||
return m_runState == CompletedSuccessfully;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ITracker::isOpen() const {
|
bool ITracker::isOpen() const {
|
||||||
return m_runState != NotStarted && !isComplete();
|
return m_runState != NotStarted && !isComplete();
|
||||||
}
|
}
|
||||||
@ -81,10 +77,6 @@ namespace TestCaseTracking {
|
|||||||
return *m_rootTracker;
|
return *m_rootTracker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackerContext::startCycle() {
|
|
||||||
m_currentTracker = m_rootTracker.get();
|
|
||||||
m_runState = Executing;
|
|
||||||
}
|
|
||||||
void TrackerContext::completeCycle() {
|
void TrackerContext::completeCycle() {
|
||||||
m_runState = CompletedCycle;
|
m_runState = CompletedCycle;
|
||||||
}
|
}
|
||||||
@ -92,9 +84,6 @@ namespace TestCaseTracking {
|
|||||||
bool TrackerContext::completedCycle() const {
|
bool TrackerContext::completedCycle() const {
|
||||||
return m_runState == CompletedCycle;
|
return m_runState == CompletedCycle;
|
||||||
}
|
}
|
||||||
ITracker& TrackerContext::currentTracker() {
|
|
||||||
return *m_currentTracker;
|
|
||||||
}
|
|
||||||
void TrackerContext::setCurrentTracker( ITracker* tracker ) {
|
void TrackerContext::setCurrentTracker( ITracker* tracker ) {
|
||||||
m_currentTracker = tracker;
|
m_currentTracker = tracker;
|
||||||
}
|
}
|
||||||
@ -232,10 +221,6 @@ namespace TestCaseTracking {
|
|||||||
m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );
|
m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<StringRef> const& SectionTracker::getFilters() const {
|
|
||||||
return m_filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
StringRef SectionTracker::trimmedName() const {
|
StringRef SectionTracker::trimmedName() const {
|
||||||
return m_trimmed_name;
|
return m_trimmed_name;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,9 @@ namespace TestCaseTracking {
|
|||||||
//! Returns true if tracker run to completion (successfully or not)
|
//! Returns true if tracker run to completion (successfully or not)
|
||||||
virtual bool isComplete() const = 0;
|
virtual bool isComplete() const = 0;
|
||||||
//! Returns true if tracker run to completion succesfully
|
//! Returns true if tracker run to completion succesfully
|
||||||
bool isSuccessfullyCompleted() const;
|
bool isSuccessfullyCompleted() const {
|
||||||
|
return m_runState == CompletedSuccessfully;
|
||||||
|
}
|
||||||
//! Returns true if tracker has started but hasn't been completed
|
//! Returns true if tracker has started but hasn't been completed
|
||||||
bool isOpen() const;
|
bool isOpen() const;
|
||||||
//! Returns true iff tracker has started
|
//! Returns true iff tracker has started
|
||||||
@ -165,11 +167,14 @@ namespace TestCaseTracking {
|
|||||||
|
|
||||||
ITracker& startRun();
|
ITracker& startRun();
|
||||||
|
|
||||||
void startCycle();
|
void startCycle() {
|
||||||
|
m_currentTracker = m_rootTracker.get();
|
||||||
|
m_runState = Executing;
|
||||||
|
}
|
||||||
void completeCycle();
|
void completeCycle();
|
||||||
|
|
||||||
bool completedCycle() const;
|
bool completedCycle() const;
|
||||||
ITracker& currentTracker();
|
ITracker& currentTracker() { return *m_currentTracker; }
|
||||||
void setCurrentTracker( ITracker* tracker );
|
void setCurrentTracker( ITracker* tracker );
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -214,7 +219,7 @@ namespace TestCaseTracking {
|
|||||||
void addInitialFilters( std::vector<std::string> const& filters );
|
void addInitialFilters( std::vector<std::string> const& filters );
|
||||||
void addNextFilters( std::vector<StringRef> const& filters );
|
void addNextFilters( std::vector<StringRef> const& filters );
|
||||||
//! Returns filters active in this tracker
|
//! Returns filters active in this tracker
|
||||||
std::vector<StringRef> const& getFilters() const;
|
std::vector<StringRef> const& getFilters() const { return m_filters; }
|
||||||
//! Returns whitespace-trimmed name of the tracked section
|
//! Returns whitespace-trimmed name of the tracked section
|
||||||
StringRef trimmedName() const;
|
StringRef trimmedName() const;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user