diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index 05e0b239..c78623a4 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -67,43 +67,7 @@ using ::testing::internal::UnitTestOptions; // EXPECT_THAT() and the matchers know how to print tuples. template ::std::string PrintValue(const T& value) { - ::std::stringstream stream; - stream << value; - return stream.str(); -} - -// These overloads allow printing tuples in our tests. We cannot -// define an operator<< for tuples, as that definition needs to be in -// the std namespace in order to be picked up by Google Test via -// Argument-Dependent Lookup, yet defining anything in the std -// namespace in non-STL code is undefined behavior. - -template -::std::string PrintValue(const std::tuple& value) { - ::std::stringstream stream; - stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ")"; - return stream.str(); -} - -template -::std::string PrintValue(const std::tuple& value) { - ::std::stringstream stream; - stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", " - << std::get<2>(value) << ")"; - return stream.str(); -} - -template -::std::string PrintValue( - const std::tuple& value) { - ::std::stringstream stream; - stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", " - << std::get<2>(value) << ", " << std::get<3>(value) << ", " - << std::get<4>(value) << ", " << std::get<5>(value) << ", " - << std::get<6>(value) << ", " << std::get<7>(value) << ", " - << std::get<8>(value) << ", " << std::get<9>(value) << ")"; - return stream.str(); + return testing::PrintToString(value); } // Verifies that a sequence generated by the generator and accessed