summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest-matchers.cc55
-rw-r--r--googletest/src/gtest-port.cc7
-rw-r--r--googletest/src/gtest-printers.cc18
-rw-r--r--googletest/src/gtest.cc13
4 files changed, 2 insertions, 91 deletions
diff --git a/googletest/src/gtest-matchers.cc b/googletest/src/gtest-matchers.cc
index de275d36..7d2fb685 100644
--- a/googletest/src/gtest-matchers.cc
+++ b/googletest/src/gtest-matchers.cc
@@ -44,14 +44,6 @@ namespace testing {
// equal to s.
Matcher<const std::string&>::Matcher(const std::string& s) { *this = Eq(s); }
-#if GTEST_HAS_GLOBAL_STRING
-// Constructs a matcher that matches a const std::string& whose value is
-// equal to s.
-Matcher<const std::string&>::Matcher(const ::string& s) {
- *this = Eq(static_cast<std::string>(s));
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
// Constructs a matcher that matches a const std::string& whose value is
// equal to s.
Matcher<const std::string&>::Matcher(const char* s) {
@@ -62,45 +54,10 @@ Matcher<const std::string&>::Matcher(const char* s) {
// s.
Matcher<std::string>::Matcher(const std::string& s) { *this = Eq(s); }
-#if GTEST_HAS_GLOBAL_STRING
-// Constructs a matcher that matches a std::string whose value is equal to
-// s.
-Matcher<std::string>::Matcher(const ::string& s) {
- *this = Eq(static_cast<std::string>(s));
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
// Constructs a matcher that matches a std::string whose value is equal to
// s.
Matcher<std::string>::Matcher(const char* s) { *this = Eq(std::string(s)); }
-#if GTEST_HAS_GLOBAL_STRING
-// Constructs a matcher that matches a const ::string& whose value is
-// equal to s.
-Matcher<const ::string&>::Matcher(const std::string& s) {
- *this = Eq(static_cast<::string>(s));
-}
-
-// Constructs a matcher that matches a const ::string& whose value is
-// equal to s.
-Matcher<const ::string&>::Matcher(const ::string& s) { *this = Eq(s); }
-
-// Constructs a matcher that matches a const ::string& whose value is
-// equal to s.
-Matcher<const ::string&>::Matcher(const char* s) { *this = Eq(::string(s)); }
-
-// Constructs a matcher that matches a ::string whose value is equal to s.
-Matcher<::string>::Matcher(const std::string& s) {
- *this = Eq(static_cast<::string>(s));
-}
-
-// Constructs a matcher that matches a ::string whose value is equal to s.
-Matcher<::string>::Matcher(const ::string& s) { *this = Eq(s); }
-
-// Constructs a matcher that matches a string whose value is equal to s.
-Matcher<::string>::Matcher(const char* s) { *this = Eq(::string(s)); }
-#endif // GTEST_HAS_GLOBAL_STRING
-
#if GTEST_HAS_ABSL
// Constructs a matcher that matches a const absl::string_view& whose value is
// equal to s.
@@ -108,12 +65,6 @@ Matcher<const absl::string_view&>::Matcher(const std::string& s) {
*this = Eq(s);
}
-#if GTEST_HAS_GLOBAL_STRING
-// Constructs a matcher that matches a const absl::string_view& whose value is
-// equal to s.
-Matcher<const absl::string_view&>::Matcher(const ::string& s) { *this = Eq(s); }
-#endif // GTEST_HAS_GLOBAL_STRING
-
// Constructs a matcher that matches a const absl::string_view& whose value is
// equal to s.
Matcher<const absl::string_view&>::Matcher(const char* s) {
@@ -130,12 +81,6 @@ Matcher<const absl::string_view&>::Matcher(absl::string_view s) {
// s.
Matcher<absl::string_view>::Matcher(const std::string& s) { *this = Eq(s); }
-#if GTEST_HAS_GLOBAL_STRING
-// Constructs a matcher that matches a absl::string_view whose value is equal to
-// s.
-Matcher<absl::string_view>::Matcher(const ::string& s) { *this = Eq(s); }
-#endif // GTEST_HAS_GLOBAL_STRING
-
// Constructs a matcher that matches a absl::string_view whose value is equal to
// s.
Matcher<absl::string_view>::Matcher(const char* s) {
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc
index 587ca0a5..8f7cd1c0 100644
--- a/googletest/src/gtest-port.cc
+++ b/googletest/src/gtest-port.cc
@@ -1247,13 +1247,6 @@ void SetInjectableArgvs(const std::vector<std::string>& new_argvs) {
new std::vector<std::string>(new_argvs.begin(), new_argvs.end()));
}
-#if GTEST_HAS_GLOBAL_STRING
-void SetInjectableArgvs(const std::vector< ::string>& new_argvs) {
- SetInjectableArgvs(
- new std::vector<std::string>(new_argvs.begin(), new_argvs.end()));
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
void ClearInjectableArgvs() {
delete g_injected_test_argvs;
g_injected_test_argvs = nullptr;
diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index f0e8e571..5325ef23 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -419,17 +419,6 @@ void ConditionalPrintAsText(const char* str, size_t length, ostream* os) {
} // anonymous namespace
-// Prints a ::string object.
-#if GTEST_HAS_GLOBAL_STRING
-void PrintStringTo(const ::string& s, ostream* os) {
- if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
- if (GTEST_FLAG(print_utf8)) {
- ConditionalPrintAsText(s.data(), s.size(), os);
- }
- }
-}
-#endif // GTEST_HAS_GLOBAL_STRING
-
void PrintStringTo(const ::std::string& s, ostream* os) {
if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
if (GTEST_FLAG(print_utf8)) {
@@ -438,13 +427,6 @@ void PrintStringTo(const ::std::string& s, ostream* os) {
}
}
-// Prints a ::wstring object.
-#if GTEST_HAS_GLOBAL_WSTRING
-void PrintWideStringTo(const ::wstring& s, ostream* os) {
- PrintCharsAsStringTo(s.data(), s.size(), os);
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
#if GTEST_HAS_STD_WSTRING
void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
PrintCharsAsStringTo(s.data(), s.size(), os);
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 0a048603..37cedfb3 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -922,7 +922,7 @@ bool String::CStringEquals(const char * lhs, const char * rhs) {
return strcmp(lhs, rhs) == 0;
}
-#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
+#if GTEST_HAS_STD_WSTRING
// Converts an array of wide chars to a narrow string using the UTF-8
// encoding, and streams the result to the given Message object.
@@ -940,7 +940,7 @@ static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,
}
}
-#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
+#endif // GTEST_HAS_STD_WSTRING
void SplitString(const ::std::string& str, char delimiter,
::std::vector< ::std::string>* dest) {
@@ -990,15 +990,6 @@ Message& Message::operator <<(const ::std::wstring& wstr) {
}
#endif // GTEST_HAS_STD_WSTRING
-#if GTEST_HAS_GLOBAL_WSTRING
-// Converts the given wide string to a narrow string using the UTF-8
-// encoding, and streams the result to this Message object.
-Message& Message::operator <<(const ::wstring& wstr) {
- internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);
- return *this;
-}
-#endif // GTEST_HAS_GLOBAL_WSTRING
-
// Gets the text streamed to this object so far as an std::string.
// Each '\0' character in the buffer is replaced with "\\0".
std::string Message::GetString() const {
OpenPOWER on IntegriCloud