src/cx/test.h

changeset 1426
3a89b31f0724
parent 1424
563033aa998c
--- a/src/cx/test.h	Wed Oct 15 22:45:21 2025 +0200
+++ b/src/cx/test.h	Thu Oct 16 19:57:47 2025 +0200
@@ -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