refactor tests to get rid of duplication (#4358)

* refactor tests to get rid of duplication

* address review comments
This commit is contained in:
Rong Ou
2019-04-12 00:21:48 -07:00
committed by Philip Hyunsu Cho
parent 3078b5944d
commit f4521bf6aa
5 changed files with 50 additions and 67 deletions

View File

@@ -17,6 +17,7 @@
#include <xgboost/base.h>
#include <xgboost/objective.h>
#include <xgboost/metric.h>
#include <xgboost/predictor.h>
#if defined(__CUDACC__)
#define DeclareUnifiedTest(name) GPU ## name
@@ -153,5 +154,9 @@ class SimpleRealUniformDistribution {
std::shared_ptr<xgboost::DMatrix> *CreateDMatrix(int rows, int columns,
float sparsity, int seed = 0);
std::unique_ptr<DMatrix> CreateSparsePageDMatrix();
gbm::GBTreeModel CreateTestModel();
} // namespace xgboost
#endif