mirror of
https://github.com/google/googletest.git
synced 2024-12-28 19:15:24 +08:00
Internal Code Change
PiperOrigin-RevId: 513770561 Change-Id: I82fbed177c6ba4e2e5b776ae3e0255c868e32e25
This commit is contained in:
parent
2d4f208765
commit
cead3d57c9
@ -87,7 +87,7 @@ GTEST_API_ std::string ConvertIdentifierNameToWords(const char* id_name) {
|
|||||||
(!IsDigit(prev_char) && IsDigit(*p));
|
(!IsDigit(prev_char) && IsDigit(*p));
|
||||||
|
|
||||||
if (IsAlNum(*p)) {
|
if (IsAlNum(*p)) {
|
||||||
if (starts_new_word && result != "") result += ' ';
|
if (starts_new_word && !result.empty()) result += ' ';
|
||||||
result += ToLower(*p);
|
result += ToLower(*p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ GTEST_API_ std::string FormatMatcherDescription(
|
|||||||
bool negation, const char* matcher_name,
|
bool negation, const char* matcher_name,
|
||||||
const std::vector<const char*>& param_names, const Strings& param_values) {
|
const std::vector<const char*>& param_names, const Strings& param_values) {
|
||||||
std::string result = ConvertIdentifierNameToWords(matcher_name);
|
std::string result = ConvertIdentifierNameToWords(matcher_name);
|
||||||
if (param_values.size() >= 1) {
|
if (!param_values.empty()) {
|
||||||
result += " " + JoinAsKeyValueTuple(param_names, param_values);
|
result += " " + JoinAsKeyValueTuple(param_names, param_values);
|
||||||
}
|
}
|
||||||
return negation ? "not (" + result + ")" : result;
|
return negation ? "not (" + result + ")" : result;
|
||||||
|
@ -503,7 +503,7 @@ class MockObjectRegistry {
|
|||||||
std::cout << internal::FormatFileLocation(state.first_used_file,
|
std::cout << internal::FormatFileLocation(state.first_used_file,
|
||||||
state.first_used_line);
|
state.first_used_line);
|
||||||
std::cout << " ERROR: this mock object";
|
std::cout << " ERROR: this mock object";
|
||||||
if (state.first_used_test != "") {
|
if (!state.first_used_test.empty()) {
|
||||||
std::cout << " (used in test " << state.first_used_test_suite << "."
|
std::cout << " (used in test " << state.first_used_test_suite << "."
|
||||||
<< state.first_used_test << ")";
|
<< state.first_used_test << ")";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user