diff options
author | Tanzinul Islam <t_17_7@hotmail.com> | 2018-04-01 13:43:57 +0100 |
---|---|---|
committer | Tanzinul Islam <t_17_7@hotmail.com> | 2018-04-01 13:43:57 +0100 |
commit | 5c7c365d5f3e5467de350f2e81a31407a3f52505 (patch) | |
tree | 475f7996651558fde1e45d7f37b62bc3b9aca272 /googlemock/src/gmock-internal-utils.cc | |
parent | 6d089311ca2a6fd83dff9ed68c1d3eb00c1443d0 (diff) | |
parent | 7888184f28509dba839e3683409443e0b5bb8948 (diff) | |
download | googletest-5c7c365d5f3e5467de350f2e81a31407a3f52505.tar.gz googletest-5c7c365d5f3e5467de350f2e81a31407a3f52505.tar.bz2 googletest-5c7c365d5f3e5467de350f2e81a31407a3f52505.zip |
Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116
Diffstat (limited to 'googlemock/src/gmock-internal-utils.cc')
-rw-r--r-- | googlemock/src/gmock-internal-utils.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 658fa62d..20c5a8db 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -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 |