tests/ctx: enable the test

This commit is contained in:
Dmitry Podgorny
2016-04-30 16:37:18 +00:00
parent c9a5cba113
commit c62d1d64ab
2 changed files with 9 additions and 2 deletions

View File

@@ -76,8 +76,8 @@ examples_uuid_LDADD = $(STROPHE_LIBS)
## Tests
TESTS = tests/check_parser tests/test_sha1 tests/test_md5 tests/test_rand \
tests/test_scram tests/test_base64 tests/test_jid tests/test_snprintf \
tests/test_resolver
tests/test_scram tests/test_ctx tests/test_base64 tests/test_jid \
tests/test_snprintf tests/test_resolver
check_PROGRAMS = $(TESTS)
tests_check_parser_SOURCES = tests/check_parser.c tests/test.h
@@ -86,6 +86,11 @@ tests_check_parser_CFLAGS = @check_CFLAGS@ $(PARSER_CFLAGS) $(STROPHE_FLAGS) \
tests_check_parser_LDADD = @check_LIBS@ $(STROPHE_LIBS)
tests_check_parser_LDFLAGS = -static
tests_test_ctx_SOURCES = tests/test_ctx.c
tests_test_ctx_CFLAGS = $(STROPHE_FLAGS) -I$(top_srcdir)/src
tests_test_ctx_LDADD = $(STROPHE_LIBS)
tests_test_ctx_LDFLAGS = -static
tests_test_base64_SOURCES = tests/test_base64.c tests/test.c tests/test.h
tests_test_base64_CFLAGS = $(STROPHE_FLAGS) -I$(top_srcdir)/src
tests_test_base64_LDADD = $(STROPHE_LIBS)

View File

@@ -94,6 +94,8 @@ int main(int argc, char **argv)
if (!(log_called && mem_alloc_called && mem_realloc_called &&
mem_free_called))
return 1;
if (mem_alloc_called != mem_free_called)
return 1;
return 0;
}