mirror of
https://github.com/google/googletest.git
synced 2025-01-14 08:27:56 +08:00
merges-2
This commit is contained in:
parent
a518bd5cf2
commit
dbf63e38a4
@ -70,8 +70,8 @@ GTEST_API_ std::string JoinAsTuple(const Strings& fields) {
|
||||
// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
|
||||
// treated as one word. For example, both "FooBar123" and
|
||||
// "foo_bar_123" are converted to "foo bar 123".
|
||||
GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name) {
|
||||
string result;
|
||||
GTEST_API_ std::string ConvertIdentifierNameToWords(const char* id_name) {
|
||||
std::string result;
|
||||
char prev_char = '\0';
|
||||
for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) {
|
||||
// We don't care about the current locale as the input is
|
||||
@ -188,5 +188,15 @@ GTEST_API_ void Log(LogSeverity severity, const std::string& message,
|
||||
std::cout << ::std::flush;
|
||||
}
|
||||
|
||||
void IllegalDoDefault(const char* file, int line) {
|
||||
internal::Assert(
|
||||
false, file, line,
|
||||
"You are using DoDefault() inside a composite action like "
|
||||
"DoAll() or WithArgs(). This is not supported for technical "
|
||||
"reasons. Please instead spell out the default action, or "
|
||||
"assign the default action to an Action variable and use "
|
||||
"the variable in various places.");
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace testing
|
||||
|
@ -136,8 +136,8 @@ static bool ParseGoogleMockIntFlag(const char* str, const char* flag,
|
||||
if (value_str == NULL) return false;
|
||||
|
||||
// Sets *value to the value of the flag.
|
||||
*value = atoi(value_str);
|
||||
return true;
|
||||
return ParseInt32(Message() << "The value of flag --" << flag,
|
||||
value_str, value);
|
||||
}
|
||||
|
||||
// The internal implementation of InitGoogleMock().
|
||||
|
Loading…
x
Reference in New Issue
Block a user