[PATCH weston 2/9] tests: rename client_create to create_client_and_test_surface

Pekka Paalanen ppaalanen at gmail.com
Mon Mar 30 02:20:05 PDT 2015


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

A more descriptive name to not be confused with create_client().

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 tests/bad-buffer-test.c           |  2 +-
 tests/buffer-count-test.c         |  2 +-
 tests/button-test.c               |  2 +-
 tests/event-test.c                | 22 +++++++++++-----------
 tests/keyboard-test.c             |  2 +-
 tests/presentation-test.c         |  2 +-
 tests/roles-test.c                |  4 ++--
 tests/subsurface-test.c           | 30 +++++++++++++++---------------
 tests/text-test.c                 |  2 +-
 tests/weston-test-client-helper.c |  2 +-
 tests/weston-test-client-helper.h |  2 +-
 11 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/tests/bad-buffer-test.c b/tests/bad-buffer-test.c
index dc93b48..5175731 100644
--- a/tests/bad-buffer-test.c
+++ b/tests/bad-buffer-test.c
@@ -64,7 +64,7 @@ TEST(test_truncated_shm_file)
 	struct wl_surface *surface;
 	int frame;
 
-	client = client_create(46, 76, 111, 134);
+	client = create_client_and_test_surface(46, 76, 111, 134);
 	assert(client);
 	surface = client->surface->wl_surface;
 
diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c
index 31d78c2..693cfc5 100644
--- a/tests/buffer-count-test.c
+++ b/tests/buffer-count-test.c
@@ -124,7 +124,7 @@ TEST(test_buffer_count)
 	uint32_t buffer_count;
 	int i;
 
-	test_data.client = client_create(10, 10, 10, 10);
+	test_data.client = create_client_and_test_surface(10, 10, 10, 10);
 	if (!test_data.client->has_wl_drm)
 		skip("compositor has not bound its display to EGL\n");
 
diff --git a/tests/button-test.c b/tests/button-test.c
index 7959fb7..de84190 100644
--- a/tests/button-test.c
+++ b/tests/button-test.c
@@ -31,7 +31,7 @@ TEST(simple_button_test)
 	struct client *client;
 	struct pointer *pointer;
 
-	client = client_create(100, 100, 100, 100);
+	client = create_client_and_test_surface(100, 100, 100, 100);
 	assert(client);
 
 	pointer = client->input->pointer;
diff --git a/tests/event-test.c b/tests/event-test.c
index 43540a5..6607668 100644
--- a/tests/event-test.c
+++ b/tests/event-test.c
@@ -69,7 +69,7 @@ TEST(test_pointer_top_left)
 	struct client *client;
 	int x, y;
 
-	client = client_create(46, 76, 111, 134);
+	client = create_client_and_test_surface(46, 76, 111, 134);
 	assert(client);
 
 	/* move pointer outside top left */
@@ -94,7 +94,7 @@ TEST(test_pointer_bottom_left)
 	struct client *client;
 	int x, y;
 
-	client = client_create(99, 100, 100, 98);
+	client = create_client_and_test_surface(99, 100, 100, 98);
 	assert(client);
 
 	/* move pointer outside bottom left */
@@ -119,7 +119,7 @@ TEST(test_pointer_top_right)
 	struct client *client;
 	int x, y;
 
-	client = client_create(48, 100, 67, 100);
+	client = create_client_and_test_surface(48, 100, 67, 100);
 	assert(client);
 
 	/* move pointer outside top right */
@@ -144,7 +144,7 @@ TEST(test_pointer_bottom_right)
 	struct client *client;
 	int x, y;
 
-	client = client_create(100, 123, 100, 69);
+	client = create_client_and_test_surface(100, 123, 100, 69);
 	assert(client);
 
 	/* move pointer outside bottom right */
@@ -169,7 +169,7 @@ TEST(test_pointer_top_center)
 	struct client *client;
 	int x, y;
 
