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