summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-04-22 09:36:44 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-04-25 10:33:30 +0200
commit1a94716209e40a9ccaedc7e70f9de961d1cced48 (patch)
tree756049a2d74468ad25a21b049c7a2ae308293b53 /src
parent498a0cefea205f7783dd675aac3f8b831d3baa82 (diff)
downloadsssd-1a94716209e40a9ccaedc7e70f9de961d1cced48.tar.gz
sssd-1a94716209e40a9ccaedc7e70f9de961d1cced48.tar.xz
sssd-1a94716209e40a9ccaedc7e70f9de961d1cced48.zip
TEST: Some macros aren't defined in older version of check.
src/tests/sbus_codegen_tests-sbus_codegen_tests.o: In function `eject_handler': tests/sbus_codegen_tests.c:229: undefined reference to `ck_assert_uint_eq' tests/sbus_codegen_tests.c:235: undefined reference to `ck_assert_uint_eq' tests/sbus_codegen_tests.c:239: undefined reference to `ck_assert_uint_eq' src/tests/sbus_codegen_tests-sbus_codegen_tests.o: In function `test_marshal_basic_types': src/tests/sbus_codegen_tests.c:446: undefined reference to `ck_assert_uint_eq' src/tests/sbus_codegen_tests.c:449: undefined reference to `ck_assert_uint_eq' src/tests/sbus_codegen_tests-sbus_codegen_tests.o: src/tests/sbus_codegen_tests.c:451: more undefined references to `ck_assert_uint_eq' follow collect2: ld returned 1 exit status make[3]: *** [sbus_codegen_tests] Error 1 Macro ck_assert_uint_eq was added in check-0.9.10 Resolves: https://fedorahosted.org/sssd/ticket/2319 Reviewed-by: Michal Židek <mzidek@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/tests/sbus_codegen_tests.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/sbus_codegen_tests.c b/src/tests/sbus_codegen_tests.c
index d9da5c0ce..a88bbac38 100644
--- a/src/tests/sbus_codegen_tests.c
+++ b/src/tests/sbus_codegen_tests.c
@@ -33,6 +33,21 @@
#include "tests/sbus_codegen_tests_generated.h"
#include "util/util_errors.h"
+/* The following 2 macros were taken from check's project source files (0.9.10)
+ * http://check.sourceforge.net/
+ */
+#ifndef _ck_assert_uint
+#define _ck_assert_uint(X, OP, Y) do { \
+ uintmax_t _ck_x = (X); \
+ uintmax_t _ck_y = (Y); \
+ ck_assert_msg(_ck_x OP _ck_y, "Assertion '"#X#OP#Y"' failed: "#X"==%ju, "#Y"==%ju", _ck_x, _ck_y); \
+} while (0)
+#endif /* _ck_assert_uint */
+
+#ifndef ck_assert_uint_eq
+#define ck_assert_uint_eq(X, Y) _ck_assert_uint(X, ==, Y)
+#endif /* ck_assert_uint_eq */
+
static const struct sbus_arg_meta *
find_arg(const struct sbus_arg_meta *args,
const char *name)