diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-04-29 18:09:10 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-04-29 18:09:10 +0200 |
commit | 90d946b80958ba21e951b040125e4e47a78ba865 (patch) | |
tree | 916776723a38882ba9e18aaeaf1653cf68113408 | |
parent | 084125bc4c19af0f2ac4d53a1afbec3cc16f45e6 (diff) |
Hopefully fix for outdated travis
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | test/mode-test.c | 17 |
2 files changed, 16 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml index 7a73af2a..c5504bd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ addons: - autoconf - automake - make - - check - xutils-dev - libpango1.0-dev - libcairo2-dev @@ -54,7 +53,7 @@ before_install: # TODO: We install xkbcommon here, until Travis use an up-to-date enough Ubuntu # TODO: We install libxcb-ewmh-dev here, until it is whitelisted again in Travis install: - - sudo apt-get install -y --force-yes libxkbcommon-dev libxkbcommon-x11-dev libxcb-ewmh-dev flex/trusty-backports libfl-dev/trusty-backports + - sudo apt-get install -y --force-yes libxkbcommon-dev libxkbcommon-x11-dev libxcb-ewmh-dev flex/trusty-backports libfl-dev/trusty-backports check before_script: - git clone --recursive https://github.com/Airblader/xcb-util-xrm.git diff --git a/test/mode-test.c b/test/mode-test.c index 5a7500ea..49d441b8 100644 --- a/test/mode-test.c +++ b/test/mode-test.c @@ -74,8 +74,21 @@ gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key { return TRUE; } - - +#ifndef _ck_assert_ptr_null +/* Pointer against NULL comparison macros with improved output + * compared to ck_assert(). */ +/* OP may only be == or != */ +#define _ck_assert_ptr_null(X, OP) do { \ + const void* _ck_x = (X); \ + ck_assert_msg(_ck_x OP NULL, \ + "Assertion '%s' failed: %s == %#x", \ + #X" "#OP" NULL", \ + #X, _ck_x); \ +} while (0) + +#define ck_assert_ptr_null(X) _ck_assert_ptr_null(X, ==) +#define ck_assert_ptr_nonnull(X) _ck_assert_ptr_null(X, !=) +#endif void test_mode_setup ( void ) { ck_assert_int_eq ( mode_init ( &help_keys_mode ), TRUE); |