|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Small, dependency-free unit test harness used by all CMSDK object tests. More...
#include "Standard.h"#include "Types.h"#include "Utils.h"#include <string>#include <vector>#include <map>Go to the source code of this file.
Classes | |
| struct | cmlabs::UnitTestMetric |
| One recorded performance metric of a test run. More... | |
| struct | cmlabs::UnitTestRecord |
| Registration and result record for a single unit test. More... | |
| class | cmlabs::UnitTestRunner |
| The test runner (process-wide singleton). More... | |
Namespaces | |
| namespace | cmlabs |
| namespace | cmlabs::unittest |
| API used by the body of a unit test. | |
Typedefs | |
| typedef bool(* | cmlabs::UnitTestFunc) () |
| Signature every unit test uses. | |
Functions | |
| void | cmlabs::unittest::progress (int percent, const char *action) |
| Report progress with a short description of the current action. | |
| void | cmlabs::unittest::progressf (int percent, const char *fmt,...) |
| printf-style variant of progress(). | |
| void | cmlabs::unittest::metric (const char *name, double value, const char *unit="", bool higherIsBetter=true) |
| Record a performance metric. | |
| void | cmlabs::unittest::detail (const char *fmt,...) |
| Verbose-only indented diagnostic line (shown only when verbose=1). | |
| void | cmlabs::unittest::fail (const char *fmt,...) |
| Set an explanatory reason shown on the FAIL line. | |
| bool | cmlabs::unittest::verbose () |
Small, dependency-free unit test harness used by all CMSDK object tests.
A self-contained (no external libraries) harness that gives every CMSDK object's unit test consistent output, performance recording and comparison against previous runs.
A test is any function bool Func() that:
Tests are registered with the runner (see RegisterAllCMSDKTests in UnitTest_CMSDK.cpp) and driven by Psyclone:
Definition in file UnitTestFramework.h.