Skip to content

tests: Support Check 0.13.0 API

A. Wilcox requested to merge awilfox/libxcb:master into master

libxcb test suite does not build properly when using Check 0.13.0:

check_all.c: In function ‘suite_add_test’:
check_all.c:7:2: error: passing argument 2 of ‘_tcase_add_test’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  tcase_add_test(tc, tf);
  ^~~~~~~~~~~~~~
In file included from check_suites.h:1,
                 from check_all.c:2:
/usr/include/check.h:331:69: note: expected ‘const TTest *’ {aka ‘const struct TTest *’} but argument is of type ‘TFun’ {aka ‘void (*)(int)’}
 CK_DLL_EXP void CK_EXPORT _tcase_add_test(TCase * tc, const TTest * ttest,
                                                       ~~~~~~~~~~~~~~^~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:666: check_all.o] Error 1

With this patch, it does build properly.

Edited by A. Wilcox

Merge request reports

Loading