Commit 026ae168 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Fix for cmaes unit-test to not fail that often

parent d81d1821
......@@ -20,7 +20,7 @@ opt::eval_t fsphere(const Eigen::VectorXd& params, bool g)
BOOST_AUTO_TEST_CASE(test_cmaes_unbounded)
{
size_t N = 10;
size_t N = 100;
size_t errors = 0;
for (size_t i = 0; i < N; i++) {
Eigen::VectorXd g = limbo::opt::Cmaes<Params>()(fsphere, Eigen::VectorXd::Zero(2), false);
......@@ -29,12 +29,12 @@ BOOST_AUTO_TEST_CASE(test_cmaes_unbounded)
errors++;
}
BOOST_CHECK((double(errors) / double(N)) < 0.4);
BOOST_CHECK((double(errors) / double(N)) <= 0.3);
}
BOOST_AUTO_TEST_CASE(test_cmaes_bounded)
{
size_t N = 10;
size_t N = 100;
size_t errors = 0;
for (size_t i = 0; i < N; i++) {
Eigen::VectorXd g = limbo::opt::Cmaes<Params>()(fsphere, Eigen::VectorXd::Zero(2), true);
......@@ -43,5 +43,5 @@ BOOST_AUTO_TEST_CASE(test_cmaes_bounded)
errors++;
}
BOOST_CHECK((double(errors) / double(N)) < 0.3);
BOOST_CHECK((double(errors) / double(N)) <= 0.3);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment