diff options
| author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-02-13 15:00:07 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-13 15:00:07 -0500 | 
| commit | 823f139bc7dba626545e5991ff3c49fad2dbd273 (patch) | |
| tree | ee0fe403f6c73e2be6247a178f929121f812b3c3 /googlemock/src | |
| parent | b3a1759eac70b26dc6f16562745c59030c6b927f (diff) | |
| parent | 38611c51215257df7cb533fdf983efbb95483afa (diff) | |
| download | googletest-823f139bc7dba626545e5991ff3c49fad2dbd273.tar.gz googletest-823f139bc7dba626545e5991ff3c49fad2dbd273.tar.bz2 googletest-823f139bc7dba626545e5991ff3c49fad2dbd273.zip  | |
Merge branch 'master' into fix-printers
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  | 
