diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-09 16:34:56 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-19 08:08:43 +0200 |
commit | 8bc15aba565f960f4389a22cfb19076edc7039a5 (patch) | |
tree | 72fd618e7855f86e52f34b53e46e7507c83c84f9 /testsuites/validation | |
parent | validation: Test the global construction (diff) | |
download | rtems-8bc15aba565f960f4389a22cfb19076edc7039a5.tar.bz2 |
validation: Validate RTEMS_NO_TIMEOUT
Update #3716.
Diffstat (limited to 'testsuites/validation')
-rw-r--r-- | testsuites/validation/tc-type.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/testsuites/validation/tc-type.c b/testsuites/validation/tc-type.c index 79ea7e03b9..6e7e9d0e5d 100644 --- a/testsuites/validation/tc-type.c +++ b/testsuites/validation/tc-type.c @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 2021, 2023 embedded brains GmbH (http://www.embedded-brains.de) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -71,6 +71,13 @@ * - Assert that RTEMS_ID_NONE cannot be associated with an object because it * has an object index outside the range of valid object indices. * + * - Validate the RTEMS_NO_TIMEOUT constant. + * + * - Assert that RTEMS_NO_TIMEOUT is a compile time constant which evaluates + * to a value of zero. + * + * - Check that RTEMS_NO_TIMEOUT evaluates to a value of zero. + * * @{ */ @@ -93,11 +100,31 @@ static void RtemsTypeValType_Action_0( void ) } /** + * @brief Validate the RTEMS_NO_TIMEOUT constant. + */ +static void RtemsTypeValType_Action_1( void ) +{ + /* Nothing to do */ + + /* + * Assert that RTEMS_NO_TIMEOUT is a compile time constant which evaluates to + * a value of zero. + */ + RTEMS_STATIC_ASSERT( RTEMS_NO_TIMEOUT == 0, NO_TIMEOUT ); + + /* + * Check that RTEMS_NO_TIMEOUT evaluates to a value of zero. + */ + T_eq_u32( RTEMS_NO_TIMEOUT, 0 ); +} + +/** * @fn void T_case_body_RtemsTypeValType( void ) */ T_TEST_CASE( RtemsTypeValType ) { RtemsTypeValType_Action_0(); + RtemsTypeValType_Action_1(); } /** @} */ |