diff options
Diffstat (limited to 'xorg-server/test/xi2/protocol-xisetclientpointer.c')
-rw-r--r-- | xorg-server/test/xi2/protocol-xisetclientpointer.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/xorg-server/test/xi2/protocol-xisetclientpointer.c b/xorg-server/test/xi2/protocol-xisetclientpointer.c index 2e638eea7..c266b6560 100644 --- a/xorg-server/test/xi2/protocol-xisetclientpointer.c +++ b/xorg-server/test/xi2/protocol-xisetclientpointer.c @@ -46,7 +46,6 @@ #include "exevents.h" #include "protocol-common.h" -#include <glib.h> static ClientRec client_window; static ClientRec client_request; @@ -72,20 +71,20 @@ static void request_XISetClientPointer(xXISetClientPointerReq* req, int error) client_request = init_client(req->length, req); rc = ProcXISetClientPointer(&client_request); - g_assert(rc == error); + assert(rc == error); if (rc == BadDevice) - g_assert(client_request.errorValue == req->deviceid); + assert(client_request.errorValue == req->deviceid); client_request.swapped = TRUE; swapl(&req->win, n); swaps(&req->length, n); swaps(&req->deviceid, n); rc = SProcXISetClientPointer(&client_request); - g_assert(rc == error); + assert(rc == error); if (rc == BadDevice) - g_assert(client_request.errorValue == req->deviceid); + assert(client_request.errorValue == req->deviceid); } @@ -98,36 +97,36 @@ static void test_XISetClientPointer(void) request.win = CLIENT_WINDOW_ID; - g_test_message("Testing BadDevice error for XIAllDevices and XIMasterDevices."); + printf("Testing BadDevice error for XIAllDevices and XIMasterDevices.\n"); request.deviceid = XIAllDevices; request_XISetClientPointer(&request, BadDevice); request.deviceid = XIAllMasterDevices; request_XISetClientPointer(&request, BadDevice); - g_test_message("Testing Success for VCP and VCK."); + printf("Testing Success for VCP and VCK.\n"); request.deviceid = devices.vcp->id; /* 2 */ request_XISetClientPointer(&request, Success); - g_assert(client_window.clientPtr->id == 2); + assert(client_window.clientPtr->id == 2); request.deviceid = devices.vck->id; /* 3 */ request_XISetClientPointer(&request, Success); - g_assert(client_window.clientPtr->id == 2); + assert(client_window.clientPtr->id == 2); - g_test_message("Testing BadDevice error for all other devices."); + printf("Testing BadDevice error for all other devices.\n"); for (i = 4; i <= 0xFFFF; i++) { request.deviceid = i; request_XISetClientPointer(&request, BadDevice); } - g_test_message("Testing window None"); + printf("Testing window None\n"); request.win = None; request.deviceid = devices.vcp->id; /* 2 */ request_XISetClientPointer(&request, Success); - g_assert(client_request.clientPtr->id == 2); + assert(client_request.clientPtr->id == 2); - g_test_message("Testing invalid window"); + printf("Testing invalid window\n"); request.win = INVALID_WINDOW_ID; request.deviceid = devices.vcp->id; request_XISetClientPointer(&request, BadWindow); @@ -137,13 +136,10 @@ static void test_XISetClientPointer(void) int main(int argc, char** argv) { - g_test_init(&argc, &argv,NULL); - g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); - init_simple(); client_window = init_client(0, NULL); - g_test_add_func("/xi2/protocol/XISetClientPointer", test_XISetClientPointer); + test_XISetClientPointer(); - return g_test_run(); + return 0; } |