summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuites/ChangeLog6
-rw-r--r--testsuites/support/include/tmacros.h11
2 files changed, 12 insertions, 5 deletions
diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog
index c65bf28edb..008a67709e 100644
--- a/testsuites/ChangeLog
+++ b/testsuites/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2009-11-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* support/include/tmacros.h: Add service to check status returned by
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