with dummy test
This commit is contained in:
@@ -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
|
||||
|
41
test/neuron.cxx
Normal file
41
test/neuron.cxx
Normal file
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user