summaryrefslogtreecommitdiffstats
path: root/tests/connection-test.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2015-12-28 11:25:00 +0800
committerJonas Ådahl <jadahl@gmail.com>2016-01-16 16:37:37 +0800
commit046012a6cf1a50e1de2c73cf5a29098453b0171f (patch)
treec7e710b0f72ee5861a7aaa91c83da06308991015 /tests/connection-test.c
parenttests: Synchronize client termination in idle callback (diff)
downloadwayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.tar
wayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.tar.gz
wayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.tar.bz2
wayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.tar.lz
wayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.tar.xz
wayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.tar.zst
wayland-046012a6cf1a50e1de2c73cf5a29098453b0171f.zip
tests: Pass argument to client main
Change the API to pass an "void *" argument to the client main function, allowing the caller to call the same main function with different input. A helper (client_create_noarg) is added for when no argument is passed, and the existing test cases are changed to use this function instead. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'tests/connection-test.c')
-rw-r--r--tests/connection-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/connection-test.c b/tests/connection-test.c
index e9832b7..5d97fd9 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -614,7 +614,7 @@ TEST(closure_leaks)
{
struct display *d = display_create();
- client_create(d, leak_closure);
+ client_create_noarg(d, leak_closure);
display_run(d);
display_destroy(d);
@@ -645,7 +645,7 @@ TEST(closure_leaks_after_error)
struct display *d = display_create();
struct client_info *cl;
- cl = client_create(d, leak_after_error);
+ cl = client_create_noarg(d, leak_after_error);
display_run(d);
wl_client_post_no_memory(cl->wl_client);