test_helper.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_TESTS_MAIN_TESTS_TEST_HELPER_HPP
13 #define MLPACK_TESTS_MAIN_TESTS_TEST_HELPER_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace util {
19 
28 template<typename T>
29 void SetInputParam(const std::string& name, T&& value)
30 {
31  CLI::GetParam<typename std::remove_reference<T>::type>(name) =
32  std::forward<T>(value);
33  CLI::SetPassed(name);
34 }
35 
36 } // namespace util
37 } // namespace mlpack
38 
39 #endif
static void SetPassed(const std::string &name)
Mark a particular parameter as passed.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: add_to_po.hpp:21
The core includes that mlpack expects; standard C++ includes and Armadillo.
void SetInputParam(const std::string &name, T &&value)
Utility function that is used in binding tests for setting a parameter and marking it as passed; it u...
Definition: test_helper.hpp:29