scsl
1.1.1
Shimmering Clarity Standard Library
|
Shimmering Clarity testing library. More...
Classes | |
class | NotImplemented |
Exception reserved for unsupported platforms. More... | |
class | AssertionFailed |
AssertionFailed indicates that some invariant didn't hold. More... | |
class | Report |
A Report holds test run results. More... | |
struct | UnitTest |
UnitTest describes a single unit test. More... | |
class | SimpleSuite |
SimpleSuite is a test-running harness for simple tests. More... | |
Functions | |
void | Assert (bool condition) |
void | Assert (bool condition, std::string message) |
std::ostream & | operator<< (std::ostream &os, const Report &report) |
std::ostream & | operator<< (std::ostream &os, SimpleSuite &suite) |
Shimmering Clarity testing library.
void sctest::Assert | ( | bool | condition | ) |
Assert is a variant on the assert macro. This variant is intended to be a drop-in replacement for the cassert macro: even in release mode, the tests should still run.
If NDEBUG is set, Assert will throw an exception if condition is false. Otherwise, it calls assert after printing the message.
condition | If true, Assert throws an exception. |
void sctest::Assert | ( | bool | condition, |
std::string | message | ||
) |
Assert is a variant on the assert macro.
If NDEBUG is set, Assert will throw an exception if condition is false. Otherwise, it calls assert after printing the message.
In addition to NDEBUG, SCSL_NOEXCEPT will suppress assertions.
AssertionFailed |
condition | The condition to assert. |
message | The message that should be displayed if condition is false. |
std::ostream& sctest::operator<< | ( | std::ostream & | os, |
const Report & | report | ||
) |
std::ostream& sctest::operator<< | ( | std::ostream & | os, |
SimpleSuite & | suite | ||
) |