Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Attributes
SelfTest::TestResults Class Referencefinal

The TestResults class describes the outcome of series of tests run consecutively. More...

Public Member Functions

void addFailedCheck (const QString &message)
 
void addFailedTest (const QString &testName)
 
void addPassedCheck (const QString &message="OK")
 
void addPassedTest (const QString &testName)
 
const QList< TestResult > & getCheckResults () const
 
int getNumExecutedChecks () const
 
int getNumExecutedTests () const
 
int getNumFailedChecks () const
 
int getNumFailedTests () const
 
int getNumPassedChecks () const
 
int getNumPassedTests () const
 
const QList< TestResult > & getTestResults () const
 
void merge (const TestResults &other)
 
void printResultStatistics () const
 Prints a summary of the test results to the standard output. More...
 

Private Attributes

QList< TestResultcheckResults_
 
int numFailedChecks_ {}
 
int numFailedTests_ {}
 
int numPassedChecks_ {}
 
int numPassedTests_ {}
 
QList< TestResulttestResults_
 

Detailed Description

The TestResults class describes the outcome of series of tests run consecutively.

Two things are logged here:

Typically a check is only logged if it fails, providing failure details. A test should be logged in all cases (failure or success).

Member Function Documentation

◆ addFailedCheck()

void SelfTest::TestResults::addFailedCheck ( const QString &  message)

◆ addFailedTest()

void SelfTest::TestResults::addFailedTest ( const QString &  testName)

◆ addPassedCheck()

void SelfTest::TestResults::addPassedCheck ( const QString &  message = "OK")

◆ addPassedTest()

void SelfTest::TestResults::addPassedTest ( const QString &  testName)

◆ getCheckResults()

const QList< TestResult > & SelfTest::TestResults::getCheckResults ( ) const
inline

◆ getNumExecutedChecks()

int SelfTest::TestResults::getNumExecutedChecks ( ) const
inline

◆ getNumExecutedTests()

int SelfTest::TestResults::getNumExecutedTests ( ) const
inline

◆ getNumFailedChecks()

int SelfTest::TestResults::getNumFailedChecks ( ) const
inline

◆ getNumFailedTests()

int SelfTest::TestResults::getNumFailedTests ( ) const
inline

◆ getNumPassedChecks()

int SelfTest::TestResults::getNumPassedChecks ( ) const
inline

◆ getNumPassedTests()

int SelfTest::TestResults::getNumPassedTests ( ) const
inline

◆ getTestResults()

const QList< TestResult > & SelfTest::TestResults::getTestResults ( ) const
inline

◆ merge()

void SelfTest::TestResults::merge ( const TestResults other)

◆ printResultStatistics()

void SelfTest::TestResults::printResultStatistics ( ) const

Prints a summary of the test results to the standard output.

Member Data Documentation

◆ checkResults_

QList<TestResult> SelfTest::TestResults::checkResults_
private

◆ numFailedChecks_

int SelfTest::TestResults::numFailedChecks_ {}
private

◆ numFailedTests_

int SelfTest::TestResults::numFailedTests_ {}
private

◆ numPassedChecks_

int SelfTest::TestResults::numPassedChecks_ {}
private

◆ numPassedTests_

int SelfTest::TestResults::numPassedTests_ {}
private

◆ testResults_

QList<TestResult> SelfTest::TestResults::testResults_
private