Namespaces | Classes | Enumerations | Functions
Balau::Testing Namespace Reference

The test runner and test assertion functions. More...

Namespaces

 TestRenderers
 Pre-defined renderers used to print test assertion failures.
 

Classes

class  FileTestWriter
 A test writer that writes to the specified file. More...
 
class  LogWriter
 A test writer that writes to the specified Balau logger. More...
 
struct  NetworkTesting
 Utilities for testing network functionality. More...
 
class  OStreamTestWriter
 A test writer that writes to the supplied output stream. More...
 
class  StdOutTestWriter
 A test writer that writes to stdout. More...
 
class  TestRunner
 The main test runner class. More...
 
class  TestWriter
 Base class of test writers. More...
 

Enumerations

enum  ExecutionModel : unsigned int {
  SingleThreaded = 1,
  WorkerThreads = 2,
  WorkerProcesses = 4,
  ProcessPerTest = 8
}
 The type of execution model to be used by the test runner. More...
 

Functions

void assertFail (const SourceCodeLocation &location, const std::string &failMessage)
 Cause an assertion failure with a message. More...
 
void assertFail (const std::string &failMessage)
 Cause an assertion failure with a message. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThat (const SourceCodeLocation &location, const std::string &failMessage, const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assert that the actual value supplied matches that in the matcher. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThat (const std::string &failMessage, const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assert that the actual value supplied matches that in the matcher. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThat (const SourceCodeLocation &location, const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assert that the actual value supplied matches that in the matcher. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThat (const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assert that the actual value supplied matches that in the matcher. More...
 
template<typename A , typename T >
void assertThat (const SourceCodeLocation &location, const std::string &failMessage, const A &actual, const IsAExpectation< T > &)
 Assert that the actual value's type is castable to the supplied one. More...
 
template<typename A , typename T >
void assertThat (const std::string &failMessage, const A &actual, const IsAExpectation< T > &)
 Assert that the actual value's type is castable to the supplied one. More...
 
template<typename A , typename T >
void assertThat (const SourceCodeLocation &location, const A &actual, const IsAExpectation< T > &expected)
 Assert that the actual value's type is castable to the supplied one. More...
 
template<typename A , typename T >
void assertThat (const A &actual, const IsAExpectation< T > &expected)
 Assert that the actual value's type is castable to the supplied one. More...
 
template<typename F , typename E >
void assertThat (const SourceCodeLocation &location, const std::string &failMessage, F function, const ThrowExpectation< E > &e)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E >
void assertThat (const std::string &failMessage, F function, const ThrowExpectation< E > &e)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E , typename C >
void assertThat (const SourceCodeLocation &location, const std::string &failMessage, F function, const ThrowExpectationWithFunction< E, C > &e)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E >
void assertThat (const SourceCodeLocation &location, const std::string &failMessage, F function, const ThrowExpectationWithPredicate< E > &predicate)
 Assert that the supplied function throws an exception, checked by the supplied predicate. More...
 
template<typename F , typename E , typename C >
void assertThat (const std::string &failMessage, F function, const ThrowExpectationWithFunction< E, C > &e)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E >
void assertThat (const std::string &failMessage, F function, const ThrowExpectationWithPredicate< E > &predicate)
 Assert that the supplied function throws an exception, checked by the supplied predicate. More...
 
template<typename F , typename E >
void assertThat (const SourceCodeLocation &location, const std::string &failMessage, F function, const ThrowTypeExpectation< E > &)
 Assert that the supplied function throws the supplied exception type. More...
 
template<typename F , typename E >
void assertThat (const std::string &failMessage, F function, const ThrowTypeExpectation< E > &)
 Assert that the supplied function throws the supplied exception type. More...
 
template<typename F , typename E >
void assertThat (const SourceCodeLocation &location, F function, const ThrowExpectation< E > &expectedException)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E >
void assertThat (F function, const ThrowExpectation< E > &expectedException)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E , typename C >
void assertThat (const SourceCodeLocation &location, F function, const ThrowExpectationWithFunction< E, C > &expectedException)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E >
void assertThat (const SourceCodeLocation &location, F function, const ThrowExpectationWithPredicate< E > &predicate)
 Assert that the supplied function throws an exception, checked by the supplied predicate. More...
 
template<typename F , typename E , typename C >
void assertThat (F function, const ThrowExpectationWithFunction< E, C > &expectedException)
 Assert that the supplied function throws the supplied exception example instance. More...
 
template<typename F , typename E >
void assertThat (F function, const ThrowExpectationWithPredicate< E > &predicate)
 Assert that the supplied function throws an exception, checked by the supplied predicate. More...
 
template<typename F , typename E >
void assertThat (const SourceCodeLocation &location, F function, const ThrowTypeExpectation< E > &expectedExceptionType)
 Assert that the supplied function throws the supplied exception type. More...
 
template<typename F , typename E >
void assertThat (F function, const ThrowTypeExpectation< E > &expectedExceptionType)
 Assert that the supplied function throws the supplied exception type. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThatNP (const SourceCodeLocation &location, const std::string &failMessage, const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThatNP (const std::string &failMessage, const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThatNP (const SourceCodeLocation &location, const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename E , typename C , typename V , typename F >
void assertThatNP (const A &actual, const ExpectedValue< E, C, V, F > &expected)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename T >
void assertThatNP (const SourceCodeLocation &location, const std::string &failMessage, const A &actual, const IsAExpectation< T > &)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename T >
void assertThatNP (const std::string &failMessage, const A &actual, const IsAExpectation< T > &)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename T >
void assertThatNP (const SourceCodeLocation &location, const A &actual, const IsAExpectation< T > &expected)
 Assertion without printing a failure rendering. More...
 
template<typename A , typename T >
void assertThatNP (const A &actual, const IsAExpectation< T > &expected)
 Assertion without printing a failure rendering. More...
 
template<typename E >
ExpectedValue< E, MatcherCompareContains, EvNotUsed, EvNotUsed > contains (const E &expected)
 Does the actual value contains the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareDoesNotContain, EvNotUsed, EvNotUsed > doesNotContain (const E &expected)
 Does the actual value not contain the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareEndsWith, EvNotUsed, EvNotUsed > endsWith (const E &expected)
 Does the actual value end with the supplied expected value? More...
 
void fromString (ExecutionModel &model, const std::string &value)
 Obtain the execution model from a string. More...
 
template<typename E >
ExpectedValue< E, MatcherCompareEquals, EvNotUsed, EvNotUsed > is (const E &expected)
 Is the actual value equal to the supplied expected value? More...
 
template<typename T >
const IsAExpectation< T > isA ()
 Is the type of the actual value castable to the specified type? More...
 
template<typename E , typename V >
ExpectedValue< E, MatcherCompareAlmostEqual, V, EvNotUsed > isAlmostEqual (const E &expected, const V &errorDelta)
 Is the actual value equal to within the specified error limit to the supplied expected value? More...
 
bool isExecutionModel (std::string_view value)
 Returns true if the supplied string represents a valid execution model (the case is ignored). More...
 
template<typename E >
ExpectedValue< E, MatcherCompareGreaterThan, EvNotUsed, EvNotUsed > isGreaterThan (const E &expected)
 Is the actual value greater than the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareGreaterThanOrEqualTo, EvNotUsed, EvNotUsed > isGreaterThanOrEqualTo (const E &expected)
 Is the actual value greater than or equal to the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareLessThan, EvNotUsed, EvNotUsed > isLessThan (const E &expected)
 Is the actual value less than the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareLessThanOrEqualTo, EvNotUsed, EvNotUsed > isLessThanOrEqualTo (const E &expected)
 Is the actual value less than or equal to the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareNotEqual, EvNotUsed, EvNotUsed > isNot (const E &expected)
 Is the actual value not equal to the supplied expected value? More...
 
ExpectedValue< void *, MatcherCompareNotEqual, EvNotUsed, EvNotUsed > isNotNull ()
 Is the actual value not equal to the supplied expected value? More...
 
template<typename E >
ExpectedValue< E, MatcherCompareStartsWith, EvNotUsed, EvNotUsed > startsWith (const E &expected)
 Does the actual value start with the supplied expected value? More...
 
template<typename E >
const ThrowTypeExpectation< E > throws ()
 Does the code block throw the supplied expected exception type? More...
 
template<typename E >
const ThrowExpectation< E > throws (const E &expected)
 Does the code block throw the supplied exception (including the exception's data)? More...
 
template<typename E >
const ThrowExpectationWithPredicate< E > throws (const std::function< bool(const E &)> &predicate)
 Does the code block throw the supplied exception type? More...
 
template<typename E , typename C >
const ThrowExpectationWithFunction< E, C > throws (const E &expected, C comparisonFunction)
 Does the code block throw the supplied exception (including the exception's data)? More...
 
template<typename AllocatorT >
Balau::U8String< AllocatorT > toString (ExecutionModel model)
 Print the execution model value as a UTF-8 string. More...
 

Detailed Description

The test runner and test assertion functions.

Enumeration Type Documentation

◆ ExecutionModel

enum ExecutionModel : unsigned int

The type of execution model to be used by the test runner.

This parameter determines whether the test runner runs the tests in threads, worker processes, or a process per test. Each execution model has its own advantages and disadvantages.

Enumerator
SingleThreaded 

Run all tests in a single thread.

For this execution model, any specified concurrency level is ignored.

If a test causes a segmentation fault, the entire test application will terminate.

WorkerThreads 

Run all tests in a single process.

A set of worker threads is created and each worker thread consumes test cases from a common list.

For this execution model, the concurrency level determines the number of worker threads to create.

If a test causes a segmentation fault, the entire test application will terminate.

WorkerProcesses 

Run tests in a set of worker processes.

The worker processes are created and each worker process consumes test cases from a common list.

For this execution model, the concurrency level determines the number of worker processes to maintain.

If a test causes a segmentation fault, the worker process will terminate and a new worker process will be spawned to take its place.

ProcessPerTest 

Run each test in a separate worker process.

This execution model provides a completely fresh process for each test, resulting in complete isolation from other tests.

For this execution model, the concurrency level determines the number of simultaneous tests to run.

If a test causes a segmentation fault, the test's worker process will terminate. This will not affect the other tests.

Function Documentation

◆ assertFail() [1/2]

void Balau::Testing::assertFail ( const SourceCodeLocation location,
const std::string &  failMessage 
)
inline

Cause an assertion failure with a message.

◆ assertFail() [2/2]

void Balau::Testing::assertFail ( const std::string &  failMessage)
inline

Cause an assertion failure with a message.

◆ assertThat() [1/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const std::string &  failMessage,
const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assert that the actual value supplied matches that in the matcher.

Print the supplied failure message on assertion failure.

◆ assertThat() [2/24]

void Balau::Testing::assertThat ( const std::string &  failMessage,
const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assert that the actual value supplied matches that in the matcher.

Print the supplied failure message on assertion failure.

◆ assertThat() [3/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assert that the actual value supplied matches that in the matcher.

◆ assertThat() [4/24]

void Balau::Testing::assertThat ( const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assert that the actual value supplied matches that in the matcher.

◆ assertThat() [5/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const std::string &  failMessage,
const A &  actual,
const IsAExpectation< T > &   
)
inline

Assert that the actual value's type is castable to the supplied one.

Print the supplied failure message on assertion failure.

◆ assertThat() [6/24]

void Balau::Testing::assertThat ( const std::string &  failMessage,
const A &  actual,
const IsAExpectation< T > &   
)
inline

Assert that the actual value's type is castable to the supplied one.

Print the supplied failure message on assertion failure.

◆ assertThat() [7/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const A &  actual,
const IsAExpectation< T > &  expected 
)
inline

Assert that the actual value's type is castable to the supplied one.

◆ assertThat() [8/24]

void Balau::Testing::assertThat ( const A &  actual,
const IsAExpectation< T > &  expected 
)
inline

Assert that the actual value's type is castable to the supplied one.

◆ assertThat() [9/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const std::string &  failMessage,
function,
const ThrowExpectation< E > &  e 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The standard equality assertion is used for comparison. Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [10/24]

void Balau::Testing::assertThat ( const std::string &  failMessage,
function,
const ThrowExpectation< E > &  e 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The standard equality assertion is used for comparison. Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [11/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const std::string &  failMessage,
function,
const ThrowExpectationWithFunction< E, C > &  e 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The supplied function is used for comparison. Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [12/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const std::string &  failMessage,
function,
const ThrowExpectationWithPredicate< E > &  predicate 
)
inline

Assert that the supplied function throws an exception, checked by the supplied predicate.

Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [13/24]

void Balau::Testing::assertThat ( const std::string &  failMessage,
function,
const ThrowExpectationWithFunction< E, C > &  e 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The supplied function is used for comparison. Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [14/24]

void Balau::Testing::assertThat ( const std::string &  failMessage,
function,
const ThrowExpectationWithPredicate< E > &  predicate 
)
inline

Assert that the supplied function throws an exception, checked by the supplied predicate.

Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [15/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
const std::string &  failMessage,
function,
const ThrowTypeExpectation< E > &   
)
inline

Assert that the supplied function throws the supplied exception type.

Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [16/24]

void Balau::Testing::assertThat ( const std::string &  failMessage,
function,
const ThrowTypeExpectation< E > &   
)
inline

Assert that the supplied function throws the supplied exception type.

Print the supplied failure message on assertion failure.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [17/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
function,
const ThrowExpectation< E > &  expectedException 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The standard equality assertion is used for comparison.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [18/24]

void Balau::Testing::assertThat ( function,
const ThrowExpectation< E > &  expectedException 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The standard equality assertion is used for comparison.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [19/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
function,
const ThrowExpectationWithFunction< E, C > &  expectedException 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The supplied function is used for comparison.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [20/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
function,
const ThrowExpectationWithPredicate< E > &  predicate 
)
inline

Assert that the supplied function throws an exception, checked by the supplied predicate.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [21/24]

void Balau::Testing::assertThat ( function,
const ThrowExpectationWithFunction< E, C > &  expectedException 
)
inline

Assert that the supplied function throws the supplied exception example instance.

The supplied function is used for comparison.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [22/24]

void Balau::Testing::assertThat ( function,
const ThrowExpectationWithPredicate< E > &  predicate 
)
inline

Assert that the supplied function throws an exception, checked by the supplied predicate.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [23/24]

void Balau::Testing::assertThat ( const SourceCodeLocation location,
function,
const ThrowTypeExpectation< E > &  expectedExceptionType 
)
inline

Assert that the supplied function throws the supplied exception type.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThat() [24/24]

void Balau::Testing::assertThat ( function,
const ThrowTypeExpectation< E > &  expectedExceptionType 
)
inline

Assert that the supplied function throws the supplied exception type.

If any exception is throw which does not derive from std::exception, the test application will fail.

◆ assertThatNP() [1/8]

void Balau::Testing::assertThatNP ( const SourceCodeLocation location,
const std::string &  failMessage,
const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assertion without printing a failure rendering.

Print the supplied failure message on assertion failure.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [2/8]

void Balau::Testing::assertThatNP ( const std::string &  failMessage,
const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assertion without printing a failure rendering.

Print the supplied failure message on assertion failure.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [3/8]

void Balau::Testing::assertThatNP ( const SourceCodeLocation location,
const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assertion without printing a failure rendering.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [4/8]

void Balau::Testing::assertThatNP ( const A &  actual,
const ExpectedValue< E, C, V, F > &  expected 
)
inline

Assertion without printing a failure rendering.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [5/8]

void Balau::Testing::assertThatNP ( const SourceCodeLocation location,
const std::string &  failMessage,
const A &  actual,
const IsAExpectation< T > &   
)
inline

Assertion without printing a failure rendering.

Print the supplied failure message on assertion failure.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [6/8]

void Balau::Testing::assertThatNP ( const std::string &  failMessage,
const A &  actual,
const IsAExpectation< T > &   
)
inline

Assertion without printing a failure rendering.

Print the supplied failure message on assertion failure.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [7/8]

void Balau::Testing::assertThatNP ( const SourceCodeLocation location,
const A &  actual,
const IsAExpectation< T > &  expected 
)
inline

Assertion without printing a failure rendering.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ assertThatNP() [8/8]

void Balau::Testing::assertThatNP ( const A &  actual,
const IsAExpectation< T > &  expected 
)
inline

Assertion without printing a failure rendering.

Best to use this one if the data types are huge, otherwise a great deal of logging will be generated on assertion failure.

◆ contains()

ExpectedValue<E, MatcherCompareContains, EvNotUsed, EvNotUsed> Balau::Testing::contains ( const E &  expected)
inline

Does the actual value contains the supplied expected value?

◆ doesNotContain()

ExpectedValue<E, MatcherCompareDoesNotContain, EvNotUsed, EvNotUsed> Balau::Testing::doesNotContain ( const E &  expected)
inline

Does the actual value not contain the supplied expected value?

◆ endsWith()

ExpectedValue<E, MatcherCompareEndsWith, EvNotUsed, EvNotUsed> Balau::Testing::endsWith ( const E &  expected)
inline

Does the actual value end with the supplied expected value?

◆ fromString()

void Balau::Testing::fromString ( ExecutionModel model,
const std::string &  value 
)
inline

Obtain the execution model from a string.

The string is parsed in order to obtain the execution model enum value. The case is ignored.

◆ is()

ExpectedValue<E, MatcherCompareEquals, EvNotUsed, EvNotUsed> Balau::Testing::is ( const E &  expected)
inline

Is the actual value equal to the supplied expected value?

◆ isA()

const IsAExpectation<T> Balau::Testing::isA ( )
inline

Is the type of the actual value castable to the specified type?

◆ isAlmostEqual()

ExpectedValue<E, MatcherCompareAlmostEqual, V, EvNotUsed> Balau::Testing::isAlmostEqual ( const E &  expected,
const V &  errorDelta 
)
inline

Is the actual value equal to within the specified error limit to the supplied expected value?

◆ isExecutionModel()

bool Balau::Testing::isExecutionModel ( std::string_view  value)
inline

Returns true if the supplied string represents a valid execution model (the case is ignored).

◆ isGreaterThan()

ExpectedValue<E, MatcherCompareGreaterThan, EvNotUsed, EvNotUsed> Balau::Testing::isGreaterThan ( const E &  expected)
inline

Is the actual value greater than the supplied expected value?

◆ isGreaterThanOrEqualTo()

ExpectedValue<E, MatcherCompareGreaterThanOrEqualTo, EvNotUsed, EvNotUsed> Balau::Testing::isGreaterThanOrEqualTo ( const E &  expected)
inline

Is the actual value greater than or equal to the supplied expected value?

◆ isLessThan()

ExpectedValue<E, MatcherCompareLessThan, EvNotUsed, EvNotUsed> Balau::Testing::isLessThan ( const E &  expected)
inline

Is the actual value less than the supplied expected value?

◆ isLessThanOrEqualTo()

ExpectedValue<E, MatcherCompareLessThanOrEqualTo, EvNotUsed, EvNotUsed> Balau::Testing::isLessThanOrEqualTo ( const E &  expected)
inline

Is the actual value less than or equal to the supplied expected value?

◆ isNot()

ExpectedValue<E, MatcherCompareNotEqual, EvNotUsed, EvNotUsed> Balau::Testing::isNot ( const E &  expected)
inline

Is the actual value not equal to the supplied expected value?

◆ isNotNull()

ExpectedValue<void *, MatcherCompareNotEqual, EvNotUsed, EvNotUsed> Balau::Testing::isNotNull ( )
inline

Is the actual value not equal to the supplied expected value?

◆ startsWith()

ExpectedValue<E, MatcherCompareStartsWith, EvNotUsed, EvNotUsed> Balau::Testing::startsWith ( const E &  expected)
inline

Does the actual value start with the supplied expected value?

◆ throws() [1/4]

const ThrowTypeExpectation<E> Balau::Testing::throws ( )
inline

Does the code block throw the supplied expected exception type?

◆ throws() [2/4]

const ThrowExpectation<E> Balau::Testing::throws ( const E &  expected)
inline

Does the code block throw the supplied exception (including the exception's data)?

◆ throws() [3/4]

const ThrowExpectationWithPredicate<E> Balau::Testing::throws ( const std::function< bool(const E &)> &  predicate)
inline

Does the code block throw the supplied exception type?

Examine the exception with the supplied predicate function.

◆ throws() [4/4]

const ThrowExpectationWithFunction<E, C> Balau::Testing::throws ( const E &  expected,
comparisonFunction 
)
inline

Does the code block throw the supplied exception (including the exception's data)?

Perform the comparison with the supplied function.

◆ toString()

std::string toString ( ExecutionModel  model)
inline

Print the execution model value as a UTF-8 string.

Returns
a UTF-8 string representing the execution model value