2014-05-14 11:13:53 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Martin Lenders
|
|
|
|
*
|
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
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @addtogroup unittests
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file unittests.h
|
|
|
|
* @brief Common header file for unittests
|
|
|
|
*
|
|
|
|
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UNITTESTS__H
|
|
|
|
#define __UNITTESTS__H
|
|
|
|
|
2014-10-10 08:03:06 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-05-14 11:13:53 +02:00
|
|
|
#include "embUnit/embUnit.h"
|
|
|
|
|
|
|
|
#ifdef OUTPUT
|
|
|
|
# define OUTPUT_XML (1)
|
|
|
|
# define OUTPUT_TEXT (2)
|
|
|
|
# define OUTPUT_COMPILER (4)
|
|
|
|
|
|
|
|
# if (OUTPUT==OUTPUT_XML)
|
|
|
|
# include "textui/XMLOutputter.h"
|
|
|
|
# define OUTPUTTER (XMLOutputter_outputter())
|
|
|
|
# elif (OUTPUT==OUTPUT_TEXT)
|
|
|
|
# include "textui/TextOutputter.h"
|
|
|
|
# define OUTPUTTER (TextOutputter_outputter())
|
|
|
|
# elif (OUTPUT==OUTPUT_COMPILER)
|
|
|
|
# include "textui/CompilerOutputter.h"
|
|
|
|
# define OUTPUTTER (CompilerOutputter_outputter())
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# include "textui/TextUIRunner.h"
|
|
|
|
|
|
|
|
# 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-10-10 08:03:06 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2014-05-14 11:13:53 +02:00
|
|
|
#endif
|