diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-18 16:47:21 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-19 08:44:24 +0100 |
commit | 01526c6160792ed67b421b5362d3ed1dc5a4f563 (patch) | |
tree | db64d960e927cf89d8eda03a46545725b18d51a0 | |
parent | baddab33e747123811ece00261bb60d6038bc5bb (diff) |
testsuites/validation/tc-object.c
-rw-r--r-- | testsuites/validation/tc-object.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/testsuites/validation/tc-object.c b/testsuites/validation/tc-object.c index 8d437a87df..9cbe6f04f3 100644 --- a/testsuites/validation/tc-object.c +++ b/testsuites/validation/tc-object.c @@ -65,7 +65,8 @@ * * This test case performs the following actions: * - * - Validate the results of rtems_build_name() for a sample set of parameters. + * - Validate the results of rtems_build_name() (function) and + * rtems_build_name() (macro) for a sample set of parameters. * * - Check that the accumulated name has the expected value. * @@ -76,9 +77,21 @@ * @{ */ +static rtems_name BuildNameMacro( char c1, char c2, char c3, char c4 ) +{ + return rtems_build_name( c1, c2, c3, c4 ); +} + +#undef rtems_build_name + +static rtems_name BuildName( char c1, char c2, char c3, char c4 ) +{ + return rtems_build_name( c1, c2, c3, c4 ); +} + /** - * @brief Validate the results of rtems_build_name() for a sample set of - * parameters. + * @brief Validate the results of rtems_build_name() (function) and + * rtems_build_name() (macro) for a sample set of parameters. */ static void RtemsObjectValObject_Action_0( void ) { @@ -127,13 +140,22 @@ static void RtemsObjectValObject_Action_0( void ) T_quiet_eq_u32( actual_name, expected_name ) accumulated_name += actual_name; - actual_name = rtems_build_name( + actual_name = BuildName( chars[ i ], chars[ j ], chars[ k ], chars[ r ] ); T_quiet_eq_u32( actual_name, expected_name ); + + actual_name = BuildNameMacro( + chars[ i ], + chars[ j ], + chars[ k ], + chars[ r ] + ); + T_quiet_eq_u32( actual_name, expected_name ); + accumulated_name += actual_name; } } |