mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
tests: Use bool for client test
A 0/1-only int is a bool. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
b9632822b7
commit
e886b456ab
1 changed files with 4 additions and 4 deletions
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
struct client_destroy_listener {
|
||||
struct wl_listener listener;
|
||||
int done;
|
||||
bool done;
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
@ -49,7 +49,7 @@ client_destroy_notify(struct wl_listener *l, void *data)
|
|||
struct client_destroy_listener *listener =
|
||||
wl_container_of(l, listener, listener);
|
||||
|
||||
listener->done = 1;
|
||||
listener->done = true;
|
||||
}
|
||||
|
||||
TEST(client_destroy_listener)
|
||||
|
|
@ -66,14 +66,14 @@ TEST(client_destroy_listener)
|
|||
assert(client);
|
||||
|
||||
a.listener.notify = client_destroy_notify;
|
||||
a.done = 0;
|
||||
a.done = false;
|
||||
wl_client_add_destroy_listener(client, &a.listener);
|
||||
|
||||
assert(wl_client_get_destroy_listener(client, client_destroy_notify) ==
|
||||
&a.listener);
|
||||
|
||||
b.listener.notify = client_destroy_notify;
|
||||
b.done = 0;
|
||||
b.done = false;
|
||||
wl_client_add_destroy_listener(client, &b.listener);
|
||||
|
||||
wl_list_remove(&a.listener.link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue