diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-03-26 12:56:10 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-04-02 12:54:27 +0300 |
commit | 4ac06ff97e8fdf9c30c2987df63680274e3356fe (patch) | |
tree | 21e35243878d505a36d35d49d4ee501b7377a29b /tests | |
parent | 1ffd4615e84c03728ae13aa8343cce59ceeeeb49 (diff) |
tests: rename client_create to create_client_and_test_surface
A more descriptive name to not be confused with create_client().
v2: Rebased: fix also devices-test.c.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bad-buffer-test.c | 2 | ||||
-rw-r--r-- | tests/buffer-count-test.c | 2 | ||||
-rw-r--r-- | tests/button-test.c | 2 | ||||
-rw-r--r-- | tests/devices-test.c | 10 | ||||
-rw-r--r-- | tests/event-test.c | 22 | ||||
-rw-r--r-- | tests/keyboard-test.c | 2 | ||||
-rw-r--r-- | tests/presentation-test.c | 2 | ||||
-rw-r--r-- | tests/roles-test.c | 4 | ||||
-rw-r--r-- | tests/subsurface-test.c | 30 | ||||
-rw-r--r-- | tests/text-test.c | 2 | ||||
-rw-r--r-- | tests/weston-test-client-helper.c | 2 | ||||
-rw-r--r-- | tests/weston-test-client-helper.h | 2 |
12 files changed, 41 insertions, 41 deletions
diff --git a/tests/bad-buffer-test.c b/tests/bad-buffer-test.c index dc93b487..51757312 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 31d78c23..693cfc50 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 7959fb7e..de841905 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/devices-test.c b/tests/devices-test.c index 0288be39..c04d9c5d 100644 --- a/tests/devices-test.c +++ b/tests/devices-test.c @@ -41,7 +41,7 @@ * some devices are removed */ TEST(seat_capabilities_test) { - struct client *cl = client_create(100, 100, 100, 100); + struct client *cl = create_client_and_test_surface(100, 100, 100, 100); assert(cl->input->caps == WL_SEAT_CAPABILITY_ALL); assert(cl->input->pointer); @@ -97,7 +97,7 @@ TEST(seat_capabilities_test) TEST(multiple_device_add_and_remove) { int i; - struct client *cl = client_create(100, 100, 100, 100); + struct client *cl = create_client_and_test_surface(100, 100, 100, 100); /* add device a lot of times */ for (i = 0; i < COUNT; ++i) { @@ -133,7 +133,7 @@ TEST(multiple_device_add_and_remove) TEST(device_release_before_destroy) { - struct client *cl = client_create(100, 100, 100, 100); + struct client *cl = create_client_and_test_surface(100, 100, 100, 100); /* we can release pointer when we won't be using it anymore. * Do it and see what happens if the device is destroyed @@ -188,7 +188,7 @@ TEST(device_release_before_destroy_multiple) /* normal work-flow test */ TEST(device_release_after_destroy) { - struct client *cl = client_create(100, 100, 100, 100); + struct client *cl = create_client_and_test_surface(100, 100, 100, 100); weston_test_device_release(cl->test->weston_test, "pointer"); wl_pointer_release(cl->input->pointer->wl_pointer); @@ -240,7 +240,7 @@ TEST(device_release_after_destroy_multiple) * suffer from this bug atm, but it is worth of testing. */ TEST(get_device_after_destroy) { - struct client *cl = client_create(100, 100, 100, 100); + struct client *cl = create_client_and_test_surface(100, 100, 100, 100); struct wl_pointer *wl_pointer; struct wl_keyboard *wl_keyboard; struct wl_touch *wl_touch; diff --git a/tests/event-test.c b/tests/event-test.c index 43540a52..66076687 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 10ffc60e..982a2314 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 421eddc1..ae17b84c 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 c7d175b9..09cc1554 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 cf70017e..cdf595da 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 62adf811..1f6a4a2c 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 84eae7e6..41ed2087 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -782,7 +782,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 61c0b455..86354716 100644 --- a/tests/weston-test-client-helper.h +++ b/tests/weston-test-client-helper.h @@ -147,7 +147,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); |