Clang-tidy static analysis (#3222)

* Clang-tidy static analysis

* Modernise checks

* Google coding standard checks

* Identifier renaming according to Google style
This commit is contained in:
Rory Mitchell
2018-04-19 18:57:13 +12:00
committed by GitHub
parent 3242b0a378
commit ccf80703ef
97 changed files with 3407 additions and 3354 deletions

View File

@@ -29,7 +29,7 @@ TEST(gpu_hist_experimental, TestSparseShard) {
ASSERT_LT(shard.row_stride, columns);
auto host_gidx_buffer = shard.gidx_buffer.as_vector();
auto host_gidx_buffer = shard.gidx_buffer.AsVector();
common::CompressedIterator<uint32_t> gidx(host_gidx_buffer.data(),
hmat.row_ptr.back() + 1);
@@ -64,7 +64,7 @@ TEST(gpu_hist_experimental, TestDenseShard) {
ASSERT_EQ(shard.row_stride, columns);
auto host_gidx_buffer = shard.gidx_buffer.as_vector();
auto host_gidx_buffer = shard.gidx_buffer.AsVector();
common::CompressedIterator<uint32_t> gidx(host_gidx_buffer.data(),
hmat.row_ptr.back() + 1);

View File

@@ -89,8 +89,8 @@ TEST(Param, SplitEntry) {
xgboost::tree::SplitEntry se3;
se3.Update(2, 101, 0, false);
xgboost::tree::SplitEntry::Reduce(se2, se3);
EXPECT_EQ(se2.split_index(), 101);
EXPECT_FALSE(se2.default_left());
EXPECT_EQ(se2.SplitIndex(), 101);
EXPECT_FALSE(se2.DefaultLeft());
EXPECT_TRUE(se1.NeedReplace(3, 1));
}