The friendly Operating System for the Internet of Things
embUnit.h
1 /*
2  * Copyright (C) 2014 Martine Lenders <mlenders@inf.fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef SYS_EMB_UNIT_H
20 #define SYS_EMB_UNIT_H
21 
22 #include "embUnit/embUnit.h"
23 
24 #ifdef OUTPUT
25 # define OUTPUT_XML (1)
26 # define OUTPUT_TEXT (2)
27 # define OUTPUT_COMPILER (4)
28 # define OUTPUT_COLORTEXT (8)
29 # define OUTPUT_COLOR (16)
30 
31 # if (OUTPUT==OUTPUT_XML)
32 # include "embUnit/XMLOutputter.h"
33 # define OUTPUTTER (XMLOutputter_outputter())
34 # elif (OUTPUT==OUTPUT_TEXT)
35 # include "embUnit/TextOutputter.h"
36 # define OUTPUTTER (TextOutputter_outputter())
37 # elif (OUTPUT==OUTPUT_COMPILER)
38 # include "embUnit/CompilerOutputter.h"
39 # define OUTPUTTER (CompilerOutputter_outputter())
40 # elif (OUTPUT==OUTPUT_COLORTEXT)
41 # include "embUnit/ColorTextOutputter.h"
42 # define OUTPUTTER (ColorTextOutputter_outputter())
43 # elif (OUTPUT==OUTPUT_COLOR)
44 # include "embUnit/ColorOutputter.h"
45 # define OUTPUTTER (ColorOutputter_outputter())
46 # endif
47 
48 # include "embUnit/TextUIRunner.h"
49 
50 # define TESTS_START() TextUIRunner_start()
51 # define TESTS_RUN(t) TextUIRunner_runTest(t)
52 # define TESTS_END() TextUIRunner_end()
53 #else
54 # define TESTS_START() TestRunner_start()
55 # define TESTS_RUN(t) TestRunner_runTest(t)
56 # define TESTS_END() TestRunner_end()
57 #endif
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* SYS_EMB_UNIT_H */