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 
21 #ifndef EMBUNIT_H
22 #define EMBUNIT_H
23 
24 #include "embUnit/embUnit.h"
25 #include "kernel_defines.h"
26 
27 #ifdef OUTPUT
28 # define OUTPUT_XML (1)
29 # define OUTPUT_TEXT (2)
30 # define OUTPUT_COMPILER (4)
31 # define OUTPUT_COLORTEXT (8)
32 # define OUTPUT_COLOR (16)
33 
34 # if (OUTPUT==OUTPUT_XML)
35 # include "embUnit/XMLOutputter.h"
36 # define OUTPUTTER (XMLOutputter_outputter())
37 # elif (OUTPUT==OUTPUT_TEXT)
38 # include "embUnit/TextOutputter.h"
39 # define OUTPUTTER (TextOutputter_outputter())
40 # elif (OUTPUT==OUTPUT_COMPILER)
41 # include "embUnit/CompilerOutputter.h"
42 # define OUTPUTTER (CompilerOutputter_outputter())
43 # elif (OUTPUT==OUTPUT_COLORTEXT)
44 # include "embUnit/ColorTextOutputter.h"
45 # define OUTPUTTER (ColorTextOutputter_outputter())
46 # elif (OUTPUT==OUTPUT_COLOR)
47 # include "embUnit/ColorOutputter.h"
48 # define OUTPUTTER (ColorOutputter_outputter())
49 # endif
50 
51 # include "embUnit/TextUIRunner.h"
52 
53 # define TESTS_START() TextUIRunner_start()
54 # define TESTS_RUN(t) TextUIRunner_runTest(t)
55 # define TESTS_END() TextUIRunner_end()
56 #else
57 # define TESTS_START() TestRunner_start()
58 # define TESTS_RUN(t) TestRunner_runTest(t)
59 # define TESTS_END() TestRunner_end()
60 #endif
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* EMBUNIT_H */
kernel_defines.h
Common macros and compiler attributes/pragmas configuration.