-	client = client_create(100, 201, 100, 50);
+	client = create_client_and_test_surface(100, 201, 100, 50);
 	assert(client);
 
 	/* move pointer outside top center */
@@ -194,7 +194,7 @@ TEST(test_pointer_bottom_center)
 	struct client *client;
 	int x, y;
 
-	client = client_create(100, 45, 67, 100);
+	client = create_client_and_test_surface(100, 45, 67, 100);
 	assert(client);
 
 	/* move pointer outside bottom center */
@@ -219,7 +219,7 @@ TEST(test_pointer_left_center)
 	struct client *client;
 	int x, y;
 
-	client = client_create(167, 45, 78, 100);
+	client = create_client_and_test_surface(167, 45, 78, 100);
 	assert(client);
 
 	/* move pointer outside left center */
@@ -244,7 +244,7 @@ TEST(test_pointer_right_center)
 	struct client *client;
 	int x, y;
 
-	client = client_create(110, 37, 100, 46);
+	client = create_client_and_test_surface(110, 37, 100, 46);
 	assert(client);
 
 	/* move pointer outside right center */
@@ -268,7 +268,7 @@ TEST(test_pointer_surface_move)
 {
 	struct client *client;
 
-	client = client_create(100, 100, 100, 100);
+	client = create_client_and_test_surface(100, 100, 100, 100);
 	assert(client);
 
 	/* move pointer outside of client */
@@ -310,7 +310,7 @@ TEST(test_surface_output)
 	struct client *client;
 	int x, y;
 
-	client = client_create(100, 100, 100, 100);
+	client = create_client_and_test_surface(100, 100, 100, 100);
 	assert(client);
 
 	assert(output_contains_client(client));
@@ -375,7 +375,7 @@ TEST(buffer_release)
 	int buf3_released = 0;
 	int frame;
 
-	client = client_create(100, 100, 100, 100);
+	client = create_client_and_test_surface(100, 100, 100, 100);
 	assert(client);
 	surface = client->surface->wl_surface;
 
diff --git a/tests/keyboard-test.c b/tests/keyboard-test.c
index 10ffc60..982a231 100644
--- a/tests/keyboard-test.c
+++ b/tests/keyboard-test.c
@@ -32,7 +32,7 @@ TEST(simple_keyboard_test)
 	uint32_t expect_key = 0;
 	uint32_t expect_state = 0;
 
-	client = client_create(10, 10, 1, 1);
+	client = create_client_and_test_surface(10, 10, 1, 1);
 	assert(client);
 
 	keyboard = client->input->keyboard;
diff --git a/tests/presentation-test.c b/tests/presentation-test.c
index 421eddc..ae17b84 100644
--- a/tests/presentation-test.c
+++ b/tests/presentation-test.c
@@ -217,7 +217,7 @@ TEST(test_presentation_feedback_simple)
 	struct client *client;
 	struct feedback *fb;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	wl_surface_attach(client->surface->wl_surface,
diff --git a/tests/roles-test.c b/tests/roles-test.c
index c7d175b..09cc155 100644
--- a/tests/roles-test.c
+++ b/tests/roles-test.c
@@ -91,7 +91,7 @@ TEST(test_role_conflict_sub_wlshell)
 	struct wl_shell *shell;
 	struct wl_shell_surface *shsurf;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	subco = get_subcompositor(client);
@@ -119,7 +119,7 @@ TEST(test_role_conflict_wlshell_sub)
 	struct wl_shell *shell;
 	struct wl_shell_surface *shsurf;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	subco = get_subcompositor(client);
diff --git a/tests/subsurface-test.c b/tests/subsurface-test.c
index cf70017..cdf595d 100644
--- a/tests/subsurface-test.c
+++ b/tests/subsurface-test.c
@@ -89,7 +89,7 @@ TEST(test_subsurface_basic_protocol)
 	struct compound_surface com1;
 	struct compound_surface com2;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com1, client);
@@ -104,7 +104,7 @@ TEST(test_subsurface_position_protocol)
 	struct compound_surface com;
 	int i;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com, client);
