Test assertion functions. More...
Go to the source code of this file.
Namespaces | |
Balau::Testing | |
The test runner and test assertion functions. | |
Macros | |
#define | AssertFail(...) ::Balau::Testing::assertFail(::Balau::SourceCodeLocation(__FILE__, __LINE__), __VA_ARGS__) |
Assertion macro, providing the source code location of the assertion. More... | |
#define | AssertThat(...) ::Balau::Testing::assertThat(::Balau::SourceCodeLocation(__FILE__, __LINE__), __VA_ARGS__) |
Assertion macro, providing the source code location of the assertion. More... | |
#define | AssertThatNP(...) ::Balau::Testing::assertThatNP(::Balau::SourceCodeLocation(__FILE__, __LINE__), __VA_ARGS__) |
Assertion macro, providing the source code location of the assertion. 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... | |
Test assertion functions.
#define AssertFail | ( | ... | ) | ::Balau::Testing::assertFail(::Balau::SourceCodeLocation(__FILE__, __LINE__), __VA_ARGS__) |
Assertion macro, providing the source code location of the assertion.
#define AssertThat | ( | ... | ) | ::Balau::Testing::assertThat(::Balau::SourceCodeLocation(__FILE__, __LINE__), __VA_ARGS__) |
Assertion macro, providing the source code location of the assertion.
#define AssertThatNP | ( | ... | ) | ::Balau::Testing::assertThatNP(::Balau::SourceCodeLocation(__FILE__, __LINE__), __VA_ARGS__) |
Assertion macro, providing the source code location of the assertion.