aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/test/xi2/protocol-xisetclientpointer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-27 06:58:32 +0000
committermarha <marha@users.sourceforge.net>2011-04-27 06:58:32 +0000
commit96d6df5da9cddedf4931bf8e17f96e242467c661 (patch)
tree07977c913b04e80b7dbd302e7a5890422aeacb1b /xorg-server/test/xi2/protocol-xisetclientpointer.c
parent71372d36e1a3f0230b88808f70d35446fda12260 (diff)
downloadvcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.tar.gz
vcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.tar.bz2
vcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.zip
xserver libX11 libxtrans mesa pixman xkeyboard-config git update 27 Apr 2011
Diffstat (limited to 'xorg-server/test/xi2/protocol-xisetclientpointer.c')
-rw-r--r--xorg-server/test/xi2/protocol-xisetclientpointer.c32
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;
}