diff --git a/tests/cpp/test_learner.cc b/tests/cpp/test_learner.cc index a69fce19d900..7cd354fe92c2 100644 --- a/tests/cpp/test_learner.cc +++ b/tests/cpp/test_learner.cc @@ -46,7 +46,7 @@ TEST(Learner, ParameterValidation) { learner->Configure(); std::string output = testing::internal::GetCapturedStderr(); - ASSERT_TRUE(output.find("Parameters: { Knock Knock, Silence }") != std::string::npos); + ASSERT_TRUE(output.find(R"(Parameters: { "Knock Knock", "Silence" })") != std::string::npos); } TEST(Learner, CheckGroup) {