STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::testing::CheckList Class Reference

Object for storing a series of test results, with labels. More...

#include <checklist.h>

Public Member Functions

 CheckList ()
 Constructor for the CheckList object prepares a blank slate.
 
CheckListoperator+= (CheckResult rhs)
 
void logResult (CheckResult result)
 Log a result in a checklist based on the current section setting.
 
int getSectionIndex (const std::string &section_name) const
 Get the index of a test section based on its name.
 
std::string getSectionName (const int section_index) const
 Get the name of a test section based on its index.
 
int getCurrentSection () const
 Get the current section number.
 
int getSuccessCount (int section_index=-1) const
 Get the current number of successes in a particular section. The default value of -1 returns the count for the current section.
 
int getFailureCount (int section_index=-1) const
 Get the current number of failures in a particular section. The default value of -1 returns the count for the current section.
 
int getSkipCount (int section_index=-1) const
 Get the current number of skipped tests in a particular section. The default value of -1 returns the count for the current section.
 
int getIgnoredFailureCount (int section_index=-1) const
 Get the current number of ignored test failures in a particular section. The default value of -1 returns the count for the current section.
 
void printSummary (TestVerbosity verbosity=TestVerbosity::COMPACT) const
 Print a summary of test results from this checklist.
 
int getOverallFailureCount () const
 Get the total number of failures across all sections.
 
int getOverallSkipCount () const
 Get the total number of skipped tests across all sections.
 
void changeSection (const std::string &section_name)
 Switch to a new (or previously started) section of the test case CheckList.
 
void changeSection (const int section_index)
 

Detailed Description

Object for storing a series of test results, with labels.

Member Function Documentation

◆ changeSection()

void stormm::testing::CheckList::changeSection ( const std::string & section_name)

Switch to a new (or previously started) section of the test case CheckList.

Overloaded:

  • Jump to a section by name
  • Jump to a section by index
Parameters
section_nameThe name of the section to add or jump to
section_indexThe index of the section to jump to

◆ getFailureCount()

int stormm::testing::CheckList::getFailureCount ( int section_index = -1) const

Get the current number of failures in a particular section. The default value of -1 returns the count for the current section.

Parameters
section_indexIndex of the section of interest

◆ getIgnoredFailureCount()

int stormm::testing::CheckList::getIgnoredFailureCount ( int section_index = -1) const

Get the current number of ignored test failures in a particular section. The default value of -1 returns the count for the current section.

Parameters
section_indexIndex of the section of interest

◆ getSectionIndex()

int stormm::testing::CheckList::getSectionIndex ( const std::string & section_name) const

Get the index of a test section based on its name.

Parameters
nameThe name of the section of interest

◆ getSectionName()

std::string stormm::testing::CheckList::getSectionName ( const int section_index) const

Get the name of a test section based on its index.

Parameters
indexThe index of the section of interest

◆ getSkipCount()

int stormm::testing::CheckList::getSkipCount ( int section_index = -1) const

Get the current number of skipped tests in a particular section. The default value of -1 returns the count for the current section.

Parameters
section_indexIndex of the section of interest

◆ getSuccessCount()

int stormm::testing::CheckList::getSuccessCount ( int section_index = -1) const

Get the current number of successes in a particular section. The default value of -1 returns the count for the current section.

Parameters
section_indexIndex of the section of interest

◆ logResult()

void stormm::testing::CheckList::logResult ( CheckResult result)

Log a result in a checklist based on the current section setting.

Parameters
resultThe result to log

◆ printSummary()

void stormm::testing::CheckList::printSummary ( TestVerbosity verbosity = TestVerbosity::COMPACT) const

Print a summary of test results from this checklist.

Parameters
verbosityThe level of verboseness at which to report

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