Commit 8e7cf56e authored by David Vojtek's avatar David Vojtek

Added new Unit_tests

parent dae22758
......@@ -31,7 +31,7 @@ add_library(boost_unit_test SHARED tests/boost_test_lib_dummy.cpp)
add_executable(neuron_test tests/neuron_test.cpp)
target_link_libraries(neuron_test boost_unit_test neuron)
add_executable(linear_neuron_test tests/NeuronLinear_test.cpp)
add_executable(linear_neuron_test tests/NeuronLinear_test.cpp tests/NeuronBinary_test.cpp tests/NeuronLogistic_test.cpp tests/NeuronTanh.cpp tests/ConnectionWeight_test.cpp tests/Connection_test.cpp tests/NeuralNetwork_test.cpp tests/ConnectionWeightIdentity_test.cpp tests/ParticleSwarm_test.cpp tests/Particle_test.cpp)
target_link_libraries(linear_neuron_test boost_unit_test neuron)
add_executable(test_cases main.cpp)
......
......@@ -10,6 +10,13 @@
#include <stdexcept>
#include "ParticleSwarm.h"
/**
* TODO
* domain_bound out_of_range check
* @param f_dim
* @param domain_bounds
* @param F
*/
Particle::Particle(unsigned int f_dim, double *domain_bounds, double (*F)(double*)) {
this->coordinate_dim = f_dim;
......
......@@ -16,7 +16,6 @@ ConnectionWeight::ConnectionWeight() {
ConnectionWeight::ConnectionWeight(int param_count, std::vector<double>* w_array, std::function<double(double *, int*, int)> *f) {
this->param_indices = new int[param_count];
this->n_params = param_count;
this->weight_array = w_array;
this->weight_function = f;
......@@ -35,6 +34,10 @@ void ConnectionWeight::adjust_weights(double *values) {
}
}
std::vector<double> ConnectionWeight::get_weights(){
return *this->weight_array;
}
void ConnectionWeight::set_weights(double *values) {
for(int i = 0; i < this->n_params; ++i){
this->weight_array->at(this->param_indices[i]) = values[i];
......@@ -53,4 +56,5 @@ void ConnectionWeight::SetParamIndex(int value, int idx) {
double ConnectionWeight::eval() {
return (*this->weight_function)(&this->weight_array->at(0),this->param_indices, this->n_params);
}
\ No newline at end of file
}
......@@ -75,8 +75,14 @@ public:
*
* @param values
*/
void set_weights(double *values);
/**
*
* @return vector of weights
*/
std::vector<double> get_weights();
/**
*
* @param values
......
......@@ -87,7 +87,12 @@ void Neuron::activation_function_set_parameter(int param_idx, double value) {
this->activation_function_parameters[param_idx] = value;
}
double Neuron::activation_function_get_parameter(int param_idx) {
/**
* TODO
* Check out of range
*/
return this->activation_function_parameters[param_idx];
}
......
......@@ -41,7 +41,10 @@ double NeuronLogistic::activation_function_get_partial_derivative(int param_idx
return exa * std::log(ex + 1.0);
}
else if(param_idx == 1){
/**
* TODO
* Could be write as activation_function_get_derivative() * -1
*/
double ex = std::pow(E, a - x);
double ex2 = std::pow(ex + 1.0, -b - 1.0);
......
......@@ -31,7 +31,12 @@ double NeuronTanh::activation_function_get_partial_derivative(int param_idx) {
double a = this->activation_function_parameters[0];
double x = this->potential;
if(param_idx == 0){
/**
* TODO
* Same as activation_function_get_derivative()
*/
double ex = -4.0 * std::pow(E, 2.0 * (x + a));
double exi = std::pow(E, 2.0 * a) + std::pow(E, 2.0 * x);
......
......@@ -47,6 +47,8 @@ public:
double activation_function_get_partial_derivative(int param_idx) override;
/**
* TODO
* Wrong return statement, there is no b
* Calculates d/dx of (e^(x-a) - e^(a-x))/(e^(x-a) + e^(a-x))
* @return a * e^(b - x) * [e^(b - x) + 1]^(-a)
*/
......
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../NetConnection/ConnectionWeightIdentity.h"
/**
* Boost testing suite for testing ConnectionWeightIdentity.h
*/
BOOST_AUTO_TEST_SUITE(ConnectionWeightIdentity_test)
BOOST_AUTO_TEST_CASE(ConnectionWeightIdentity_construction_test){
std::vector<double> weight_array = {1,2,3,4,5};
BOOST_CHECK_NO_THROW(ConnectionWeightIdentity CWI(&weight_array));
}
BOOST_AUTO_TEST_CASE(ConnectionWeightIdentity_eval_test){
std::vector<double> weight_array = {1,2,3,4,5};
ConnectionWeightIdentity CWI(&weight_array);
int para[5]={3,1,2,3,4};
CWI.SetParamIndices(para);
BOOST_CHECK_EQUAL(4,CWI.eval());
}
BOOST_AUTO_TEST_SUITE_END()
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../NetConnection/ConnectionWeight.h"
/**
* Boost testing suite for testing ConnectionWeight.h
* TODO
*/
BOOST_AUTO_TEST_SUITE(ConnectionWeight_test)
BOOST_AUTO_TEST_CASE(ConnectionWeight_construction__test) {
std::vector<double> * w_array = nullptr ;
std::function<double(double *, int*, int)> *f= nullptr;
BOOST_CHECK_NO_THROW( ConnectionWeight conn(2, w_array, f ));
BOOST_CHECK_NO_THROW( ConnectionWeight conn);
}
BOOST_AUTO_TEST_CASE(ConnectionWeight_param_test){
std::vector<double> w_array= {0,1,2,3,4} ;
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = 5;
double b = 4;
return (a + 1.5 * b);
};
ConnectionWeight conn(5, &w_array, &f );
int para[5]={0,1,2,3,4};
BOOST_CHECK_NO_THROW(conn.SetParamIndices(para));
BOOST_CHECK_NO_THROW(conn.SetParamIndex(2,2));
}
BOOST_AUTO_TEST_CASE(ConnectionWeight_param_out_of_range_test){
std::vector<double> w_array= {0,1,2,3,4} ;
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = 5;
double b = 4;
return (a + 1.5 * b);
};
ConnectionWeight conn(7, &w_array, &f );
int para[5]={0,1,2,3,4};
//para out of range
BOOST_CHECK_THROW(conn.SetParamIndices(para), std::out_of_range);
//paramIndex out of range
BOOST_CHECK_THROW(conn.SetParamIndex(2,8), std::out_of_range);
}
BOOST_AUTO_TEST_CASE(ConnectionWeight_eval__test) {
std::vector<double> w_array= {2,3,4,5,6} ;
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = weight_array[0];
double b = weight_array[1];
return (a + 1.5 * b);
};
ConnectionWeight conn(5, &w_array, &f );
int para[5]={4,8,2,3,4};
conn.SetParamIndices(para);
BOOST_CHECK_EQUAL(6.5, conn.eval());
}
BOOST_AUTO_TEST_CASE(ConnectionWeight_weight_adjustment_test) {
std::vector<double> w_array= {2,3,4,5,6} ;
double w_array2[5] = {1,2,3,4,5};
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = weight_array[0];
double b = weight_array[1];
return (a + 1.5 * b);
};
ConnectionWeight conn(5, &w_array, &f );
int para[5]={0,1,2,3,4};
conn.SetParamIndices(para);
conn.adjust_weights(w_array2);
BOOST_CHECK_EQUAL(10.5, conn.eval());
}
BOOST_AUTO_TEST_CASE(ConnectionWeight_weight_set_test) {
std::vector<double> w_array= {2,3,4,5,6} ;
double w_array2[5] = {1,2,3,4,5};
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = weight_array[0];
double b = weight_array[1];
return (a + 1.5 * b);
};
ConnectionWeight conn(5, &w_array, &f );
int para[5]={0,1,2,3,4};
conn.SetParamIndices(para);
conn.set_weights(w_array2);
BOOST_CHECK_EQUAL(4, conn.eval());
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../NetConnection/Connection.h"
#include "../NetConnection/ConnectionWeight.h"
#include "../Neuron/NeuronLinear.h"
#include <iostream>
/**
* Boost testing suite for testing Connection.h
*/
BOOST_AUTO_TEST_SUITE(Connection_test)
BOOST_AUTO_TEST_CASE(Connection_construction__test) {
Neuron* neuron1 = new NeuronLinear(2,3);
Neuron* neuron2 = new NeuronLinear(4,5);
std::vector<double> w_array= {2,3,4,5,6} ;
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = weight_array[0];
double b = weight_array[1];
return (a + 1.5 * b);
};
ConnectionWeight* conn = new ConnectionWeight(2, &w_array, &f );
int para[2]={0,1};
conn->SetParamIndices(para);
Connection connection(neuron1, neuron2, conn);
BOOST_CHECK_EQUAL(neuron1, connection.get_neuron_in());
BOOST_CHECK_EQUAL(neuron2, connection.get_neuron_out());
}
BOOST_AUTO_TEST_CASE(Connection_pass_signal_test) {
Neuron* neuron1 = new NeuronLinear(2,3);
Neuron* neuron2 = new NeuronLinear(4,5);
std::vector<double> w_array= {2,3,4,5,6} ;
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = weight_array[0];
double b = weight_array[1];
return (a + 1.5 * b);
};
ConnectionWeight* conn = new ConnectionWeight(2, &w_array, &f );
int para[2]={0,1};
conn->SetParamIndices(para);
Connection connection(neuron1, neuron2, conn);
neuron1->activate();
neuron2->activate();
BOOST_CHECK_EQUAL(4, neuron2->get_state());
connection.pass_signal();
neuron2->activate();
BOOST_CHECK_EQUAL(69, neuron2->get_state());
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../Network/NeuralNetwork.h"
#include "../Neuron/NeuronLinear.h"
/**
* Boost testing suite for testing NeuralNetwork.h
*/
BOOST_AUTO_TEST_SUITE(NeuralNetwork_test)
BOOST_AUTO_TEST_CASE(NeuralNetwork_constuction_test){
BOOST_CHECK_NO_THROW(NeuralNetwork network);
}
BOOST_AUTO_TEST_CASE(NeuralNetwork_add_neuron_test){
Neuron* n1 = new NeuronLinear(1,1);
Neuron* n2 = new NeuronLinear(2,2);
Neuron* n3 = new NeuronLinear(3,3);
Neuron* n4 = new NeuronLinear(4,4);
NeuralNetwork network;
BOOST_CHECK_EQUAL(0,network.add_neuron(n1));
BOOST_CHECK_EQUAL(1,network.add_neuron(n2));
BOOST_CHECK_EQUAL(2,network.add_neuron(n3));
BOOST_CHECK_EQUAL(3,network.add_neuron(n4));
}
BOOST_AUTO_TEST_CASE(NeuralNetwork_add_connection_simple_test){
Neuron* n1 = new NeuronLinear(1,1);
Neuron* n2 = new NeuronLinear(2,2);
NeuralNetwork network;
network.add_neuron(n1);
network.add_neuron(n2);
network.add_connection_simple(0,1,0,2.5);
BOOST_CHECK_EQUAL(1, n1->get_connections_out()->size());
BOOST_CHECK_EQUAL(1, n2->get_connections_in()->size());
BOOST_CHECK_THROW(network.add_connection_simple(2,0,0,0), std::out_of_range);
BOOST_CHECK_THROW(network.add_connection_simple(0,2,0,0), std::out_of_range);
BOOST_CHECK_THROW(network.add_connection_simple(0,1,-1,0), std::out_of_range);
}
BOOST_AUTO_TEST_CASE(NeuralNetwork_add_connection_general_test){
NeuralNetwork network;
Neuron* n1 = new NeuronLinear(1,1);
Neuron* n2 = new NeuronLinear(2,2);
network.add_neuron(n1);
network.add_neuron(n2);
std::function<double(double *, int*, int)> f= [](double * weight_array, int * index_array, int n_params){
double a = weight_array[0];
double b = weight_array[1];
return (a + 1.5 * b);
};
int para[5]={0,1,2,3,4};
double w_array[5] = {1,2,3,4,5};
network.add_connection_general(0,1, &f, para, w_array, 5);
BOOST_CHECK_EQUAL(1, n1->get_connections_out()->size());
BOOST_CHECK_EQUAL(1, n2->get_connections_in()->size());
BOOST_CHECK_THROW(network.add_connection_general(2,1, &f, para, w_array, 5), std::out_of_range);
BOOST_CHECK_THROW(network.add_connection_general(0,2, &f, para, w_array, 5), std::out_of_range);
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../Neuron/NeuronBinary.h"
/**
* Boost testing suite for testing NeuronBinary.h
* doesn't test inherited methods
*/
BOOST_AUTO_TEST_SUITE(neuronBinary_test)
BOOST_AUTO_TEST_CASE(neuronLinear_construction__test) {
NeuronBinary neuron(1.745);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 1.745);
}
BOOST_AUTO_TEST_CASE(neuronLinear_activate__test) {
NeuronBinary neuron(1.75);
neuron.activate();
BOOST_CHECK_EQUAL(0.0, neuron.get_state());
neuron.set_potential(1.76);
neuron.activate();
BOOST_CHECK_EQUAL(1.0, neuron.get_state());
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
......@@ -4,25 +4,35 @@
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE neuronLinear_test
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../Neuron/NeuronLinear.h"
#include "../Neuron/NeuronLinear.h"
/**
* Boost testing suite for testing NeuronLinear.h
* doesn't test inherit methods
* doesn't test inherited methods
*/
BOOST_AUTO_TEST_SUITE(neuronLinear_test)
BOOST_AUTO_TEST_CASE(neuronLinear_construction__test) {
NeuronLinear neuron(1.745, 784.4547);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 1.745);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 784.4547);
};
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(1), 784.4547);
}
BOOST_AUTO_TEST_CASE(neuronLinear_activate__test) {
NeuronLinear neuron(5.0, 1.0);
neuron.activate();
BOOST_CHECK_EQUAL(5.0, neuron.get_state());
}
BOOST_AUTO_TEST_CASE(neuronLinear_derivative_test) {
NeuronLinear neuron(5.0, 3.0);
BOOST_CHECK_EQUAL(3.0, neuron.activation_function_get_derivative());
BOOST_CHECK_EQUAL(1.0, neuron.activation_function_get_partial_derivative(0));
BOOST_CHECK_EQUAL(0.0, neuron.activation_function_get_partial_derivative(1));
BOOST_CHECK_EQUAL(0.0, neuron.activation_function_get_partial_derivative(10000));
}
BOOST_AUTO_TEST_SUITE_END()
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../Neuron/NeuronLogistic.h"
/**
* Boost testing suite for testing NeuronLogistic.h
* doesn't test inherited methods
*/
BOOST_AUTO_TEST_SUITE(neuronLogistic_test)
BOOST_AUTO_TEST_CASE(neuronLogistic_construction__test) {
NeuronLogistic neuron(1.745, 784.4547);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 1.745);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(1), 784.4547);
}
BOOST_AUTO_TEST_CASE(neuronLogistic_activate__test) {
NeuronLogistic neuron(3.0, 2.0);
neuron.activate();
BOOST_CHECK_CLOSE(0.0022492134466, neuron.get_state(), 0.00001);
}
BOOST_AUTO_TEST_CASE(neuronLogistic_derivative_test){
NeuronLogistic neuron(3.0, 2.0);
BOOST_CHECK_CLOSE(0.0042850850699, neuron.activation_function_get_derivative(), 0.00001);
BOOST_CHECK_CLOSE(-0.0068569236644, neuron.activation_function_get_partial_derivative(0), 0.00001);
BOOST_CHECK_CLOSE(-0.0042850850699, neuron.activation_function_get_partial_derivative(1), 0.00001);
BOOST_CHECK_EQUAL(0.0, neuron.activation_function_get_partial_derivative(10000));
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../Neuron/NeuronTanh.h"
/**
* Boost testing suite for testing NeuronTanh.h
* doesn't test inherited methods
*/
BOOST_AUTO_TEST_SUITE(neuronTanh_test)
BOOST_AUTO_TEST_CASE(neuronTanh_construction__test) {
NeuronTanh neuron(1.745);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 1.745);
}
BOOST_AUTO_TEST_CASE(neuronTanh_activate__test) {
NeuronTanh neuron(2.0);
neuron.activate();
BOOST_CHECK_CLOSE(-0.96402758007581, neuron.get_state(), 0.00001);
}
BOOST_AUTO_TEST_CASE(neuronTanh_derivative_test){
NeuronTanh neuron(2.0);
BOOST_CHECK_CLOSE(-0.0706508248531644, neuron.activation_function_get_derivative(), 0.00001);
BOOST_CHECK_CLOSE(-0.0706508248531644, neuron.activation_function_get_partial_derivative(0), 0.00001);
BOOST_CHECK_EQUAL(0.0, neuron.activation_function_get_partial_derivative(10000));
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../LearningMethods/ParticleSwarm.h"
/**
* Boost testing suite for testing ParticleSwarm.h
*/
double test_particle_swarm_neural_net_error_function(double *weights){
}
BOOST_AUTO_TEST_SUITE(ParticleSwarm_test)
/**
* TODO
*/
BOOST_AUTO_TEST_CASE(ParticleSwarm_construction_test){
double domain_bound = 5;
double fun= 1;
int tmp=5;
double (*F)(double*) = &test_particle_swarm_neural_net_error_function;
//BOOST_CHECK_NO_THROW(ParticleSwarm swarm(F, 2, &domain_bound, 0, 1, 1, 0, 20));
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
/**
* DESCRIPTION OF THE CLASS
*
* @author David Vojtek
* @date 2018
*/
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include "../LearningMethods/ParticleSwarm.h"
/**
* Boost testing suite for testing ParticleSwarm.h
*/
double test_particle_function(double *weights){
}
BOOST_AUTO_TEST_SUITE(Particle_test)
BOOST_AUTO_TEST_CASE(Particle_construction_test){
double domain_bound[5] = {1,2,3,4,5};
double (*F)(double*) = &test_particle_function;
Particle particle(1, &domain_bound[0], F);
// particle.get_coordinate();
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
......@@ -5,10 +5,10 @@
* @date 2018
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_NO_MAIN
#define BOOST_TEST_MODULE neuron_test
#include <boost/test/unit_test.hpp>
#include "../Neuron/Neuron.h"
#include "../Neuron/NeuronLinear.h"
/**
......@@ -22,21 +22,21 @@ BOOST_AUTO_TEST_SUITE(neuron_test)
BOOST_AUTO_TEST_CASE(neuron_saturation_test) {
NeuronLinear neuron(0, 0);
BOOST_CHECK_EQUAL(neuron.is_saturated_in(), false);
BOOST_CHECK_EQUAL(neuron.is_saturated_out(), false);
neuron.set_saturation_in(123);
neuron.set_saturation_out(132);
BOOST_CHECK_EQUAL(neuron.is_saturated_in(), true);
BOOST_CHECK_EQUAL(neuron.is_saturated_out(), true);
neuron.adjust_saturation_in(-123);
neuron.adjust_saturation_out(-123);
neuron.set_saturation_in(123);
neuron.set_saturation_out(123);
BOOST_CHECK_EQUAL(neuron.is_saturated_in(), false);
BOOST_CHECK_EQUAL(neuron.is_saturated_out(), false);
neuron.adjust_saturation_in(-123);
neuron.adjust_saturation_out(-123);
BOOST_CHECK_EQUAL(neuron.is_saturated_in(), true);
BOOST_CHECK_EQUAL(neuron.is_saturated_out(), true);
};
/**
* Test of potencial methods
*/
BOOST_AUTO_TEST_CASE(neuron_potencial_test) {
BOOST_AUTO_TEST_CASE(neuron_potential_test) {
NeuronLinear neuron(0, 0);
BOOST_CHECK_EQUAL(neuron.get_potential(), 0);
......@@ -60,10 +60,7 @@ BOOST_AUTO_TEST_CASE(neuron_state_test)
BOOST_CHECK_EQUAL(neuron.get_state(),(size_t)0);
neuron.set_state(1.123456789);
BOOST_CHECK_EQUAL(neuron.get_state(), 1.123456789);
neuron.set_state(-0.123456789);
BOOST_CHECK_EQUAL(neuron.get_state(), 1);
BOOST_CHECK_EQUAL(neuron.get_state(), 1.0);
BOOST_CHECK_EQUAL(neuron.get_state(), (size_t)1);
};
......@@ -74,29 +71,27 @@ BOOST_AUTO_TEST_CASE(neuron_activation_function_test)
{
NeuronLinear neuron(0,0);
BOOST_CHECK_EQUAL(neuron.activation_function_get_n_parameters(), 0);
BOOST_CHECK_THROW(neuron.activation_function_get_parameter(0), std::out_of_range);
BOOST_CHECK_EQUAL(neuron.activation_function_get_n_parameters(), 2);
BOOST_CHECK_THROW(neuron.activation_function_get_parameter(5), std::out_of_range);
neuron.activation_function_set_parameter(0,41.154);
BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 41.154);
BOOST_CHECK_EQUAL(neuron.activation_function_get_n_parameters(), 1);
BOOST_CHECK_EQUAL(neuron.activation_function_get_n_parameters(), 2);
};
/**
* TODO
*/
BOOST_AUTO_TEST_CASE(neuron_connection_in_test){
NeuronLinear neuron(0,0);
// ConnectionWeight weight = new ConnectionWeight()
// Connection con = new Connection( neuron, neuron , )
BOOST_CHECK_THROW(neuron.get_connections_in(), std::nullptr_t);