diff options
author | Gennadiy Civil <misterg@google.com> | 2018-02-12 16:42:12 -0500 |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-02-12 16:42:12 -0500 |
commit | 225e6741acfaa38375589dafcc84254a92313dac (patch) | |
tree | f34e07e2970e08d06e5efcc993198ad844c19c19 /googlemock/src | |
parent | b94ba27d4471070732b8722afafb38d6d0df9cea (diff) | |
download | googletest-225e6741acfaa38375589dafcc84254a92313dac.tar.gz googletest-225e6741acfaa38375589dafcc84254a92313dac.tar.bz2 googletest-225e6741acfaa38375589dafcc84254a92313dac.zip |
moving JoinAsTuple to internal
Diffstat (limited to 'googlemock/src')
-rw-r--r-- | googlemock/src/gmock-internal-utils.cc | 19 | ||||
-rw-r--r-- | googlemock/src/gmock-matchers.cc | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 91bf3fd9..658fa62d 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -47,6 +47,25 @@ namespace testing { namespace internal { +// Joins a vector of strings as if they are fields of a tuple; returns +// the joined string. +GTEST_API_ std::string JoinAsTuple(const Strings& fields) { + switch (fields.size()) { + case 0: + return ""; + case 1: + return fields[0]; + default: + std::string result = "(" + fields[0]; + for (size_t i = 1; i < fields.size(); i++) { + result += ", "; + result += fields[i]; + } + result += ")"; + return result; + } +} + // Converts an identifier name to a space-separated list of lower-case // words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is // treated as one word. For example, both "FooBar123" and diff --git a/googlemock/src/gmock-matchers.cc b/googlemock/src/gmock-matchers.cc index 6e40e5e8..f37d5c2d 100644 --- a/googlemock/src/gmock-matchers.cc +++ b/googlemock/src/gmock-matchers.cc @@ -100,25 +100,6 @@ Matcher<StringPiece>::Matcher(StringPiece s) { namespace internal { -// Joins a vector of strings as if they are fields of a tuple; returns -// the joined string. -GTEST_API_ string JoinAsTuple(const Strings& fields) { - switch (fields.size()) { - case 0: - return ""; - case 1: - return fields[0]; - default: - string result = "(" + fields[0]; - for (size_t i = 1; i < fields.size(); i++) { - result += ", "; - result += fields[i]; - } - result += ")"; - return result; - } -} - // Returns the description for a matcher defined using the MATCHER*() // macro where the user-supplied description string is "", if // 'negation' is false; otherwise returns the description of the |