A test case that can be split into multiple sections.
More...
#include <Testing.h>
A test case that can be split into multiple sections.
To create a test case derive from SC::TestCase and run tests in the constructor
Example:
namespace SC
{
struct ConsoleTest;
}
{
{
using namespace SC;
Console console(consoleConversionBuffer);
{
console.print(str.
view());
}
}
};
namespace SC
{
void runConsoleTest(
SC::TestReport& report) { ConsoleTest test(report); }
}
◆ Execute
Enumerator |
---|
Default | Test is executed if all tests are enabled or if this specific one matches –test-section.
|
OnlyExplicit | Test is executed only if explicitly requested with –test-section.
|
◆ TestCase()
◆ recordExpectation() [1/2]
Records an expectation for a given expression.
- Parameters
-
expression | Expression converted to string |
status | The boolean expectation of a test |
detailedError | A detailed error message |
- Returns
status
◆ recordExpectation() [2/2]
Records an expectation for a given expression.
- Parameters
-
expression | Expression converted to string |
status | A Result object, output from a test |
- Returns
false
if status
Result is not valid
◆ test_section()
Starts a new test section.
- Parameters
-
sectionName | The name of the section |
execution | Execution criteria |
- Returns
true
if the test is enabled, false
otherwise
◆ report
The documentation for this struct was generated from the following file: