OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::ReporterStatistics Class Reference

A helper class keeping statistic counters. More...

#include <reporterstatistics.h>

Public Member Functions

 ReporterStatistics (const ReporterStatistics &)=delete
 
ReporterStatisticsoperator= (const ReporterStatistics &)=delete
 
 ReporterStatistics ()
 Ctor. More...
 
 ~ReporterStatistics ()
 Dtor. More...
 
void reportSuite (bool result_)
 Count new suite. More...
 
void reportCase (bool result_)
 Count new test case. More...
 
void reportAssertion (bool result_)
 Count new assertion. More...
 
void reportError ()
 Report a framework error. More...
 
int getSuites () const
 Get count of suites. More...
 
int getSuitesOK () const
 Get count of passed suites. More...
 
int getSuitesFailed () const
 Get count of failed suites. More...
 
int getCases () const
 Get count of test cases. More...
 
int getCasesOK () const
 Get count of passed test cases. More...
 
int getCasesFailed () const
 Get count of failed test cases. More...
 
int getAssertions () const
 Get count of assertions. More...
 
int getAssertionsOK () const
 Get count of passed assertions. More...
 
int getAssertionsFailed () const
 Get count of failed assertions. More...
 
int getErrors () const
 Get count of the errors. More...
 

Detailed Description

A helper class keeping statistic counters.

This class keeps counters about running tests.

Definition at line 30 of file reporterstatistics.h.

Constructor & Destructor Documentation

◆ ReporterStatistics() [1/2]

OTest2::ReporterStatistics::ReporterStatistics ( const ReporterStatistics )
delete

◆ ReporterStatistics() [2/2]

OTest2::ReporterStatistics::ReporterStatistics ( )

Ctor.

Definition at line 24 of file reporterstatistics.cpp.

◆ ~ReporterStatistics()

OTest2::ReporterStatistics::~ReporterStatistics ( )

Dtor.

Definition at line 35 of file reporterstatistics.cpp.

Member Function Documentation

◆ getAssertions()

int OTest2::ReporterStatistics::getAssertions ( ) const

Get count of assertions.

Definition at line 91 of file reporterstatistics.cpp.

◆ getAssertionsFailed()

int OTest2::ReporterStatistics::getAssertionsFailed ( ) const

Get count of failed assertions.

Definition at line 99 of file reporterstatistics.cpp.

◆ getAssertionsOK()

int OTest2::ReporterStatistics::getAssertionsOK ( ) const

Get count of passed assertions.

Definition at line 95 of file reporterstatistics.cpp.

◆ getCases()

int OTest2::ReporterStatistics::getCases ( ) const

Get count of test cases.

Definition at line 79 of file reporterstatistics.cpp.

◆ getCasesFailed()

int OTest2::ReporterStatistics::getCasesFailed ( ) const

Get count of failed test cases.

Definition at line 87 of file reporterstatistics.cpp.

◆ getCasesOK()

int OTest2::ReporterStatistics::getCasesOK ( ) const

Get count of passed test cases.

Definition at line 83 of file reporterstatistics.cpp.

◆ getErrors()

int OTest2::ReporterStatistics::getErrors ( ) const

Get count of the errors.

Definition at line 103 of file reporterstatistics.cpp.

◆ getSuites()

int OTest2::ReporterStatistics::getSuites ( ) const

Get count of suites.

Definition at line 67 of file reporterstatistics.cpp.

◆ getSuitesFailed()

int OTest2::ReporterStatistics::getSuitesFailed ( ) const

Get count of failed suites.

Definition at line 75 of file reporterstatistics.cpp.

◆ getSuitesOK()

int OTest2::ReporterStatistics::getSuitesOK ( ) const

Get count of passed suites.

Definition at line 71 of file reporterstatistics.cpp.

◆ operator=()

ReporterStatistics& OTest2::ReporterStatistics::operator= ( const ReporterStatistics )
delete

◆ reportAssertion()

void OTest2::ReporterStatistics::reportAssertion ( bool  result_)

Count new assertion.

Parameters
result_Result of the assertion

Definition at line 55 of file reporterstatistics.cpp.

◆ reportCase()

void OTest2::ReporterStatistics::reportCase ( bool  result_)

Count new test case.

Parameters
result_Result of the case

Definition at line 47 of file reporterstatistics.cpp.

◆ reportError()

void OTest2::ReporterStatistics::reportError ( )

Report a framework error.

Definition at line 63 of file reporterstatistics.cpp.

◆ reportSuite()

void OTest2::ReporterStatistics::reportSuite ( bool  result_)

Count new suite.

Parameters
result_Result of the suite

Definition at line 39 of file reporterstatistics.cpp.


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