[rtems commit] libtest: Add T_unreachable()

Sebastian Huber sebh at rtems.org
Thu Jul 23 08:57:41 UTC 2020


Module:    rtems
Branch:    master
Commit:    467ef5b4313af7451c1b959159e86d6f94af788f
Changeset: http://git.rtems.org/rtems/commit/?id=467ef5b4313af7451c1b959159e86d6f94af788f

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jul 17 21:24:56 2020 +0200

libtest: Add T_unreachable()

Update #3199.

---

 cpukit/include/rtems/test.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h
index d14bb9f..06c5772 100644
--- a/cpukit/include/rtems/test.h
+++ b/cpukit/include/rtems/test.h
@@ -2294,6 +2294,9 @@ void T_pop_fixture(void);
 
 T_NO_RETURN void T_stop(void);
 
+#define T_unreachable() \
+    do { T_true(false, "Unreachable"); T_stop(); } while (0)
+
 /**
  * @brief Gets the scope for nested fixtures.
  *



More information about the vc mailing list