From 3e4eb3e53fee8d76a03bbea6d032f2a0d1e947e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 24 Aug 2016 14:53:45 +0000 Subject: [PATCH] with dummy test --- COPYING | 1 + INSTALL | 1 + bootstrap.sh | 43 ++++++++++++++++++++++++++++++++++++++++--- src/neuron.hxx | 2 ++ test/makefile.am | 9 ++++++--- test/neuron.cxx | 41 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 6 deletions(-) create mode 120000 COPYING create mode 120000 INSTALL create mode 100644 test/neuron.cxx diff --git a/COPYING b/COPYING new file mode 120000 index 0000000..caeca07 --- /dev/null +++ b/COPYING @@ -0,0 +1 @@ +/usr/share/automake-1.14/COPYING \ No newline at end of file diff --git a/INSTALL b/INSTALL new file mode 120000 index 0000000..f812f5a --- /dev/null +++ b/INSTALL @@ -0,0 +1 @@ +/usr/share/automake-1.14/INSTALL \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh index 35cf0b3..9964660 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -151,7 +151,8 @@ GENERATED FILES * scripts/makefile.am - if you enabled AX_USE_SCRIPTS * doc/makefile.am - 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 * debian/changelog.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 * html/makefile.am * test/makefile.am + * test/${DEFAULT_PROJECT_NAME}.cxx * examples/makefile.am FILE DEPENDENCIES @@ -811,16 +813,51 @@ AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs $(if testtag AX_USE_LIBTOOL; then cat < +#include +#include +#include +#include +#include + +/// @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: "< + /** @page neronet Neural Network with Hidden Layers @section neuro-intro Overview diff --git a/test/makefile.am b/test/makefile.am index f21c52a..79c622e 100644 --- a/test/makefile.am +++ b/test/makefile.am @@ -2,7 +2,7 @@ ## ## This file has been added: ## - 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 ## ## 1 2 3 4 5 6 7 8 @@ -10,8 +10,11 @@ AM_CPPFLAGS = -I${top_srcdir}/src -I${top_builddir}/src 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 diff --git a/test/neuron.cxx b/test/neuron.cxx new file mode 100644 index 0000000..ed3c6ea --- /dev/null +++ b/test/neuron.cxx @@ -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 +#include +#include +#include +#include +#include + +/// @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: "<