aboutsummaryrefslogtreecommitdiffstats
path: root/test/test.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-11-01 17:49:53 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-11-01 17:49:53 +0000
commita701fdfd1494a45cdbdaa382f0c88c5636aa64dd (patch)
treed613d1e417fad9ee753bb655e7194e49b3f45bdd /test/test.h
parent69d06df416f4aa337de7183b6ed54ffe527ca0c0 (diff)
downloadChibiOS-a701fdfd1494a45cdbdaa382f0c88c5636aa64dd.tar.gz
ChibiOS-a701fdfd1494a45cdbdaa382f0c88c5636aa64dd.tar.bz2
ChibiOS-a701fdfd1494a45cdbdaa382f0c88c5636aa64dd.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@489 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/test.h')
-rw-r--r--test/test.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/test/test.h b/test/test.h
index bc777fabb..864b12e4f 100644
--- a/test/test.h
+++ b/test/test.h
@@ -46,10 +46,10 @@ extern "C" {
void test_print(char *msgp);
void test_println(char *msgp);
void test_emit_token(char token);
- void test_fail(char * msg);
- void test_assert(bool_t condition, char * msg);
- void test_assert_sequence(char *expected);
- void test_assert_time_window(systime_t start, systime_t end);
+ bool_t _test_fail(char * msg);
+ bool_t _test_assert(bool_t condition, char * msg);
+ bool_t _test_assert_sequence(char *expected);
+ bool_t _test_assert_time_window(systime_t start, systime_t end);
void test_terminate_threads(void);
void test_wait_threads(void);
systime_t test_wait_tick(void);
@@ -62,6 +62,26 @@ extern "C" {
}
#endif
+#define test_fail(msg) { \
+ test_fail(msg); \
+ return; \
+}
+
+#define test_assert(condition, msg) { \
+ if (_test_assert(condition, msg)) \
+ return; \
+}
+
+#define test_assert_sequence(expected) { \
+ if (_test_assert_sequence(expected)) \
+ return; \
+}
+
+#define test_assert_time_window(start, end) { \
+ if (_test_assert_time_window(start, end)) \
+ return; \
+}
+
extern Thread *threads[MAX_THREADS];
extern void *wa[MAX_THREADS];
extern bool_t test_timer_done;