diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-12-16 23:34:59 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-12-16 23:34:59 (GMT) |
commit | 88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384 (patch) | |
tree | 2ccb8a80d9d1ee12db0de85b03dc9e9ed957b25a /include/gtest/gtest.h | |
parent | 075b76bb96f1b6eac7dde41b47de0dd456b0f473 (diff) | |
download | googletest-88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384.zip googletest-88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384.tar.gz googletest-88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384.tar.bz2 |
Removes uses of GTEST_HAS_STD_STRING.
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r-- | include/gtest/gtest.h | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h index c7df7f0..02d4c5e 100644 --- a/include/gtest/gtest.h +++ b/include/gtest/gtest.h @@ -62,24 +62,19 @@ #include <gtest/gtest-typed-test.h> // Depending on the platform, different string classes are available. -// On Windows, ::std::string compiles only when exceptions are -// enabled. On Linux, in addition to ::std::string, Google also makes -// use of class ::string, which has the same interface as -// ::std::string, but has a different implementation. -// -// The user can tell us whether ::std::string is available in his -// environment by defining the macro GTEST_HAS_STD_STRING to either 1 -// or 0 on the compiler command line. He can also define -// GTEST_HAS_GLOBAL_STRING to 1 to indicate that ::string is available -// AND is a distinct type to ::std::string, or define it to 0 to -// indicate otherwise. +// On Linux, in addition to ::std::string, Google also makes use of +// class ::string, which has the same interface as ::std::string, but +// has a different implementation. +// +// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that +// ::string is available AND is a distinct type to ::std::string, or +// define it to 0 to indicate otherwise. // // If the user's ::std::string and ::string are the same class due to -// aliasing, he should define GTEST_HAS_STD_STRING to 1 and -// GTEST_HAS_GLOBAL_STRING to 0. +// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0. // -// If the user doesn't define GTEST_HAS_STD_STRING and/or -// GTEST_HAS_GLOBAL_STRING, they are defined heuristically. +// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined +// heuristically. namespace testing { @@ -1210,11 +1205,9 @@ void InitGoogleTest(int* argc, wchar_t** argv); namespace internal { // These overloaded versions handle ::std::string and ::std::wstring. -#if GTEST_HAS_STD_STRING inline String FormatForFailureMessage(const ::std::string& str) { return (Message() << '"' << str << '"').GetString(); } -#endif // GTEST_HAS_STD_STRING #if GTEST_HAS_STD_WSTRING inline String FormatForFailureMessage(const ::std::wstring& wstr) { @@ -1464,14 +1457,12 @@ AssertionResult IsNotSubstring( AssertionResult IsNotSubstring( const char* needle_expr, const char* haystack_expr, const wchar_t* needle, const wchar_t* haystack); -#if GTEST_HAS_STD_STRING AssertionResult IsSubstring( const char* needle_expr, const char* haystack_expr, const ::std::string& needle, const ::std::string& haystack); AssertionResult IsNotSubstring( const char* needle_expr, const char* haystack_expr, const ::std::string& needle, const ::std::string& haystack); -#endif // GTEST_HAS_STD_STRING #if GTEST_HAS_STD_WSTRING AssertionResult IsSubstring( |