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.
Fork of OmniWheels by
control_t Struct Reference
[Frameworks]
Control class for specifying test case attributes. More...
#include <utest_types.h>
Inherits utest::v1::base_control_t.
Detailed Description
Control class for specifying test case attributes.
This class encapsulated control information about test cases which, when returned from a test case influences the behavior of the test harness. Instead of using this class directly it is recommended to use the aliases for clearer semantics:
control_t test_case(const size_t call_count) { // repeat 5 times for a total of 6 calls return (call_count < 6) ? CaseRepeatHandler : CaseNext; }
This class overloads the `+` operator to implement something similiar to saturated arbitration:
- The lower timeout value "wins".
- A more involved repeat "wins" (ie. `ALL` > 'HANDLER' > 'NONE').
- Next Case always wins.
You may then add timeouts and repeats together:
control_t test_case(const size_t call_count) { // repeat 5 times for a total of 6 calls, each with a 500ms asynchronous timeout return CaseTimeout(500) + ((call_count < 6) ? CaseRepeatAll : CaseNoRepeat); }
In the future, more control information may be added transparently and backwards compatible.
Definition at line 174 of file utest_types.h.
Generated on Fri Jul 22 2022 04:54:18 by
