[mutter] tests/utils: Add test_client_quit() helper
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/utils: Add test_client_quit() helper
- Date: Wed, 30 Aug 2017 05:55:56 +0000 (UTC)
commit 5b37901b575ad4ca9250fcae297cdf0333b87ff3
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Aug 18 14:23:42 2017 +0800
tests/utils: Add test_client_quit() helper
https://bugzilla.gnome.org/show_bug.cgi?id=730551
src/tests/test-runner.c | 5 +----
src/tests/test-utils.c | 13 +++++++++++++
src/tests/test-utils.h | 3 +++
3 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/src/tests/test-runner.c b/src/tests/test-runner.c
index dd239ac..8867945 100644
--- a/src/tests/test-runner.c
+++ b/src/tests/test-runner.c
@@ -365,10 +365,7 @@ test_case_do (TestCase *test,
if (!client)
return FALSE;
- if (!test_client_do (client, error, "destroy_all", NULL))
- return FALSE;
-
- if (!test_client_wait (client, error))
+ if (!test_client_quit (client, error))
return FALSE;
g_hash_table_remove (test->clients, test_client_get_id (client));
diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c
index 88d1bc3..18b6da3 100644
--- a/src/tests/test-utils.c
+++ b/src/tests/test-utils.c
@@ -396,6 +396,19 @@ test_client_new (const char *id,
return client;
}
+gboolean
+test_client_quit (TestClient *client,
+ GError **error)
+{
+ if (!test_client_do (client, error, "destroy_all", NULL))
+ return FALSE;
+
+ if (!test_client_wait (client, error))
+ return FALSE;
+
+ return TRUE;
+}
+
void
test_client_destroy (TestClient *client)
{
diff --git a/src/tests/test-utils.h b/src/tests/test-utils.h
index 5b57ef6..61250a7 100644
--- a/src/tests/test-utils.h
+++ b/src/tests/test-utils.h
@@ -70,6 +70,9 @@ MetaWindow * test_client_find_window (TestClient *client,
const char *window_id,
GError **error);
+gboolean test_client_quit (TestClient *client,
+ GError **error);
+
TestClient * test_client_new (const char *id,
MetaWindowClientType type,
GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]