X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/29a3b2869c0075fc75e8ccc66fc1d9c4c8bf6a85..307e967a2b9e26281858b07a5ac598af288fc16a:/include/xbt/cunit.h diff --git a/include/xbt/cunit.h b/include/xbt/cunit.h index 5b405bb1c8..5b9ee2df29 100644 --- a/include/xbt/cunit.h +++ b/include/xbt/cunit.h @@ -1,6 +1,6 @@ /* cunit - A little C Unit facility */ -/* Copyright (c) 2005-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2005-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,8 +10,10 @@ #ifndef XBT_CUNIT_H_ #define XBT_CUNIT_H_ -#include -#include /* XBT_GNU_PRINTF */ +#ifdef __cplusplus +#include +#endif +#include /* XBT_ATTRIB_PRINTF */ SG_BEGIN_DECL() @@ -123,8 +125,10 @@ XBT_PUBLIC void _xbt_test_log(const char* file, int line, const char* fmt, ...) * @hideinitializer */ #define xbt_test_log(...) _xbt_test_log(__FILE__, __LINE__, __VA_ARGS__) +#ifdef __cplusplus /** @brief Declare that the lastly started test failed because of the provided exception */ -XBT_PUBLIC void xbt_test_exception(xbt_ex_t e); +XBT_PUBLIC void xbt_test_exception(xbt_ex e); +#endif /** @brief Declare that the lastly started test was expected to fail (and actually failed) */ XBT_PUBLIC void xbt_test_expect_failure();