summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-18 16:47:21 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 15:18:38 +0100
commitef8c9049e2565f1ff906cea1d52a02bea3ecae6f (patch)
tree1ddd0c01d60c471ea683ddcf9f17a36ff3c8bc06
parent0a108456de0af81bfd297cdabf82e8958efee27e (diff)
testsuites/validation/tc-object.c
-rw-r--r--testsuites/validation/tc-object.c30
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;
}
}