[rtems commit] validation: Validate RTEMS_NO_TIMEOUT
Sebastian Huber
sebh at rtems.org
Fri May 19 05:55:31 UTC 2023
Module: rtems
Branch: master
Commit: 8bc15aba565f960f4389a22cfb19076edc7039a5
Changeset: http://git.rtems.org/rtems/commit/?id=8bc15aba565f960f4389a22cfb19076edc7039a5
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Mar 9 16:34:56 2023 +0100
validation: Validate RTEMS_NO_TIMEOUT
Update #3716.
---
testsuites/validation/tc-type.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
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.
+ *
* @{
*/
@@ -92,12 +99,32 @@ 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();
}
/** @} */
More information about the vc
mailing list