summaryrefslogtreecommitdiffstats
path: root/testsuites/support/include/tmacros.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-08 17:53:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-08 17:53:04 +0000
commit0654c588a8bb6c910935fff1fd62ba5d98b87126 (patch)
tree73e143c7271a8f18271165ccb4e7070e6959617b /testsuites/support/include/tmacros.h
parent2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-0654c588a8bb6c910935fff1fd62ba5d98b87126.tar.bz2
2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* support/include/tmacros.h: Use rtems_test_assert() consistently instead of system assert(). rtems_test_assert() is designed to integrate into the RTEMS test suite infrastructure.
Diffstat (limited to 'testsuites/support/include/tmacros.h')
-rw-r--r--testsuites/support/include/tmacros.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h
index a96c1726f5..4a4f525040 100644
--- a/testsuites/support/include/tmacros.h
+++ b/testsuites/support/include/tmacros.h
@@ -23,7 +23,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <assert.h>
#include <rtems/error.h>
#include <rtems/score/thread.h> /* _Thread_Dispatch_disable_level */
@@ -250,10 +249,12 @@ extern "C" {
number_of_initialization_tasks )
#define rtems_test_assert(__exp) \
- if (!(__exp)) { \
- printf( "%s: %d %s\n", __FILE__, __LINE__, #__exp ); \
- rtems_test_exit(0); \
- }
+ do { \
+ if (!(__exp)) { \
+ printf( "%s: %d %s\n", __FILE__, __LINE__, #__exp ); \
+ rtems_test_exit(0); \
+ } \
+ } while (0)
/*
* Various inttypes.h-stype macros to assist printing