2014-05-14 11:13:53 +02:00
|
|
|
/*
|
2015-02-08 19:19:22 +01:00
|
|
|
* Copyright (C) 2014 Martine Lenders <mlenders@inf.fu-berlin.de>
|
2014-05-14 11:13:53 +02:00
|
|
|
*
|
2014-08-23 15:43:13 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-05-14 11:13:53 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-02-10 15:38:54 +01:00
|
|
|
* @defgroup unittests Unittests
|
|
|
|
* @ingroup sys
|
2017-07-03 19:52:24 +02:00
|
|
|
* @brief RIOT Unittests based on the EmbUnit Framework
|
2015-02-10 15:40:44 +01:00
|
|
|
*
|
2020-03-04 13:28:24 +01:00
|
|
|
* @see https://sourceforge.net/projects/embunit
|
2017-07-03 19:52:24 +02:00
|
|
|
*
|
|
|
|
* @note Please refer to https://github.com/RIOT-OS/RIOT/wiki/Testing-RIOT
|
2021-10-28 16:48:00 +02:00
|
|
|
* @note If mocking would be helpful for your unit test, you can also have a look at @ref pkg_fff.
|
2014-05-14 11:13:53 +02:00
|
|
|
*
|
2014-11-27 22:30:14 +01:00
|
|
|
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
|
2014-05-14 11:13:53 +02:00
|
|
|
*/
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#ifndef EMBUNIT_H
|
|
|
|
#define EMBUNIT_H
|
2014-10-10 08:03:06 +02:00
|
|
|
|
2014-05-14 11:13:53 +02:00
|
|
|
#include "embUnit/embUnit.h"
|
|
|
|
|
|
|
|
#ifdef OUTPUT
|
2015-03-07 22:29:56 +01:00
|
|
|
# define OUTPUT_XML (1)
|
|
|
|
# define OUTPUT_TEXT (2)
|
|
|
|
# define OUTPUT_COMPILER (4)
|
|
|
|
# define OUTPUT_COLORTEXT (8)
|
|
|
|
# define OUTPUT_COLOR (16)
|
2014-05-14 11:13:53 +02:00
|
|
|
|
|
|
|
# if (OUTPUT==OUTPUT_XML)
|
2014-11-27 22:30:14 +01:00
|
|
|
# include "embUnit/XMLOutputter.h"
|
2014-05-14 11:13:53 +02:00
|
|
|
# define OUTPUTTER (XMLOutputter_outputter())
|
|
|
|
# elif (OUTPUT==OUTPUT_TEXT)
|
2014-11-27 22:30:14 +01:00
|
|
|
# include "embUnit/TextOutputter.h"
|
2014-05-14 11:13:53 +02:00
|
|
|
# define OUTPUTTER (TextOutputter_outputter())
|
|
|
|
# elif (OUTPUT==OUTPUT_COMPILER)
|
2014-11-27 22:30:14 +01:00
|
|
|
# include "embUnit/CompilerOutputter.h"
|
2014-05-14 11:13:53 +02:00
|
|
|
# define OUTPUTTER (CompilerOutputter_outputter())
|
2015-03-07 22:29:56 +01:00
|
|
|
# elif (OUTPUT==OUTPUT_COLORTEXT)
|
|
|
|
# include "embUnit/ColorTextOutputter.h"
|
|
|
|
# define OUTPUTTER (ColorTextOutputter_outputter())
|
|
|
|
# elif (OUTPUT==OUTPUT_COLOR)
|
|
|
|
# include "embUnit/ColorOutputter.h"
|
|
|
|
# define OUTPUTTER (ColorOutputter_outputter())
|
2014-05-14 11:13:53 +02:00
|
|
|
# endif
|
|
|
|
|
2014-11-27 22:30:14 +01:00
|
|
|
# include "embUnit/TextUIRunner.h"
|
2014-05-14 11:13:53 +02:00
|
|
|
|
|
|
|
# define TESTS_START() TextUIRunner_start()
|
|
|
|
# define TESTS_RUN(t) TextUIRunner_runTest(t)
|
|
|
|
# define TESTS_END() TextUIRunner_end()
|
|
|
|
#else
|
|
|
|
# define TESTS_START() TestRunner_start()
|
|
|
|
# define TESTS_RUN(t) TestRunner_runTest(t)
|
|
|
|
# define TESTS_END() TestRunner_end()
|
|
|
|
#endif
|
|
|
|
|
2014-11-27 22:30:14 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-10-10 08:03:06 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#endif /* EMBUNIT_H */
|