spa: implement the new topic logging for the provided loggers

Both simple log implementation now support the new topic-based
functions, and so does the journal logger too.
This commit is contained in:
Peter Hutterer 2021-09-14 14:49:03 +10:00 committed by Wim Taymans
parent 0e60e9c063
commit 59a5791d41
7 changed files with 366 additions and 27 deletions

View file

@ -344,6 +344,17 @@ struct pwtest_context *pwtest_get_context(struct pwtest_test *t);
} while(0)
/** Assert haystack contains needle */
#define pwtest_str_contains(haystack_, needle_) \
do { \
const char *_h = haystack_; \
const char *_n = needle_; \
if (!strstr(_h, _n)) \
_pwtest_fail_comparison_str(__FILE__, __LINE__, __func__, \
#haystack_ " contains " #needle_, _h, _n); \
} while(0)
/* Needs to be a #define NULL for SPA_SENTINEL */
enum pwtest_arg {
PWTEST_NOARG = 0,