summaryrefslogtreecommitdiff
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 23:34:59 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 23:34:59 +0000
commit47ff745210c71ba79033fb69a7f832aa18b87977 (patch)
tree2ccb8a80d9d1ee12db0de85b03dc9e9ed957b25a /include/gtest/gtest.h
parentefa3f8463bbef22375de90ce020fb1e95a32fa7f (diff)
downloadgtest-47ff745210c71ba79033fb69a7f832aa18b87977.tar.gz
gtest-47ff745210c71ba79033fb69a7f832aa18b87977.tar.bz2
gtest-47ff745210c71ba79033fb69a7f832aa18b87977.tar.xz
Removes uses of GTEST_HAS_STD_STRING.
git-svn-id: http://googletest.googlecode.com/svn/trunk@353 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h29
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(