diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:02:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:02:34 +0000 |
commit | fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb (patch) | |
tree | a7bde6111c84ea64619656a38fba50909fa0bf60 /tests/check-compat.h | |
parent | Initial commit. (diff) | |
download | lldpd-fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb.tar.xz lldpd-fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb.zip |
Adding upstream version 1.0.18.upstream/1.0.18upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/check-compat.h')
-rw-r--r-- | tests/check-compat.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/check-compat.h b/tests/check-compat.h new file mode 100644 index 0000000..3236d78 --- /dev/null +++ b/tests/check-compat.h @@ -0,0 +1,16 @@ +#ifndef _CHECK_COMPAT_H +#define _CHECK_COMPAT_H + +#if (CHECK_MAJOR_VERSION == 0 && \ + (CHECK_MINOR_VERSION < 9 || \ + (CHECK_MINOR_VERSION == 9 && CHECK_MICRO_VERSION < 10))) +# define ck_assert_ptr_eq(X, Y) \ + do { \ + void *_ck_x = (X); \ + void *_ck_y = (Y); \ + ck_assert_msg(_ck_x == _ck_y, \ + "Assertion '" #X "==" #Y "' failed: " #X "==%p, " #Y "==%p", _ck_x, _ck_y); \ + } while (0) +#endif + +#endif |