From 0654c588a8bb6c910935fff1fd62ba5d98b87126 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 8 Dec 2009 17:53:04 +0000 Subject: 2009-12-08 Joel Sherrill * 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. --- testsuites/support/include/tmacros.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'testsuites/support/include/tmacros.h') 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 #include #include -#include #include #include /* _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 -- cgit v1.2.3