Test the objective functions in regression_obj.cc tests/cpp: Add tests for objective.cc and RegLossObj
10 lines
252 B
C++
10 lines
252 B
C++
// Copyright by Contributors
|
|
#include <xgboost/objective.h>
|
|
|
|
#include "../helpers.h"
|
|
|
|
TEST(Objective, UnknownFunction) {
|
|
EXPECT_ANY_THROW(xgboost::ObjFunction::Create("unknown_name"));
|
|
EXPECT_NO_THROW(xgboost::ObjFunction::Create("reg:linear"));
|
|
}
|