Skip to content

Commit

Permalink
Cleanup test.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Mar 16, 2022
1 parent 173ec46 commit 644c436
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/cpp/tree/test_quantile_hist.cc
Expand Up @@ -26,9 +26,8 @@ class QuantileHistMock : public QuantileHistMaker {
struct BuilderMock : public QuantileHistMaker::Builder<GradientSumT> {
using RealImpl = QuantileHistMaker::Builder<GradientSumT>;

BuilderMock(const TrainParam &param, std::unique_ptr<TreeUpdater> pruner,
DMatrix const *fmat, GenericParameter const* ctx)
: RealImpl(1, param, std::move(pruner), fmat, ObjInfo{ObjInfo::kRegression}, ctx) {}
BuilderMock(const TrainParam& param, DMatrix const* fmat, GenericParameter const* ctx)
: RealImpl(1, param, fmat, ObjInfo{ObjInfo::kRegression}, ctx) {}

public:
void TestInitData(const GHistIndexMatrix& gmat,
Expand Down Expand Up @@ -113,10 +112,10 @@ class QuantileHistMock : public QuantileHistMaker {
dmat_ = RandomDataGenerator(kNRows, kNCols, 0.8).Seed(3).GenerateDMatrix();
ctx_.UpdateAllowUnknown(Args{});
if (single_precision_histogram) {
float_builder_.reset(new BuilderMock<float>(param_, std::move(pruner_), dmat_.get(), &ctx_));
float_builder_.reset(new BuilderMock<float>(param_, dmat_.get(), &ctx_));
} else {
double_builder_.reset(
new BuilderMock<double>(param_, std::move(pruner_), dmat_.get(), &ctx_));
new BuilderMock<double>(param_, dmat_.get(), &ctx_));
}
}
~QuantileHistMock() override = default;
Expand Down

0 comments on commit 644c436

Please sign in to comment.