diff --git a/src/boost_test_lib_dummy.cpp b/src/boost_test_lib_dummy.cpp index 75d736f1d781326d1d87d30f3585ed4bee7f1945..7ec134c5698b7363e63238c2beaa34fffca683ee 100644 --- a/src/boost_test_lib_dummy.cpp +++ b/src/boost_test_lib_dummy.cpp @@ -2,6 +2,6 @@ // Created by David on 11.07.2018. // -#define BOOST_TEST_MODULE unit_test +#define BOOST_TEST_MODULE unit test #include <boost/test/included/unit_test.hpp> //#include<unit_test.hpp> diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 36e12650624203c530b42b5e1b713810fa12e756..4be2e40967dcda846684e7eb153656f363e69e64 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -2,9 +2,6 @@ # UNIT TESTS # ############## -add_executable(neuron_test neuron_test.cpp) -target_link_libraries(neuron_test 4neuro) - add_executable(linear_neuron_test NeuronLinear_test.cpp) target_link_libraries(linear_neuron_test 4neuro) diff --git a/src/tests/Graph_Elemetary_Functions_Function_Cosine_test.cpp b/src/tests/Graph_Elemetary_Functions_Function_Cosine_test.cpp deleted file mode 100644 index 32f70c8211dc3df5156cd0025bc165313eada768..0000000000000000000000000000000000000000 --- a/src/tests/Graph_Elemetary_Functions_Function_Cosine_test.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/** - * DESCRIPTION OF THE CLASS - * - * @author David Vojtek - * @date 2018 - */ - -#define BOOST_TEST_NO_MAIN - -#include <boost/test/unit_test.hpp> -#include "../Graph/ElementaryFunctions/FunctionCosine.h" - -/** - * Boost testing suite for testing FunctionCosine.h - * doesn't test inherited methods - */ -BOOST_AUTO_TEST_SUITE(FunctionCosine_test) - - BOOST_AUTO_TEST_CASE(FunctionCosine_Construction_Test) - { - FunctionCosine functionCosine(1, 2); - // BOOST_CHECK_NO_THROW(); - } - -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file diff --git a/src/tests/neuron_test.cpp b/src/tests/neuron_test.cpp deleted file mode 100644 index 90b360ca05a1f220cbe438405bdeccb3bc3e8625..0000000000000000000000000000000000000000 --- a/src/tests/neuron_test.cpp +++ /dev/null @@ -1,114 +0,0 @@ -///** -// * DESCRIPTION OF THE CLASS -// * -// * @author David Vojtek -// * @date 2018 -// */ -// -//#define BOOST_TEST_NO_MAIN -// -//#include <boost/test/unit_test.hpp> -//#include "../Neuron/Neuron.h" -//#include "../Neuron/NeuronLinear.h" -// -///** -// * Boost testing suite for testing Neuron.h -// * testing use NeuralLinear.h -// */ -//BOOST_AUTO_TEST_SUITE(neuron_test) -// -// /** -// * Test of saturation methods -// */ -// BOOST_AUTO_TEST_CASE(neuron_saturation_test) { -// NeuronLinear neuron(0, 0); -// -// //Test of correct sataration status with empty neuron -// BOOST_CHECK_EQUAL(neuron.is_saturated_in(), true); -// BOOST_CHECK_EQUAL(neuron.is_saturated_out(), true); -// neuron.set_saturation_in(123); -// neuron.set_saturation_out(123); -// //Test of Correct saturation status with added saturation -// 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); -// //Test of Correct saturation status with remove saturation -// 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_potential_test) { -// NeuronLinear neuron(0, 0); -// -// //Test of correct potencial of empty neuron -// BOOST_CHECK_EQUAL(neuron.get_potential(), 0); -// BOOST_CHECK_EQUAL(neuron.get_potential(), (size_t) 0); -// -// neuron.set_potential(1.123456789); -// //Test of correct potencial after set_potencial method was call -// BOOST_CHECK_EQUAL(neuron.get_potential(), 1.123456789); -// neuron.adjust_potential(-0.123456789); -// -// //Test of correct potencial after adjust_potencial method was call -// BOOST_CHECK_EQUAL(neuron.get_potential(), 1); -// BOOST_CHECK_EQUAL(neuron.get_potential(), 1.0); -// BOOST_CHECK_EQUAL(neuron.get_potential(), (size_t) 1); -// } -// -// /** -// * Test of state methods -// */ -// BOOST_AUTO_TEST_CASE(neuron_state_test) { -// NeuronLinear neuron(0, 0); -// -// neuron.set_state(0.00000); -// //Test of correct get_state method output aftew set_state method was call -// BOOST_CHECK_EQUAL(neuron.get_state(), 0); -// BOOST_CHECK_EQUAL(neuron.get_state(), (size_t) 0); -// neuron.set_state(1.123456789); -// BOOST_CHECK_EQUAL(neuron.get_state(), 1.123456789); -// } -// -// /** -// * Test of activation function methods -// */ -// BOOST_AUTO_TEST_CASE(neuron_activation_function_test) { -// NeuronLinear neuron(0, 0); -// -// //Test of correct number of parameters -// BOOST_CHECK_EQUAL(neuron.activation_function_get_n_parameters(), 2); -// //Test of raising out_of_range exception when call activation_function_get_parameter method with not valit parameters -// // Feature not implemented yet -// //BOOST_CHECK_THROW(neuron.activation_function_get_parameter(5), std::out_of_range); -// neuron.activation_function_set_parameter(0, 41.154); -// //Test of correct activation_function_get_paramert method output -// BOOST_CHECK_EQUAL(neuron.activation_function_get_parameter(0), 41.154); -// //Test of correct number of parameters -// BOOST_CHECK_EQUAL(neuron.activation_function_get_n_parameters(), 2); -// } -// -// /** -// * Test of connection methods -// */ -// BOOST_AUTO_TEST_CASE(neuron_connection_test) { -// Neuron *neuron1 = new NeuronLinear(1, 1); -// Neuron *neuron2 = new NeuronLinear(2, 2); -// Connection con(neuron1, neuron2, new ConnectionWeight()); -// neuron1->add_connection_out(&con); -// neuron2->add_connection_in(&con); -// -// //Test of correct number of in and out connections -// BOOST_CHECK_EQUAL(1, neuron1->get_connections_out()->size()); -// BOOST_CHECK_EQUAL(1, neuron2->get_connections_in()->size()); -// //Test of correct connector in valid indexs -// BOOST_CHECK_EQUAL(&con, neuron1->get_connections_out()->at(0)); -// BOOST_CHECK_EQUAL(&con, neuron2->get_connections_in()->at(0)); -// //Test of raising out_of_range exception when call get_connections_in or out with not valid parameters -// } -// -//BOOST_AUTO_TEST_SUITE_END() -//