summaryrefslogtreecommitdiffstats
path: root/googlemock/src/gmock-matchers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock/src/gmock-matchers.cc')
-rw-r--r--googlemock/src/gmock-matchers.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/googlemock/src/gmock-matchers.cc b/googlemock/src/gmock-matchers.cc
index dded437..873527b 100644
--- a/googlemock/src/gmock-matchers.cc
+++ b/googlemock/src/gmock-matchers.cc
@@ -36,9 +36,11 @@
#include "gmock/gmock-matchers.h"
#include <string.h>
+
#include <iostream>
#include <sstream>
#include <string>
+#include <vector>
namespace testing {
namespace internal {
@@ -48,11 +50,13 @@ namespace internal {
// 'negation' is false; otherwise returns the description of the
// negation of the matcher. 'param_values' contains a list of strings
// that are the print-out of the matcher's parameters.
-GTEST_API_ std::string FormatMatcherDescription(bool negation,
- const char* matcher_name,
- const Strings& param_values) {
+GTEST_API_ std::string FormatMatcherDescription(
+ bool negation, const char* matcher_name,
+ const std::vector<const char*>& param_names, const Strings& param_values) {
std::string result = ConvertIdentifierNameToWords(matcher_name);
- if (param_values.size() >= 1) result += " " + JoinAsTuple(param_values);
+ if (param_values.size() >= 1) {
+ result += " " + JoinAsKeyValueTuple(param_names, param_values);
+ }
return negation ? "not (" + result + ")" : result;
}