From a81cbbbd80d7b7cbd4c600c23bca65fbd60c1741 Mon Sep 17 00:00:00 2001 From: Nicolas Tsiftes Date: Wed, 23 Nov 2011 13:37:07 +0100 Subject: [PATCH] Do not return test execution status. The information is already available in the test object, and it becomes possible for test function to easily clean up state allocated during the test by putting such code after UNIT_TEST_END. --- apps/unit-test/unit-test.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/unit-test/unit-test.h b/apps/unit-test/unit-test.h index e12fff50d..e39025cd0 100644 --- a/apps/unit-test/unit-test.h +++ b/apps/unit-test/unit-test.h @@ -88,7 +88,7 @@ typedef struct unit_test { * * \param name The name of the unit test. */ -#define UNIT_TEST(name) unit_test_result_t unit_test_function_##name(unit_test_t *utp) +#define UNIT_TEST(name) static void unit_test_function_##name(unit_test_t *utp) /** * Mark the starting point of the unit test function. @@ -103,8 +103,7 @@ typedef struct unit_test { */ #define UNIT_TEST_END() UNIT_TEST_SUCCEED(); \ unit_test_end: \ - utp->end = RTIMER_NOW(); \ - return utp->result; + utp->end = RTIMER_NOW() /* * The test result is printed with a function that is selected by