Changeset 2301 for libcaca


Ignore:
Timestamp:
Apr 19, 2008, 4:07:54 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Use CppUnit? for C and C++ unit tests. Sorry, Jylam.
Location:
libcaca/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r2299 r2301  
    8585AC_ARG_ENABLE(doc,
    8686  [  --enable-doc            build documentation (needs doxygen and LaTeX)])
     87AC_ARG_ENABLE(cppunit,
     88  [  --enable-cppunit        use cppunit for unit tests (autodetected)])
    8789AC_ARG_ENABLE(zzuf,
    8890  [  --enable-zzuf           use zzuf for fuzzing tests (autodetected)])
     
    452454AM_CONDITIONAL(USE_LATEX, test "${LATEX}" != "no")
    453455
     456# Use cppunit for unit tests?
     457CPPUNIT="no"
     458PKG_CHECK_MODULES(CPPUNIT, cppunit, [CPPUNIT="yes"], [AC_MSG_RESULT(no)])
     459AM_CONDITIONAL(USE_CPPUNIT, test "$CPPUNIT" != "no")
     460
    454461# Use zzuf for fuzzing tests?
    455462ZZUF="no"
  • libcaca/trunk/tests/.gitignore

    r2103 r2301  
    11simple
     2cucul-test
  • libcaca/trunk/tests/Makefile.am

    r2299 r2301  
    33AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul
    44
    5 TESTS = simple
     5if USE_CPPUNIT
     6cppunit_tests = cucul-test
     7endif
    68
    7 check_PROGRAMS = simple
     9noinst_PROGRAMS = simple $(cppunit_tests)
     10
     11TESTS = $(noinst_PROGRAMS)
    812
    913simple_SOURCES = simple.c
    1014simple_LDADD = ../cucul/libcucul.la
    1115
     16cucul_test_SOURCES = cucul-test.cpp canvas.cpp
     17cucul_test_CPPFLAGS = $(CPPUNIT_CFLAGS)
     18cucul_test_LDADD = ../cucul/libcucul.la $(CPPUNIT_LIBS)
     19
Note: See TracChangeset for help on using the changeset viewer.