]> rtime.felk.cvut.cz Git - arc.git/blobdiff - system/kernel/testsystem/os_test.h
Updated testsystem. Added test suites. Added Autostart tests. Autotester with T32.
[arc.git] / system / kernel / testsystem / os_test.h
index 3087bd283752474c9c70e26c34601e48c8664195..d1c438a210b3cf2fb56c4331d46145e289c0b519 100644 (file)
  * 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