diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-06-18 14:23:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-06-19 13:02:21 +0300 |
commit | 8c3dd6d83df467f3b8e53b6c97545eabf07768be (patch) | |
tree | 1ec635e9cea07b23f0774d2ababa5c0a4ffbce57 /extern/gmock/src/gmock_main.cc | |
parent | 0f78a579047ec8946021ca58b8ee48f7486e6605 (diff) |
Upgrade Google libraries
Upgrades Glog from 0.3.5 to 0.4.0, and Gtest from 0.8.0 to 0.10.0.
Hopefully this will solve compilation error on MSVC with C++17.
Diffstat (limited to 'extern/gmock/src/gmock_main.cc')
-rw-r--r-- | extern/gmock/src/gmock_main.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/extern/gmock/src/gmock_main.cc b/extern/gmock/src/gmock_main.cc index bd5be03be22..98611b93535 100644 --- a/extern/gmock/src/gmock_main.cc +++ b/extern/gmock/src/gmock_main.cc @@ -26,18 +26,28 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include <iostream> #include "gmock/gmock.h" #include "gtest/gtest.h" +#ifdef ARDUINO +void setup() { + // 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(); +} +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 // Windows. See the following link to track the current status of this bug: -// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT +// https://web.archive.org/web/20170912203238/connect.microsoft.com/VisualStudio/feedback/details/394464/wmain-link-error-in-the-static-library +// // NOLINT #if GTEST_OS_WINDOWS_MOBILE # include <tchar.h> // NOLINT @@ -52,3 +62,4 @@ GTEST_API_ int main(int argc, char** argv) { testing::InitGoogleMock(&argc, argv); return RUN_ALL_TESTS(); } +#endif |