summaryrefslogtreecommitdiffstats
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-07-21 22:15:17 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-07-21 22:15:17 (GMT)
commite2a7f03b80fc0e9e6a6f36acb43776509486a6d4 (patch)
tree650c7033b14cd54fa03d46100e314ef141a3f492 /include/gtest/gtest.h
parent447ed6474deca82844b211e57503579ab1c560f0 (diff)
downloadgoogletest-e2a7f03b80fc0e9e6a6f36acb43776509486a6d4.zip
googletest-e2a7f03b80fc0e9e6a6f36acb43776509486a6d4.tar.gz
googletest-e2a7f03b80fc0e9e6a6f36acb43776509486a6d4.tar.bz2
Allows EXPECT_EQ to accept arguments that don't have operator << (by Zhanyong Wan).
Allows a user to customize how the universal printer prints a pointer of a specific type by overloading << (by Zhanyong Wan). Works around a bug in Cymbian's C++ compiler (by Vlad Losev).
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h
index 867f2a7..90dde38 100644
--- a/include/gtest/gtest.h
+++ b/include/gtest/gtest.h
@@ -1207,30 +1207,6 @@ GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);
namespace internal {
-// These overloaded versions handle ::std::string and ::std::wstring.
-GTEST_API_ inline String FormatForFailureMessage(const ::std::string& str) {
- return (Message() << '"' << str << '"').GetString();
-}
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ inline String FormatForFailureMessage(const ::std::wstring& wstr) {
- return (Message() << "L\"" << wstr << '"').GetString();
-}
-#endif // GTEST_HAS_STD_WSTRING
-
-// These overloaded versions handle ::string and ::wstring.
-#if GTEST_HAS_GLOBAL_STRING
-GTEST_API_ inline String FormatForFailureMessage(const ::string& str) {
- return (Message() << '"' << str << '"').GetString();
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
-#if GTEST_HAS_GLOBAL_WSTRING
-GTEST_API_ inline String FormatForFailureMessage(const ::wstring& wstr) {
- return (Message() << "L\"" << wstr << '"').GetString();
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
// operand to be used in a failure message. The type (but not value)
// of the other operand may affect the format. This allows us to
@@ -1246,7 +1222,7 @@ GTEST_API_ inline String FormatForFailureMessage(const ::wstring& wstr) {
template <typename T1, typename T2>
String FormatForComparisonFailureMessage(const T1& value,
const T2& /* other_operand */) {
- return FormatForFailureMessage(value);
+ return PrintToString(value);
}
// The helper function for {ASSERT|EXPECT}_EQ.