Use `UpdateAllowUnknown' for non-model related parameter. (#4961)
* Use `UpdateAllowUnknown' for non-model related parameter. Model parameter can not pack an additional boolean value due to binary IO format. This commit deals only with non-model related parameter configuration. * Add tidy command line arg for use-dmlc-gtest.
This commit is contained in:
@@ -16,6 +16,8 @@ TEST(Monitor, Logging) {
|
||||
|
||||
Args args = {std::make_pair("verbosity", "3")};
|
||||
ConsoleLogger::Configure(args);
|
||||
ASSERT_EQ(ConsoleLogger::GlobalVerbosity(), ConsoleLogger::LogVerbosity::kDebug);
|
||||
|
||||
testing::internal::CaptureStderr();
|
||||
run_monitor();
|
||||
std::string output = testing::internal::GetCapturedStderr();
|
||||
@@ -28,6 +30,8 @@ TEST(Monitor, Logging) {
|
||||
run_monitor();
|
||||
output = testing::internal::GetCapturedStderr();
|
||||
ASSERT_EQ(output.size(), 0);
|
||||
|
||||
ConsoleLogger::Configure(Args{{"verbosity", "1"}});
|
||||
}
|
||||
} // namespace common
|
||||
} // namespace xgboost
|
||||
|
||||
Reference in New Issue
Block a user