Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
graph_harness::Check Class Reference

The failures of one property over a domain. More...

#include <graph_harness.H>

Collaboration diagram for graph_harness::Check:
[legend]

Public Member Functions

 Check (std::string what, bool known=false)
 
void run () noexcept
 Counts a run of the property.
 
void skip () noexcept
 Counts a run left out because it would end the program.
 
void fail (const Spec &s, const std::string &what)
 Counts a failure on spec, with what went wrong.
 
size_t num_failures () const noexcept
 
void expect () const
 Expects what the mark says, and prints the first failures.
 

Private Attributes

std::string name
 
bool known_failure
 
size_t runs = 0
 
size_t failures = 0
 
size_t skipped = 0
 
std::vector< std::string > first
 

Detailed Description

The failures of one property over a domain.

A check counts the specs and the failures, keeps the first ones as text, and at the end expects no failure. A check marked as a known failure, during the work that fixes it, expects at least one, so that the mark goes as soon as the fix lands. A known failure that would end the program, as an assertion does, cannot run: its specs are left out with skip(), and counted.

Definition at line 449 of file graph_harness.H.

Constructor & Destructor Documentation

◆ Check()

graph_harness::Check::Check ( std::string  what,
bool  known = false 
)
inlineexplicit

Definition at line 459 of file graph_harness.H.

Member Function Documentation

◆ expect()

◆ fail()

◆ num_failures()

size_t graph_harness::Check::num_failures ( ) const
inlinenoexcept

Definition at line 476 of file graph_harness.H.

References failures.

◆ run()

◆ skip()

void graph_harness::Check::skip ( )
inlinenoexcept

Counts a run left out because it would end the program.

Definition at line 466 of file graph_harness.H.

References skipped.

Member Data Documentation

◆ failures

size_t graph_harness::Check::failures = 0
private

Definition at line 454 of file graph_harness.H.

Referenced by expect(), fail(), and num_failures().

◆ first

std::vector<std::string> graph_harness::Check::first
private

Definition at line 456 of file graph_harness.H.

Referenced by expect(), and fail().

◆ known_failure

bool graph_harness::Check::known_failure
private

Definition at line 452 of file graph_harness.H.

Referenced by expect().

◆ name

std::string graph_harness::Check::name
private

Definition at line 451 of file graph_harness.H.

Referenced by expect().

◆ runs

size_t graph_harness::Check::runs = 0
private

Definition at line 453 of file graph_harness.H.

Referenced by expect(), and run().

◆ skipped

size_t graph_harness::Check::skipped = 0
private

Definition at line 455 of file graph_harness.H.

Referenced by expect(), and skip().


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