From b76c1e585c853092a74f22b5538d68d8b3c585a6 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Wed, 24 Jul 2019 00:32:37 -0500 Subject: [PATCH] add common header for all tests resolves #406 --- json.h | 4 ++++ tests/Makefile.am | 2 +- tests/test_common.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/test_common.h diff --git a/json.h b/json.h index fc2dadd..76d1f0f 100644 --- a/json.h +++ b/json.h @@ -35,4 +35,8 @@ extern "C" { } #endif +#ifdef TEST +#include "test_common.h" +#endif + #endif diff --git a/tests/Makefile.am b/tests/Makefile.am index ea57bda..8c17473 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,5 @@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -DTEST LDADD= $(LIBJSON_LA) diff --git a/tests/test_common.h b/tests/test_common.h new file mode 100644 index 0000000..516cd05 --- /dev/null +++ b/tests/test_common.h @@ -0,0 +1,4 @@ + +#ifdef NDEBUG +#undef NDEBUG +#endif