[Xcb-commit] libxcb: tests
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Feb 22 19:05:13 UTC 2020
tests/check_all.c | 9 +++++++++
tests/check_suites.h | 4 ++++
2 files changed, 13 insertions(+)
New commits:
commit 59e271e15bcecf0c461cd5c6c59081fb86b96c22
Author: A. Wilcox <AWilcox at Wilcox-Tech.com>
Date: Mon Dec 23 21:49:29 2019 -0600
tests: Support Check 0.13.0 API
[mattst88]: Keep compatibility with old API via preprocessor
Fixes: #43
diff --git a/tests/check_all.c b/tests/check_all.c
index 4393422..f4c909c 100644
--- a/tests/check_all.c
+++ b/tests/check_all.c
@@ -1,10 +1,19 @@
#include <stdlib.h>
#include "check_suites.h"
+#if CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION < 13
void suite_add_test(Suite *s, TFun tf, const char *name)
+#else
+void suite_add_test(Suite *s, const TTest *tt, const char *name)
+#endif
{
TCase *tc = tcase_create(name);
+
+#if CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION < 13
tcase_add_test(tc, tf);
+#else
+ tcase_add_test(tc, tt);
+#endif
suite_add_tcase(s, tc);
}
diff --git a/tests/check_suites.h b/tests/check_suites.h
index 499f1af..e662084 100644
--- a/tests/check_suites.h
+++ b/tests/check_suites.h
@@ -1,4 +1,8 @@
#include <check.h>
+#if CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION < 13
void suite_add_test(Suite *s, TFun tf, const char *name);
+#else
+void suite_add_test(Suite *s, const TTest *tt, const char *name);
+#endif
Suite *public_suite(void);
More information about the xcb-commit
mailing list