#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/TestFixture.h>
#include <cppunit/TestSuite.h>
#include <cppunit/TestCaller.h>
#include <cppunit/TestResult.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/extensions/HelperMacros.h>
#include <iostream>
#include <stdexcept>
#include "neuroneTest.h"
#include "coucheTest.h"
#include "synapseTest.h"
#include "synapseMatrixTest.h"
#include "inputCoucheTest.h"
#include "reseauTest.h"
using namespace std;

CPPUNIT_TEST_SUITE_REGISTRATION( NeuroneTest ); // teste les neurones
CPPUNIT_TEST_SUITE_REGISTRATION( CoucheTest ); // teste les couches
CPPUNIT_TEST_SUITE_REGISTRATION( SynapseTest );
CPPUNIT_TEST_SUITE_REGISTRATION( SynapseMatrixTest );
CPPUNIT_TEST_SUITE_REGISTRATION( InputCoucheTest );
CPPUNIT_TEST_SUITE_REGISTRATION( ReseauTest );

int main(void){
    CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    CppUnit::TextUi::TestRunner runner;
    runner.addTest( suite );

    runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
                                                       std::cout ) );
    bool wasSucessful = runner.run(); // lance les testes
    return wasSucessful;
}
