From a4e326027556faf4d7f15eee5d84de460daec5d4 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 18 Mar 2016 17:03:02 +0100 Subject: [PATCH] Remove reference to old ann optimizer header. --- .../tests/activation_functions_test.cpp | 1 - src/mlpack/tests/connection_traits_test.cpp | 82 ------------------- 2 files changed, 83 deletions(-) delete mode 100644 src/mlpack/tests/connection_traits_test.cpp diff --git a/src/mlpack/tests/activation_functions_test.cpp b/src/mlpack/tests/activation_functions_test.cpp index 7e7b883cc6..c14769e0c7 100644 --- a/src/mlpack/tests/activation_functions_test.cpp +++ b/src/mlpack/tests/activation_functions_test.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/src/mlpack/tests/connection_traits_test.cpp b/src/mlpack/tests/connection_traits_test.cpp deleted file mode 100644 index effa58f1dc..0000000000 --- a/src/mlpack/tests/connection_traits_test.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @file connection_traits_test.cpp - * @author Marcus Edel - * - * Test the ConnectionTraits class. Because all of the values are known at - * compile time, this test is meant to ensure that uses of ConnectionTraits - * still compile okay and react as expected. - */ -#include - -#include -#include -#include -#include -#include -#include - -#include -#include "old_boost_test_definitions.hpp" - -using namespace mlpack; -using namespace mlpack::ann; - -BOOST_AUTO_TEST_SUITE(ConnectionTraitsTest); - -// Be careful! When writing new tests, always get the boolean value and store -// it in a temporary, because the Boost unit test macros do weird things and -// will cause bizarre problems. - -// Test the defaults. -BOOST_AUTO_TEST_CASE(DefaultsTraitsTest) -{ - // An irrelevant non-connection type class is used here so that the default - // implementation of ConnectionTraits is chosen. - bool b = ConnectionTraits::IsSelfConnection; - BOOST_REQUIRE_EQUAL(b, false); - - b = ConnectionTraits::IsFullselfConnection; - BOOST_REQUIRE_EQUAL(b, false); -} - -// Test the SelfConnection traits. -BOOST_AUTO_TEST_CASE(SelfConnectionTraitsTest) -{ - NeuronLayer<> recurrentLayer(1); - NeuronLayer<> hiddenLayer(1); - iRPROPp<> conOptimizer(1, 1); - - SelfConnection< - decltype(recurrentLayer), - decltype(hiddenLayer), - decltype(conOptimizer)> - layerCon(recurrentLayer, hiddenLayer, conOptimizer); - - bool b = ConnectionTraits::IsSelfConnection; - BOOST_REQUIRE_EQUAL(b, true); - - b = ConnectionTraits::IsFullselfConnection; - BOOST_REQUIRE_EQUAL(b, false); -} - -// Test the FullselfConnection traits. -BOOST_AUTO_TEST_CASE(FullselfConnectionTraitsTest) -{ - NeuronLayer<> recurrentLayer(1); - NeuronLayer<> hiddenLayer(1); - iRPROPp<> conOptimizer(1, 1); - - FullselfConnection< - decltype(recurrentLayer), - decltype(hiddenLayer), - decltype(conOptimizer)> - layerCon(recurrentLayer, hiddenLayer, conOptimizer); - - bool b = ConnectionTraits::IsSelfConnection; - BOOST_REQUIRE_EQUAL(b, false); - - b = ConnectionTraits::IsFullselfConnection; - BOOST_REQUIRE_EQUAL(b, true); -} - -BOOST_AUTO_TEST_SUITE_END();