tester: remove BC_ASSERT_*_FATAL macros which are too dangerous/violent, bump...

tester: remove BC_ASSERT_*_FATAL macros which are too dangerous/violent, bump version 0.0.3 and rename utils.c -> tester.c
parent f8245f0c
......@@ -27,16 +27,16 @@ project(bctoolbox)
set(BCTOOLBOX_VERSION_MAJOR 0)
set(BCTOOLBOX_VERSION_MINOR 0)
set(BCTOOLBOX_VERSION_PATCH 2)
set(BCTOOLBOX_VERSION_PATCH 3)
set(BCTOOLBOX_SO_VERSION 0)
set(BCTOOLBOXTESTER_SO_VERSION 0)
set(BCTOOLBOX_VERSION "${BCTOOLBOX_VERSION_MAJOR}.${BCTOOLBOX_VERSION_MINOR}.${BCTOOLBOX_VERSION_PATCH}")
set(PROJECT_VERSION_MAJOR ${BCTOOLBOX_VERSION_MAJOR})
set(PROJECT_VERSION_MINOR ${BCTOOLBOX_VERSION_MINOR})
set(PROJECT_VERSION_PATCH ${BCTOOLBOX_VERSION_PATCH})
set(PROJECT_VERSION "${BCTOOLBOX_VERSION}")
set(BCTOOLBOX_SO_VERSION 0)
set(BCTOOLBOXTESTER_SO_VERSION 0)
option(ENABLE_SHARED "Build shared library." YES)
option(ENABLE_STATIC "Build static library." YES)
option(ENABLE_POLARSSL "Enable polarssl support" ON)
......
......@@ -3,7 +3,7 @@
AC_PREREQ([2.63])
AC_INIT([bctoolbox],[0.0.2],[jehan.monnier@linphone.org])
AC_INIT([bctoolbox],[0.0.3],[jehan.monnier@linphone.org])
BCTOOLBOX_SO_CURRENT=0 dnl increment this number when you add/change/remove an interface
BCTOOLBOX_SO_REVISION=0 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
......@@ -116,7 +116,7 @@ CPPFLAGS="$CPPFLAGS $CUNIT_CFLAGS"
LIBS="$LIBS $CUNIT_LIBS"
AC_CHECK_HEADER(CUnit/CUnit.h, [
AC_CHECK_LIB(cunit, CU_get_error, [CUNIT_LIBS="CUNIT_LIBS -lcunit"; cunit_found=true],
AC_CHECK_LIB(cunit, CU_get_error, [CUNIT_LIBS="CUNIT_LIBS -lcunit"; cunit_found=true],
[cunit_found=false]) ],
[cunit_found=false]
)
......@@ -125,7 +125,7 @@ if test "$cunit_found" != "true" ; then
AC_MSG_ERROR("CUnit not found")
else
AC_CHECK_LIB(cunit, CU_get_suite,
AC_CHECK_LIB(cunit, CU_get_suite,
[ AC_DEFINE(HAVE_CU_GET_SUITE, 1, [Defined when CU_get_suite is available])]
)
AC_CHECK_LIB(cunit, CU_set_trace_handler,
......@@ -193,7 +193,7 @@ dnl substitute variables used by .pc files
if test "$prefix" = "NONE" ; then
install_prefix=/usr
else
else
install_prefix=$prefix
fi
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ if(POLARSSL_FOUND)
endif()
endif()
if(CUNIT_FOUND)
set(BCTOOLBOX_TESTER_SOURCE_FILES tester/utils.c)
set(BCTOOLBOX_TESTER_SOURCE_FILES tester.c)
endif()
if(ENABLE_STATIC)
......
SUBDIRS=crypto tester
SUBDIRS=crypto
EXTRA_DIST=utils.h
\ No newline at end of file
EXTRA_DIST=utils.h
lib_LTLIBRARIES=libbctoolbox-tester.la
libbctoolbox_tester_la_SOURCES = utils.c
libbctoolbox_tester_la_LIBADD = $(CUNIT_LIBS)
libbctoolbox_tester_la_LDFLAGS= -version-info $(BCTOOLBOX_SO_VERSION) -no-undefined
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(CUNIT_CFLAGS)
......@@ -72,7 +72,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h>
#endif
#ifndef F_OK
#ifndef F_OK
#define F_OK 00 /* Visual Studio does not define F_OK */
#endif
......@@ -767,7 +767,7 @@ void bc_set_trace_handler(void(*handler)(int, const char*, va_list)) {
#endif
}
int bc_assert(const char* file, int line, int predicate, const char* format, int fatal) {
int bc_assert(const char* file, int line, int predicate, const char* format) {
if (!predicate) bc_tester_printf(bc_printf_verbosity_info, format, NULL);
return CU_assertImplementation(predicate, line, format, file, "", fatal);
return CU_assertImplementation(predicate, line, format, file, "", FALSE);
}
lib_LTLIBRARIES=libbctoolbox-tester.la
libbctoolbox_tester_la_SOURCES = utils.c
libbctoolbox_tester_la_LIBADD = $(CUNIT_LIBS)
libbctoolbox_tester_la_LDFLAGS= -version-info $(BCTOOLBOX_SO_VERSION) -no-undefined
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(CUNIT_CFLAGS)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment