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-12-01 14:25:15 +0100 |
commit | 0c800307f2661775055d0a5aabd2e05b6dc00895 (patch) | |
tree | 3e94be037055fcbab4f9bfb80426f854b4de9aab | |
parent | 551af9f13f68c3b8558087658dc7d19603406a8f (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; } } |