test: move the with_server/with_client helper macros to eierpecken.h

We want to re-use those.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-08-12 14:35:41 +10:00
parent d38f9c82ce
commit efa01ffc38
2 changed files with 5 additions and 5 deletions

View file

@ -136,3 +136,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct eis_event *, eis_event_unref);
#define _cleanup_eis_event_ _cleanup_(eis_event_unrefp)
DEFINE_TRIVIAL_CLEANUP_FUNC(struct eis_device *, eis_device_unref);
#define _cleanup_eis_device_ _cleanup_(eis_device_unrefp)
/* Macros intended just for readability to make it more obvious which part
of a test handles server vs client */
#define with_server(peck_) for (struct eis *eis = peck_get_eis(peck_); eis; eis = NULL)
#define with_client(peck_) for (struct ei *ei = peck_get_ei(peck_); ei; ei = NULL)

View file

@ -8,11 +8,6 @@
#include "libei.h"
#include "eierpecken.h"
/* Macros intended just for readability to make it more obvious which part
of a test handles server vs client */
#define with_server(peck_) for (struct eis *eis = peck_get_eis(peck_); eis; eis = NULL)
#define with_client(peck_) for (struct ei *ei = peck_get_ei(peck_); ei; ei = NULL)
static MunitResult
test_ei_ref_unref(const MunitParameter params[], void *user_data)
{