* Build plugin example with CMake. * Remove plugin, cuda related code in automake & autoconf files. * Fix typo in GPU doc.
16 lines
391 B
C++
16 lines
391 B
C++
#include <gtest/gtest.h>
|
|
#include <xgboost/objective.h>
|
|
#include <string>
|
|
#include "../helpers.h"
|
|
|
|
namespace xgboost {
|
|
|
|
TEST(Plugin, ExampleObjective) {
|
|
xgboost::GenericParameter tparam = CreateEmptyGenericParam(0, 0);
|
|
auto * obj = xgboost::ObjFunction::Create("mylogistic", &tparam);
|
|
ASSERT_EQ(obj->DefaultEvalMetric(), std::string{"error"});
|
|
delete obj;
|
|
}
|
|
|
|
} // namespace xgboost
|