ucx/cx/test.h

changeset 113
dde28a806552
parent 112
c3f2f16fa4b8
--- a/ucx/cx/test.h	Sun Oct 19 21:20:08 2025 +0200
+++ b/ucx/cx/test.h	Mon Nov 10 21:52:51 2025 +0100
@@ -136,10 +136,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_attr_nonnull cx_attr_nodiscard  cx_attr_cstr_arg(1) cx_attr_malloc
 static inline CxTestSuite* cx_test_suite_new(const char *name) {
     CxTestSuite* suite = (CxTestSuite*) malloc(sizeof(CxTestSuite));
     if (suite != NULL) {
@@ -157,7 +154,7 @@
  *
  * @param suite the test suite to free
  */
-static inline void cx_test_suite_free(CxTestSuite* suite) {
+CX_INLINE void cx_test_suite_free(CxTestSuite* suite) {
     if (suite == NULL) return;
     CxTestSet *l = suite->tests;
     while (l != NULL) {
@@ -177,7 +174,7 @@
  * @retval non-zero failure
  */
 cx_attr_nonnull
-static inline int cx_test_register(CxTestSuite* suite, CxTest test) {
+CX_INLINE int cx_test_register(CxTestSuite* suite, CxTest test) {
     CxTestSet *t = (CxTestSet*) malloc(sizeof(CxTestSet));
     if (t) {
         t->test = test;
@@ -204,8 +201,7 @@
  * @param out_writer the write function writing to @p out_target
  */
 cx_attr_nonnull
-static inline void cx_test_run(CxTestSuite *suite,
-                               void *out_target, cx_write_func out_writer) {
+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);
     } else {

mercurial