summaryrefslogtreecommitdiff
path: root/test/xi2/protocol-xiwarppointer.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-22 10:48:37 -0700
committerKeith Packard <keithp@keithp.com>2011-04-22 10:48:37 -0700
commit302bdc3c9678c028bed71dbe9c5ba04997626b6b (patch)
treec2b96c186a2e98f1b0bc71a97b4a43b04ba0afc0 /test/xi2/protocol-xiwarppointer.c
parent001b6b8b70734db1fa2f68e45c1db8337ba9f662 (diff)
parent6f97fe5df16f947e52875187ff4f9e25fab33ad7 (diff)
Merge remote-tracking branch 'whot/for-keith'
Diffstat (limited to 'test/xi2/protocol-xiwarppointer.c')
-rw-r--r--test/xi2/protocol-xiwarppointer.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/test/xi2/protocol-xiwarppointer.c b/test/xi2/protocol-xiwarppointer.c
index 75b7617a0..0c8db453d 100644
--- a/test/xi2/protocol-xiwarppointer.c
+++ b/test/xi2/protocol-xiwarppointer.c
@@ -39,7 +39,6 @@
#include "exevents.h"
#include "protocol-common.h"
-#include <glib.h>
static int expected_x = SPRITE_X;
static int expected_y = SPRITE_Y;
@@ -70,8 +69,8 @@ int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access
static Bool ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
int x, int y, Bool generateEvent)
{
- g_assert(x == expected_x);
- g_assert(y == expected_y);
+ assert(x == expected_x);
+ assert(y == expected_y);
return TRUE;
}
@@ -83,12 +82,12 @@ static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req,
int rc;
rc = ProcXIWarpPointer(client);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client->errorValue == req->deviceid);
+ assert(client->errorValue == req->deviceid);
else if (rc == BadWindow)
- g_assert(client->errorValue == req->dst_win ||
+ assert(client->errorValue == req->dst_win ||
client->errorValue == req->src_win);
@@ -105,12 +104,12 @@ static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req,
swaps(&req->deviceid, n);
rc = SProcXIWarpPointer(client);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client->errorValue == req->deviceid);
+ assert(client->errorValue == req->deviceid);
else if (rc == BadWindow)
- g_assert(client->errorValue == req->dst_win ||
+ assert(client->errorValue == req->dst_win ||
client->errorValue == req->src_win);
client->swapped = FALSE;
@@ -204,13 +203,10 @@ static void test_XIWarpPointer(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();
screen.SetCursorPosition = ScreenSetCursorPosition;
- g_test_add_func("/xi2/protocol/XIWarpPointer", test_XIWarpPointer);
+ test_XIWarpPointer();
- return g_test_run();
+ return 0;
}