Commit graph

17 commits

Author SHA1 Message Date
Uli Schlachter
fad9c433f5 Fix tests
The tests also use some non-existing events to check that these are
handled correctly. Then came XI 2.4 and introduced several new events,
which broke the test.

Fix this by updating the test accordingly.

This means tests will now fail when using an older version of xcb-proto.
If you are affected by this, either do not run tests, or build against a
newer version of xcb-proto.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-12-08 17:43:53 +01:00
Uli Schlachter
7e5cb24eb4 tests: Add some XFixes-based tests
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:44:45 +02:00
Uli Schlachter
4911a0c8c3 Also add a test for maximum major code
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:28:08 +02:00
Uli Schlachter
ac6b8d8912 Re-add a missing length check
This check was accidentally removed in commit 4ed12c46de.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:18:22 +02:00
Uli Schlachter
54e2145e11 Ignore "event sent" flag in event codes
The highest bit of an event code shows if the event was generated by the X11
server or via the SendEvent request. Ignore this bit in all places that handle
event codes.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:16:32 +02:00
Uli Schlachter
594120dff4 Rename *_get_name_for_event()
Now that there are three different functions for querying information about
events, there shouldn't be one which monopolizes on the "_for_event" name.
Instead, the preferred API is the "_for_xcb_event" function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:39:20 +02:00
Uli Schlachter
861fc2c169 Handle NULL as context argument
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:37:24 +02:00
Uli Schlachter
964a2b5350 Add a function for figuring out information about an event struct
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 13:49:07 +02:00
Uli Schlachter
63ca7f6c88 tests: Use attribute((format(printf,x,y))) if possible
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 13:46:23 +02:00
Uli Schlachter
b82a03f403 Test: Factor out string-comparision helper function
This function compares strings, handles NULL (almost) correctly, prints an error
if a mismatch occurs and returns a suitable int result.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 23:18:03 +02:00
Uli Schlachter
3a6db57743 Test suite: Add tests for XGE event handling
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 17:37:47 +02:00
Uli Schlachter
862579778a Also return the extension name for events and errors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:45:47 +02:00
Uli Schlachter
761079ac8a Test: Skip tests if no X11 server is available
This was suggested by Ran Benita, thanks!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:17:09 +02:00
Uli Schlachter
f6a28cbbad test: Also test minor requests for some core requests
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:53:04 +01:00
Uli Schlachter
95539d3c96 tests: Add tests for RandR
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:51:15 +01:00
Uli Schlachter
059bfdbed8 Add an autotools-based build system
This is based on util-cursor's build system and libxcb/configure.ac for finding
xcb-proto's XML files.

Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:32:21 +01:00
Uli Schlachter
e8b35be19f Begin work on a test suite
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-03-24 21:56:53 +01:00