93 virtual int run() = 0;
206 {
return *parentPtr_; }
212 {
return (parentPtr_ != 0); }
218 {
return nSuccess_; }
224 {
return nFailure_; }
237 {
return isIoProcessor_; }
240 inline int TestRunner::mpiRank()
const 243 inline int TestRunner::mpiSize()
const 263 isIoProcessor_ =
true;
265 mpiRank_ = MPI::COMM_WORLD.Get_rank();
266 mpiSize_ = MPI::COMM_WORLD.Get_size();
268 isIoProcessor_ =
true;
270 isIoProcessor_ =
false;
313 std::cout << std::endl;
314 std::cout << nSuccess_ <<
" successful tests " << std::endl;
315 std::cout << nFailure_ <<
" failed tests " << std::endl;
316 std::cout << std::endl;
325 std::string newPrefix = prefix;
virtual ~TestRunner()
Destructor.
bool hasParent() const
Does this object have a parent?
void recordFailure()
Increment counter for failed tests, and that of parent (if any).
int nSuccess() const
Return number of successful tests run.
std::string filePrefix_
Prefix added to file names.
Abstract base class for classes that run tests.
bool isIoProcessor() const
Is this the IO processor of an MPI communicator?
int nFailure() const
Return number of failed tests run.
const std::string & filePrefix() const
Return file prefix by const reference.
void report() const
If this object has no parent, report success and failure counters.
virtual void addFilePrefix(const std::string &prefix)
Prepend argument prefix to existing filePrefix.
void recordSuccess()
Increment counter for successful tests, and that of parent (if any).
void setParent(TestRunner &parent)
Set another TestRunner as the parent.
TestRunner & parent()
Return the parent object, if any.
virtual int run()=0
Run all tests.