| 43 | |
| 44 | namespace xgboost { |
| 45 | TEST(Learner, Basic) { |
| 46 | using Arg = std::pair<std::string, std::string>; |
| 47 | auto args = {Arg("tree_method", "exact")}; |
| 48 | auto mat_ptr = RandomDataGenerator{10, 10, 0.0f}.GenerateDMatrix(); |
| 49 | auto learner = std::unique_ptr<Learner>(Learner::Create({mat_ptr})); |
| 50 | learner->SetParams(args); |
| 51 | |
| 52 | auto major = XGBOOST_VER_MAJOR; |
| 53 | auto minor = XGBOOST_VER_MINOR; |
| 54 | auto patch = XGBOOST_VER_PATCH; |
| 55 | |
| 56 | static_assert(std::is_integral_v<decltype(major)>, "Wrong major version type"); |
| 57 | static_assert(std::is_integral_v<decltype(minor)>, "Wrong minor version type"); |
| 58 | static_assert(std::is_integral_v<decltype(patch)>, "Wrong patch version type"); |
| 59 | } |
| 60 | |
| 61 | TEST(Learner, ParameterValidation) { |
| 62 | ConsoleLogger::Configure({{"verbosity", "2"}}); |
nothing calls this directly
no test coverage detected