ManaPlus
Public Member Functions | Data Fields
Catch::Counts Struct Reference

#include <catch.hpp>

Public Member Functions

 Counts ()
 
Counts operator- (Counts const &other) const
 
Countsoperator+= (Counts const &other)
 
std::size_t total () const
 
bool allPassed () const
 
bool allOk () const
 

Data Fields

std::size_t passed
 
std::size_t failed
 
std::size_t failedButOk
 

Detailed Description

Definition at line 2191 of file catch.hpp.

Constructor & Destructor Documentation

◆ Counts()

Catch::Counts::Counts ( )
inline

Definition at line 2192 of file catch.hpp.

2192 : passed( 0 ), failed( 0 ), failedButOk( 0 ) {}
std::size_t failed
Definition: catch.hpp:2219
std::size_t failedButOk
Definition: catch.hpp:2220
std::size_t passed
Definition: catch.hpp:2218

Member Function Documentation

◆ allOk()

bool Catch::Counts::allOk ( ) const
inline

Definition at line 2214 of file catch.hpp.

2214  {
2215  return failed == 0;
2216  }

◆ allPassed()

bool Catch::Counts::allPassed ( ) const
inline

Definition at line 2211 of file catch.hpp.

2211  {
2212  return failed == 0 && failedButOk == 0;
2213  }

◆ operator+=()

Counts& Catch::Counts::operator+= ( Counts const &  other)
inline

Definition at line 2201 of file catch.hpp.

2201  {
2202  passed += other.passed;
2203  failed += other.failed;
2204  failedButOk += other.failedButOk;
2205  return *this;
2206  }

References failed, failedButOk, and passed.

◆ operator-()

Counts Catch::Counts::operator- ( Counts const &  other) const
inline

Definition at line 2194 of file catch.hpp.

2194  {
2195  Counts diff;
2196  diff.passed = passed - other.passed;
2197  diff.failed = failed - other.failed;
2198  diff.failedButOk = failedButOk - other.failedButOk;
2199  return diff;
2200  }

References failed, failedButOk, and passed.

◆ total()

std::size_t Catch::Counts::total ( ) const
inline

Definition at line 2208 of file catch.hpp.

2208  {
2209  return passed + failed + failedButOk;
2210  }

Field Documentation

◆ failed

std::size_t Catch::Counts::failed

Definition at line 2219 of file catch.hpp.

Referenced by Catch::Totals::delta(), operator+=(), and operator-().

◆ failedButOk

std::size_t Catch::Counts::failedButOk

Definition at line 2220 of file catch.hpp.

Referenced by Catch::Totals::delta(), operator+=(), and operator-().

◆ passed

std::size_t Catch::Counts::passed

Definition at line 2218 of file catch.hpp.

Referenced by Catch::Totals::delta(), operator+=(), and operator-().


The documentation for this struct was generated from the following file: