Remove rabit dependency on public headers. (#6005)

This commit is contained in:
Jiaming Yuan
2020-08-13 08:26:20 +08:00
committed by GitHub
parent 12e3fb6a6c
commit 674c409e9d
3 changed files with 9 additions and 11 deletions

View File

@@ -519,5 +519,12 @@ TEST(Span, Empty) {
}
}
TEST(SpanDeathTest, Empty) {
std::vector<float> data(1, 0);
ASSERT_TRUE(data.data());
Span<float> s{data.data(), Span<float>::index_type(0)}; // ok to define 0 size span.
EXPECT_DEATH(s[0], "\\[xgboost\\] Condition .* failed.\n"); // not ok to use it.
}
} // namespace common
} // namespace xgboost