|
|
@ -151,7 +151,8 @@ GENERATED FILES |
|
|
|
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS |
|
|
|
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS |
|
|
|
* doc/makefile.am - if you enabled AX_USE_DOXYGEN |
|
|
|
* doc/makefile.am - if you enabled AX_USE_DOXYGEN |
|
|
|
* doc/doxyfile.in - if you enabled AX_USE_DOXYGEN |
|
|
|
* doc/doxyfile.in - if you enabled AX_USE_DOXYGEN |
|
|
|
* test/makefile.am - if you enabled AX_BUILD_TEST or AX_USE_CPPUNIT |
|
|
|
* test/makefile.am - if you enabled AX_USE_CPPUNIT and AX_USE_CXX |
|
|
|
|
|
|
|
* test/${DEFAULT_PROJECT_NAME#lib}.cxx - if you enabled AX_BUILD_TEST or AX_USE_CPPUNIT |
|
|
|
* examples/makefile.am - if you enabled AX_BUILD_EXAMPLES |
|
|
|
* examples/makefile.am - if you enabled AX_BUILD_EXAMPLES |
|
|
|
* debian/changelog.in - if you enabled AX_USE_DEBIAN_PACKAGING |
|
|
|
* debian/changelog.in - if you enabled AX_USE_DEBIAN_PACKAGING |
|
|
|
* debian/control.in - if you enabled AX_USE_DEBIAN_PACKAGING |
|
|
|
* debian/control.in - if you enabled AX_USE_DEBIAN_PACKAGING |
|
|
@ -192,6 +193,7 @@ FILES TO EDIT |
|
|
|
* src/makefile.am |
|
|
|
* src/makefile.am |
|
|
|
* html/makefile.am |
|
|
|
* html/makefile.am |
|
|
|
* test/makefile.am |
|
|
|
* test/makefile.am |
|
|
|
|
|
|
|
* test/${DEFAULT_PROJECT_NAME}.cxx |
|
|
|
* examples/makefile.am |
|
|
|
* examples/makefile.am |
|
|
|
|
|
|
|
|
|
|
|
FILE DEPENDENCIES |
|
|
|
FILE DEPENDENCIES |
|
|
@ -811,16 +813,51 @@ AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src |
|
|
|
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs |
|
|
|
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs |
|
|
|
$(if testtag AX_USE_LIBTOOL; then |
|
|
|
$(if testtag AX_USE_LIBTOOL; then |
|
|
|
cat <<EOF3 |
|
|
|
cat <<EOF3 |
|
|
|
LDADD = -l${PACKAGE_NAME#lib} |
|
|
|
LDADD = -lcppunit -l${PACKAGE_NAME#lib} |
|
|
|
EOF3 |
|
|
|
EOF3 |
|
|
|
fi) |
|
|
|
fi) |
|
|
|
EOF2 |
|
|
|
EOF2 |
|
|
|
fi) |
|
|
|
fi) |
|
|
|
|
|
|
|
|
|
|
|
TESTS = |
|
|
|
check_PROGRAMS = ${PACKAGE_NAME#lib} |
|
|
|
|
|
|
|
TESTS = \${check_PROGRAMS} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${PACKAGE_NAME#lib}_SOURCES = ${PACKAGE_NAME#lib}.cxx |
|
|
|
|
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = makefile.in |
|
|
|
MAINTAINERCLEANFILES = makefile.in |
|
|
|
EOF |
|
|
|
EOF |
|
|
|
|
|
|
|
to --condition AX_USE_CPPUNIT --condition AX_USE_CXX test/${PACKAGE_NAME#lib}.cxx <<EOF |
|
|
|
|
|
|
|
${CHEADER} |
|
|
|
|
|
|
|
#include <cppunit/TestFixture.h> |
|
|
|
|
|
|
|
#include <cppunit/ui/text/TestRunner.h> |
|
|
|
|
|
|
|
#include <cppunit/extensions/HelperMacros.h> |
|
|
|
|
|
|
|
#include <cppunit/extensions/TestFactoryRegistry.h> |
|
|
|
|
|
|
|
#include <cppunit/XmlOutputter.h> |
|
|
|
|
|
|
|
#include <fstream> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @todo Rename DummyTest and DummyTest::dummy() |
|
|
|
|
|
|
|
/// @todo Write test cases |
|
|
|
|
|
|
|
class DummyTest: public CppUnit::TestFixture { |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
void dummy() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
CPPUNIT_TEST_SUITE(DummyTest); |
|
|
|
|
|
|
|
CPPUNIT_TEST(dummy); |
|
|
|
|
|
|
|
CPPUNIT_TEST_SUITE_END(); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
CPPUNIT_TEST_SUITE_REGISTRATION(DummyTest); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) try { |
|
|
|
|
|
|
|
std::ofstream ofs((*argv+std::string(".xml")).c_str()); |
|
|
|
|
|
|
|
CppUnit::TextUi::TestRunner runner; |
|
|
|
|
|
|
|
runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), ofs)); |
|
|
|
|
|
|
|
runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); |
|
|
|
|
|
|
|
return runner.run() ? 0 : 1; |
|
|
|
|
|
|
|
} catch (std::exception& e) { |
|
|
|
|
|
|
|
std::cerr<<"***Exception: "<<e.what()<<std::endl; |
|
|
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
EOF |
|
|
|
to --condition AX_BUILD_EXAMPLES examples/makefile.am <<EOF |
|
|
|
to --condition AX_BUILD_EXAMPLES examples/makefile.am <<EOF |
|
|
|
${HEADER}AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src |
|
|
|
${HEADER}AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src |
|
|
|
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs |
|
|
|
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs |
|
|
|