| 137 | } |
| 138 | |
| 139 | xgboost::Json CheckConfigReloadImpl(xgboost::Configurable* const configurable, std::string name) { |
| 140 | xgboost::Json config_0{xgboost::Object()}; |
| 141 | configurable->SaveConfig(&config_0); |
| 142 | configurable->LoadConfig(config_0); |
| 143 | |
| 144 | xgboost::Json config_1{xgboost::Object()}; |
| 145 | configurable->SaveConfig(&config_1); |
| 146 | |
| 147 | std::string str_0, str_1; |
| 148 | xgboost::Json::Dump(config_0, &str_0); |
| 149 | xgboost::Json::Dump(config_1, &str_1); |
| 150 | EXPECT_EQ(str_0, str_1); |
| 151 | |
| 152 | if (name != "") { |
| 153 | EXPECT_EQ(xgboost::get<xgboost::String>(config_1["name"]), name); |
| 154 | } |
| 155 | return config_1; |
| 156 | } |
| 157 | |
| 158 | void CheckRankingObjFunction(std::unique_ptr<xgboost::ObjFunction> const& obj, |
| 159 | std::vector<xgboost::bst_float> preds, |
no test coverage detected