--- a/src/cx/test.h Sun Dec 28 15:45:39 2025 +0100 +++ b/src/cx/test.h Sun Dec 28 17:31:20 2025 +0100 @@ -73,10 +73,6 @@ #include <string.h> #include <setjmp.h> -#ifdef __cplusplus -extern "C" { -#endif - #ifndef __FUNCTION__ /** * Alias for the <code>__func__</code> preprocessor macro. @@ -136,7 +132,7 @@ * @param name optional name of the suite * @return a new test suite */ -cx_attr_nonnull cx_attr_nodiscard cx_attr_cstr_arg(1) cx_attr_malloc +CX_NONNULL CX_NODISCARD CX_CSTR_ARG(1) CX_MALLOC static inline CxTestSuite* cx_test_suite_new(const char *name) { CxTestSuite* suite = (CxTestSuite*) malloc(sizeof(CxTestSuite)); if (suite != NULL) { @@ -173,7 +169,7 @@ * @retval zero success * @retval non-zero failure */ -cx_attr_nonnull +CX_NONNULL CX_INLINE int cx_test_register(CxTestSuite* suite, CxTest test) { CxTestSet *t = (CxTestSet*) malloc(sizeof(CxTestSet)); if (t) { @@ -200,7 +196,7 @@ * @param out_target the target buffer or file to write the output to * @param out_writer the write function writing to @p out_target */ -cx_attr_nonnull +CX_NONNULL CX_INLINE void cx_test_run(CxTestSuite *suite, void *out_target, cx_write_func out_writer) { if (suite->name == NULL) { out_writer("*** Test Suite ***\n", 1, 19, out_target); @@ -326,9 +322,5 @@ #define CX_TEST_CALL_SUBROUTINE(name,...) \ name(_suite_,_output_,_writefnc_,_env_,__VA_ARGS__) -#ifdef __cplusplus -} -#endif - #endif /* UCX_TEST_H */