libDwm-0.6.0
Dwm::Assertions Class Reference

A container to hold all assertions. Note everything is static here. More...

#include <DwmUnitAssert.hh>

Static Public Member Functions

static bool Failed (const std::string &filename, const std::string &function, int lineNumber, const std::string &test)
 Adds a failed assertion. More...
 
static bool Passed (const std::string &filename, const std::string &function, int lineNumber, const std::string &test)
 Adds a passed assertion. More...
 
static AssertionCounter Total ()
 Returns the total passed and failed counter.
 
static std::ostream & Print (std::ostream &os, bool onlyFailed=false)
 Prints to an ostream. More...
 
static std::ostream & PrintXML (std::ostream &os, bool onlyFailed=false)
 

Detailed Description

A container to hold all assertions. Note everything is static here.

Member Function Documentation

◆ Failed()

static bool Dwm::Assertions::Failed ( const std::string &  filename,
const std::string &  function,
int  lineNumber,
const std::string &  test 
)
static

Adds a failed assertion.

Not called directly; UnitAssert() calls this member. Always returns false.

◆ Passed()

static bool Dwm::Assertions::Passed ( const std::string &  filename,
const std::string &  function,
int  lineNumber,
const std::string &  test 
)
static

Adds a passed assertion.

Not called directly; UnitAssert() calls this member. Always returns true.

◆ Print()

static std::ostream& Dwm::Assertions::Print ( std::ostream &  os,
bool  onlyFailed = false 
)
static

Prints to an ostream.

If onlyFailed is true, prints only information for failed assertions.


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