MCPcopy Create free account
hub / github.com/dmlc/xgboost / ObjTestNameGenerator

Function ObjTestNameGenerator

tests/cpp/objective_helpers.h:25–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template <typename ParamType>
25inline std::string ObjTestNameGenerator(const ::testing::TestParamInfo<ParamType>& info) {
26 auto name = std::string{info.param};
27 // Name must be a valid c++ symbol
28 auto it = std::find(name.cbegin(), name.cend(), ':');
29 if (it != name.cend()) {
30 name[std::distance(name.cbegin(), it)] = '_';
31 }
32 return name;
33};
34
35/**
36 * @brief Construct random label for testing.

Callers 3

test_learner.ccFile · 0.85
test_objective.ccFile · 0.85

Calls 2

cbeginMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected