diff options
author | misterg <misterg@google.com> | 2018-10-11 18:40:25 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-11 20:15:32 (GMT) |
commit | 864b6c2d35db5c2c8ca4a4bad66e295a64f47011 (patch) | |
tree | 788fed56bbef8c57b295022b93efe0e10c9ef4fd /googletest/test | |
parent | b3b19a796cbb3222fb3a49daf3f0a9378e8505ad (diff) | |
download | googletest-864b6c2d35db5c2c8ca4a4bad66e295a64f47011.zip googletest-864b6c2d35db5c2c8ca4a4bad66e295a64f47011.tar.gz googletest-864b6c2d35db5c2c8ca4a4bad66e295a64f47011.tar.bz2 |
Remove duplicate functionality PrintValue (in googletest-param-test-test.cc), use testing::PrintToString
PiperOrigin-RevId: 216733373
Diffstat (limited to 'googletest/test')
-rw-r--r-- | googletest/test/googletest-param-test-test.cc | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index 05e0b23..c78623a 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 <typename T> ::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 <typename T1, typename T2> -::std::string PrintValue(const std::tuple<T1, T2>& value) { - ::std::stringstream stream; - stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ")"; - return stream.str(); -} - -template <typename T1, typename T2, typename T3> -::std::string PrintValue(const std::tuple<T1, T2, T3>& value) { - ::std::stringstream stream; - stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", " - << std::get<2>(value) << ")"; - return stream.str(); -} - -template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10> -::std::string PrintValue( - const std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& 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 |