diff options
Diffstat (limited to 'googlemock/src')
-rw-r--r-- | googlemock/src/gmock-spec-builders.cc | 2 | ||||
-rw-r--r-- | googlemock/src/gmock_main.cc | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index e832966f..5db774ed 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -291,7 +291,7 @@ void ReportUninterestingCall(CallReaction reaction, const std::string& msg) { "call should not happen. Do not suppress it by blindly adding " "an EXPECT_CALL() if you don't mean to enforce the call. " "See " - "https://github.com/abseil/googletest/blob/master/googlemock/" + "https://github.com/google/googletest/blob/master/googlemock/" "docs/CookBook.md#" "knowing-when-to-expect for details.\n", stack_frames_to_skip); diff --git a/googlemock/src/gmock_main.cc b/googlemock/src/gmock_main.cc index a3a271e6..db35bc37 100644 --- a/googlemock/src/gmock_main.cc +++ b/googlemock/src/gmock_main.cc @@ -32,6 +32,22 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" +#ifdef ARDUINO +void setup() { + // Since Arduino doesn't have a command line, fake out the argc/argv arguments + int argc = 1; + const auto arg0 = "PlatformIO"; + char* argv0 = const_cast<char*>(arg0); + char** argv = &argv0; + + // Since Google Mock depends on Google Test, InitGoogleMock() is + // also responsible for initializing Google Test. Therefore there's + // no need for calling testing::InitGoogleTest() separately. + testing::InitGoogleMock(&argc, argv); +} +void loop() { RUN_ALL_TESTS(); } +#else + // MS C++ compiler/linker has a bug on Windows (not on Windows CE), which // causes a link error when _tmain is defined in a static library and UNICODE // is enabled. For this reason instead of _tmain, main function is used on @@ -52,3 +68,4 @@ GTEST_API_ int main(int argc, char** argv) { testing::InitGoogleMock(&argc, argv); return RUN_ALL_TESTS(); } +#endif |