* Clean up logic for converting tree_method to updater sequence * Use C++11 enum class for extra safety Compiler will give warnings if switch statements don't handle all possible values of C++11 enum class. Also allow enum class to be used as DMLC parameter. * Fix compiler error + lint * Address reviewer comment * Better docstring for DECLARE_FIELD_ENUM_CLASS * Fix lint * Add C++ test to see if tree_method is recognized * Fix clang-tidy error * Add test_learner.h to R package * Update comments * Fix lint error
23 lines
527 B
C++
23 lines
527 B
C++
/*!
|
|
* Copyright 2018 by Contributors
|
|
* \file test_learner.h
|
|
* \brief Hook to access implementation class of Learner
|
|
* \author Hyunsu Philip Cho
|
|
*/
|
|
|
|
#ifndef XGBOOST_TESTS_CPP_TEST_LEARNER_H_
|
|
#define XGBOOST_TESTS_CPP_TEST_LEARNER_H_
|
|
|
|
#include <string>
|
|
|
|
namespace xgboost {
|
|
class LearnerTestHook {
|
|
private:
|
|
virtual std::string GetUpdaterSequence() const = 0;
|
|
// allow friend access to C++ tests for Learner
|
|
friend class LearnerTestHookAdapter;
|
|
};
|
|
} // namespace xgboost
|
|
|
|
#endif // XGBOOST_TESTS_CPP_TEST_LEARNER_H_
|