Fixes Cygwin compatibility (by Vlad Losev); Improves Python tests (by Vlad Losev); Fixes ambiguous call to implicit_cast; Uses gtest's SkipPrefix() instead gmock's own (by Vlad Losev).

This commit is contained in:
zhanyong.wan
2009-12-01 19:42:25 +00:00
parent 19eb9e9e3d
commit f6d6a22b8e
7 changed files with 27 additions and 25 deletions

View File

@@ -83,18 +83,6 @@ int GetParamIndex(const char* param_names[], const string& param_name) {
return kInvalidInterpolation;
}
// If *pstr starts with the given prefix, modifies *pstr to be right
// past the prefix and returns true; otherwise leaves *pstr unchanged
// and returns false. None of pstr, *pstr, and prefix can be NULL.
bool SkipPrefix(const char* prefix, const char** pstr) {
const size_t prefix_len = strlen(prefix);
if (strncmp(*pstr, prefix, prefix_len) == 0) {
*pstr += prefix_len;
return true;
}
return false;
}
// Helper function used by ValidateMatcherDescription() to format
// error messages.
string FormatMatcherDescriptionSyntaxError(const char* description,