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

Function TEST

tests/cpp/common/test_algorithm.cc:14–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace xgboost {
13namespace common {
14TEST(Algorithm, ArgSort) {
15 Context ctx;
16 std::vector<float> inputs{3.0, 2.0, 1.0};
17 auto ret = ArgSort<bst_feature_t>(&ctx, inputs.cbegin(), inputs.cend());
18 std::vector<bst_feature_t> sol{2, 1, 0};
19 ASSERT_EQ(ret, sol);
20}
21
22TEST(Algorithm, Sort) {
23 Context ctx;

Callers

nothing calls this directly

Calls 7

SortFunction · 0.85
StableSortFunction · 0.85
cbeginMethod · 0.45
cendMethod · 0.45
InitMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected