with dummy test

master
Marc Wäckerlin 8 years ago
parent 41109a38e7
commit 3e4eb3e53f
  1. 1
      COPYING
  2. 1
      INSTALL
  3. 43
      bootstrap.sh
  4. 2
      src/neuron.hxx
  5. 9
      test/makefile.am
  6. 41
      test/neuron.cxx

@ -0,0 +1 @@
/usr/share/automake-1.14/COPYING

@ -0,0 +1 @@
/usr/share/automake-1.14/INSTALL

@ -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

@ -5,6 +5,8 @@
// 1 2 3 4 5 6 7 8 // 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890 // 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <matrix.hxx>
/** @page neronet Neural Network with Hidden Layers /** @page neronet Neural Network with Hidden Layers
@section neuro-intro Overview @section neuro-intro Overview

@ -2,7 +2,7 @@
## ##
## This file has been added: ## This file has been added:
## - by bootstrap.sh ## - by bootstrap.sh
## - on Wed, 24 August 2016 09:50:21 +0200 ## - on Wed, 24 August 2016 16:26:30 +0200
## Feel free to change it or even remove and rebuild it, up to your needs ## Feel free to change it or even remove and rebuild it, up to your needs
## ##
## 1 2 3 4 5 6 7 8 ## 1 2 3 4 5 6 7 8
@ -10,8 +10,11 @@
AM_CPPFLAGS = -I${top_srcdir}/src -I${top_builddir}/src 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
LDADD = -lneuron LDADD = -lcppunit -lneuron
TESTS = check_PROGRAMS = neuron
TESTS = ${check_PROGRAMS}
neuron_SOURCES = neuron.cxx
MAINTAINERCLEANFILES = makefile.in MAINTAINERCLEANFILES = makefile.in

@ -0,0 +1,41 @@
/** @id $Id$
This file has been added:
- by bootstrap.sh
- on Wed, 24 August 2016 16:36:14 +0200
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#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;
}
Loading…
Cancel
Save