Tests the option constants of the Classic API.
More...
|
static bool | IsPowerOfTwo (rtems_option option) |
|
static int | PopCount (rtems_option options) |
|
void | T_case_body_RtemsOptionValOptions (void) |
|
Tests the option constants of the Classic API.
This test case performs the following actions:
- Validate the non-default option constants.
- Check that RTEMS_EVENT_ANY is a power of two.
- Check that RTEMS_NO_WAIT is a power of two.
- Validate the default option constants.
- Check that RTEMS_DEFAULT_OPTIONS is equal to zero.
- Check that RTEMS_EVENT_ALL is equal to zero.
- Check that RTEMS_WAIT is equal to zero.
- Calculate the bitwise or of all non-default option constants.
- Check that the count of set bits in the calculated value is equal to the count of non-default option constants. Since each non-default option constant is a power of two, this proves that each constant has a unique value.