diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
commit | 6249432407af8730c10bccc7894c0725fcaf5e47 (patch) | |
tree | 3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /mert/OptimizerFactoryTest.cpp | |
parent | 59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff) |
beautify
Diffstat (limited to 'mert/OptimizerFactoryTest.cpp')
-rw-r--r-- | mert/OptimizerFactoryTest.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mert/OptimizerFactoryTest.cpp b/mert/OptimizerFactoryTest.cpp index 4d259c68d..56f894904 100644 --- a/mert/OptimizerFactoryTest.cpp +++ b/mert/OptimizerFactoryTest.cpp @@ -7,21 +7,24 @@ using namespace MosesTuning; -namespace { +namespace +{ inline bool CheckBuildOptimizer(unsigned dim, const std::vector<unsigned>& to_optimize, const std::vector<bool>& positive, const std::vector<parameter_t>& start, const std::string& type, - unsigned int num_random) { + unsigned int num_random) +{ boost::scoped_ptr<Optimizer> optimizer(OptimizerFactory::BuildOptimizer(dim, to_optimize, positive, start, type, num_random)); return optimizer.get() != NULL; } } // namespace -BOOST_AUTO_TEST_CASE(optimizer_type) { +BOOST_AUTO_TEST_CASE(optimizer_type) +{ BOOST_CHECK_EQUAL(OptimizerFactory::GetOptimizerType("powell"), OptimizerFactory::POWELL); BOOST_CHECK_EQUAL(OptimizerFactory::GetOptimizerType("random"), @@ -30,7 +33,8 @@ BOOST_AUTO_TEST_CASE(optimizer_type) { OptimizerFactory::RANDOM_DIRECTION); } -BOOST_AUTO_TEST_CASE(optimizer_build) { +BOOST_AUTO_TEST_CASE(optimizer_build) +{ const unsigned dim = 3; std::vector<unsigned> to_optimize; to_optimize.push_back(1); |