mlpack  3.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  IO::GetParam<typename std::remove_reference<T>::type>(name) =
32  std::forward<T>(value);
33  IO::SetPassed(name);
34 }
35 
36 } // namespace util
37 } // namespace mlpack
38 
39 #endif
The core includes that mlpack expects; standard C++ includes and Armadillo.
static void SetPassed(const std::string &name)
Mark a particular parameter as passed.
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
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$
Definition: CMakeLists.txt:79