Eo tests: Fix function overrides test to not test some things when NDEBUG is used.

SVN revision: 82987
This commit is contained in:
Tom Hacohen 2013-01-18 16:13:30 +00:00
parent 506a7bc1fe
commit 37efa5efd7
3 changed files with 7 additions and 2 deletions

View File

@ -105,7 +105,8 @@ tests/eo/function_overrides/function_overrides_inherit3.h \
tests/eo/function_overrides/function_overrides_main.c \
tests/eo/function_overrides/function_overrides_simple.c \
tests/eo/function_overrides/function_overrides_simple.h
tests_eo_test_function_overrides_CPPFLAGS = @EO_CFLAGS@
tests_eo_test_function_overrides_CPPFLAGS = @EO_CFLAGS@ \
-DNDEBUG
tests_eo_test_function_overrides_LDADD = @USE_EO_LIBS@
tests_eo_test_function_overrides_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@

View File

@ -7,7 +7,7 @@
do { \
if (x) \
{ \
fprintf(stderr, "%s:%d - Failure '%s' is TRUE.", \
fprintf(stderr, "%s:%d - Failure '%s' is TRUE.\n", \
__FILE__, __LINE__, # x); \
exit(_EUNIT_EXIT_CODE); \
} \

View File

@ -43,14 +43,18 @@ main(int argc, char *argv[])
fail_if(eo_do_super(obj, simple_a_print()));
#ifndef NDEBUG
fail_if(eo_do(obj, simple_class_print()));
#endif
fail_if(!eo_class_do(SIMPLE_CLASS, simple_class_print()));
fail_if(!eo_class_do(INHERIT_CLASS, simple_class_print()));
fail_if(!eo_class_do(INHERIT2_CLASS, simple_class_print()));
fail_if(!eo_class_do(INHERIT3_CLASS, simple_class_print()));
#ifndef NDEBUG
fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print()));
#endif
eo_do_super(obj, eo_constructor());
eo_do_super(obj, eo_destructor());