Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Harness Class Reference
#include <utest_harness.h>
Static Public Member Functions | |
static bool | run (const Specification &specification) |
Runs a test specification. | |
static bool | is_busy () |
static bool | set_scheduler (utest_v1_scheduler_t scheduler) |
Sets the scheduler to be used. | |
static void | validate_callback (const control_t control=control_t()) |
Call this function in the asynchronous callback that you have been waiting for. | |
static void | raise_failure (const failure_reason_t reason) |
Raising a failure causes the failure to be counted and the failure handler to be called. |
Detailed Description
Test Harness.
This class runs a test specification for you and calls all required handlers. The harness executes the test specification in an asynchronous fashion, therefore `run()` returns immediately.
By default, this harness uses the MINAR scheduler for asynchronous callbacks. If you wamt to provide your own custom scheduler, set `config.utest.use_custom_scheduler` to `true` inside your yotta config and set a custom scheduler implementation using the `set_scheduler()` function. You must set the scheduler before running a specification.
- Note:
- In case of an test abort, the harness will busy-wait and never finish.
Definition at line 51 of file utest_harness.h.
Member Function Documentation
bool run | ( | const Specification & | specification ) | [static] |
Runs a test specification.
- Return values:
-
`true` if the specification can be run `false` if another specification is currently running
Definition at line 98 of file utest_harness.cpp.
Generated on Tue Jul 12 2022 14:27:30 by
