
* Move the project top-level CMakeLists.txt to the root of the project; this allows building Cyclone as part of ROS2 without any special tricks; * Clean up the build options: ENABLE_SSL: whether to check for and include OpenSSL support if a library can be found (default = ON); this used to be called DDSC_ENABLE_OPENSSL, the old name is deprecated but still works BUILD_DOCS: whether to build docs (default = OFF) BUILD_TESTING: whether to build test (default = OFF) * Collect all documentation into top-level "docs" directory; * Move the examples to the top-level directory; * Remove the unused and somewhat misleading pseudo-default cyclonedds.xml; * Remove unused cmake files Signed-off-by: Erik Boasson <eb@ilities.com>
73 lines
2.9 KiB
C
73 lines
2.9 KiB
C
#ifndef CUNIT_THEORY_H
|
|
#define CUNIT_THEORY_H
|
|
|
|
/* Function-style macros cannot be defined on the command line. */
|
|
#ifdef CU_THEORY_INCLUDE_FILE
|
|
#include CU_THEORY_INCLUDE_FILE
|
|
#endif
|
|
|
|
#include "CUnit/Test.h"
|
|
|
|
|
|
#if defined (__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define CU_TheoryDataPointsName(suite, test) \
|
|
CU_TheoryDataPoints_ ## suite ## _ ## test
|
|
|
|
#define CU_TheoryDataPointsTypeName(suite, test) \
|
|
CU_TheoryDataPointsType_ ## suite ## _ ## test
|
|
|
|
#define CU_TheoryDataPointsSize(suite, test) \
|
|
CU_TheoryDataPointsSize_ ## suite ## _ ## test ( \
|
|
CU_TheoryDataPointsName(suite, test))
|
|
|
|
#define CU_TheoryDataPointsSlice(suite, test, index) \
|
|
CU_TheoryDataPointsSlice_ ## suite ## _ ## test ( \
|
|
CU_TheoryDataPointsName(suite, test), index)
|
|
|
|
#define CU_TheoryDataPointsTypedef(suite, test) \
|
|
CU_TheoryDataPointsTypedef_ ## suite ## _ ## test()
|
|
|
|
#define CU_TheoryDataPoints(suite, test) \
|
|
struct CU_TheoryDataPointsTypeName(suite, test) \
|
|
CU_TheoryDataPointsTypedef(suite, test) ; \
|
|
\
|
|
static struct CU_TheoryDataPointsTypeName(suite, test) \
|
|
CU_TheoryDataPointsName(suite, test)
|
|
|
|
#define CU_DataPoints(type, ...) { \
|
|
.p = (type[]) { __VA_ARGS__ }, \
|
|
.n = (sizeof((type[]) { __VA_ARGS__ }) / sizeof(type)) \
|
|
}
|
|
|
|
#define CU_Theory(signature, suite, test, ...) \
|
|
static void CU_TestName(suite, test) signature; \
|
|
void CU_TestProxyName(suite, test)(void); \
|
|
\
|
|
void CU_TestProxyName(suite, test)(void) { \
|
|
cu_data_t data = CU_Fixture(__VA_ARGS__); \
|
|
size_t i, n; \
|
|
\
|
|
if (data.init != NULL) { \
|
|
data.init(); \
|
|
} \
|
|
\
|
|
for (i = 0, n = CU_TheoryDataPointsSize(suite, test); i < n; i++) { \
|
|
CU_TestName(suite, test) CU_TheoryDataPointsSlice(suite, test, i) ; \
|
|
} \
|
|
\
|
|
if (data.fini != NULL) { \
|
|
data.fini(); \
|
|
} \
|
|
} \
|
|
\
|
|
static void CU_TestName(suite, test) signature
|
|
|
|
#if defined (__cplusplus)
|
|
}
|
|
#endif
|
|
|
|
#endif /* CUNIT_THEORY_H */
|
|
|