* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
* -------------------------------- Arctic Core ------------------------------*/
-\r
+/*
+ * Contains mostly macros for the test-system. Most macro's have the same
+ * name as in embUnit, to make it easier to use.
+ *
+ */
+
#ifndef OS_TEST_H_\r
#define OS_TEST_H_\r
\r
#include "test_framework.h"
#include "debug.h"\r
\r
-typedef void (*test_func_t)( void );\r
+typedef void (*test_func_t)( void );
\r
+
+#define TEST_INIT() printf("Test init\n");\r
#define TEST_FAIL(_text) test_fail((_text), __FILE__, __LINE__, __FUNCTION__ )\r
-#define TEST_OK() test_ok();\r
+#define TEST_OK() test_ok();
#define TEST_ASSERT(_cond) if(!(_cond)) { TEST_FAIL(#_cond); }
+/* Start to run a test */
#define TEST_RUN() printf("Running test %d\n",test_nr);
+/* Indicate that a test is done */
+//#define TEST_DONE()
+#define TEST_START(_str,_nr) testStart(_str,_nr)
+#define TEST_NEXT(_str,_next_nr) testEnd(); testStart(_str,_next_nr);
\r
\r
extern int test_suite;\r