@@ -120,7 +120,7 @@ TEST(test_subsurface_placement_protocol)
 	struct client *client;
 	struct compound_surface com;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com, client);
@@ -139,7 +139,7 @@ TEST(test_subsurface_paradox)
 	struct wl_surface *parent;
 	struct wl_subcompositor *subco;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	subco = get_subcompositor(client);
@@ -157,7 +157,7 @@ TEST(test_subsurface_identical_link)
 	struct client *client;
 	struct compound_surface com;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com, client);
@@ -175,7 +175,7 @@ TEST(test_subsurface_change_link)
 	struct compound_surface com;
 	struct wl_surface *stranger;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	stranger = wl_compositor_create_surface(client->wl_compositor);
@@ -194,7 +194,7 @@ TEST(test_subsurface_nesting)
 	struct compound_surface com;
 	struct wl_surface *stranger;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	stranger = wl_compositor_create_surface(client->wl_compositor);
@@ -212,7 +212,7 @@ TEST(test_subsurface_nesting_parent)
 	struct compound_surface com;
 	struct wl_surface *stranger;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	stranger = wl_compositor_create_surface(client->wl_compositor);
@@ -230,7 +230,7 @@ TEST(test_subsurface_loop_paradox)
 	struct wl_surface *surface[3];
 	struct wl_subcompositor *subco;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	subco = get_subcompositor(client);
@@ -253,7 +253,7 @@ TEST(test_subsurface_place_above_stranger)
 	struct compound_surface com;
 	struct wl_surface *stranger;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	stranger = wl_compositor_create_surface(client->wl_compositor);
@@ -272,7 +272,7 @@ TEST(test_subsurface_place_below_stranger)
 	struct compound_surface com;
 	struct wl_surface *stranger;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	stranger = wl_compositor_create_surface(client->wl_compositor);
@@ -291,7 +291,7 @@ TEST(test_subsurface_place_above_foreign)
 	struct compound_surface com1;
 	struct compound_surface com2;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com1, client);
@@ -310,7 +310,7 @@ TEST(test_subsurface_place_below_foreign)
 	struct compound_surface com1;
 	struct compound_surface com2;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com1, client);
@@ -328,7 +328,7 @@ TEST(test_subsurface_destroy_protocol)
 	struct client *client;
 	struct compound_surface com;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	populate_compound_surface(&com, client);
@@ -527,7 +527,7 @@ TEST(test_subsurface_destroy_permutations)
 	int counter = 0;
 	int i;
 
-	client = client_create(100, 50, 123, 77);
+	client = create_client_and_test_surface(100, 50, 123, 77);
 	assert(client);
 
 	permu_init(&per, test_size * 2 - 1);
diff --git a/tests/text-test.c b/tests/text-test.c
index 62adf81..1f6a4a2 100644
--- a/tests/text-test.c
+++ b/tests/text-test.c
@@ -169,7 +169,7 @@ TEST(text_test)
 	struct wl_text_input *text_input;
 	struct text_input_state state;
 
-	client = client_create(100, 100, 100, 100);
+	client = create_client_and_test_surface(100, 100, 100, 100);
 	assert(client);
 
 	factory = NULL;
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index 58ed250..c4b13d5 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -595,7 +595,7 @@ create_client(void)
 }
 
 struct client *
-client_create(int x, int y, int width, int height)
+create_client_and_test_surface(int x, int y, int width, int height)
 {
 	struct client *client;
 	struct surface *surface;
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index 3ca8fd8..a058bfa 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -118,7 +118,7 @@ struct client *
 create_client(void);
 
 struct client *
-client_create(int x, int y, int width, int height);
+create_client_and_test_surface(int x, int y, int width, int height);
 
 struct wl_buffer *
 create_shm_buffer(struct client *client, int width, int height, void **pixels);
-- 
2.0.5



More information about the wayland-devel mailing list