mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-20 05:34:35 -04:00
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>
This commit is contained in:
parent
7efe8fbd89
commit
046012a6cf
6 changed files with 45 additions and 37 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue