From 40a6b9662199890b20ccbac3b964ce04713d8ede Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Wed, 28 Aug 2019 09:39:35 -0500 Subject: feat: Add support for ESP8266 platform Added support for ESP8266 Arduino platform. Refactored Arduino defines to use the GTEST_OS_* model. --- googlemock/src/gmock_main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'googlemock') diff --git a/googlemock/src/gmock_main.cc b/googlemock/src/gmock_main.cc index 98611b93..4d4f48b7 100644 --- a/googlemock/src/gmock_main.cc +++ b/googlemock/src/gmock_main.cc @@ -32,7 +32,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#ifdef ARDUINO +#if defined GTEST_OS_ESP8266 || defined GTEST_OS_ESP32 void setup() { // Since Google Mock depends on Google Test, InitGoogleMock() is // also responsible for initializing Google Test. Therefore there's -- cgit v1.2.3 From c2206b05aa0f2fbdf5b353b32cd565b0e89d3fa6 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Thu, 29 Aug 2019 12:34:26 -0500 Subject: Add ESP8266 configs to PlatformIO build Added various conditional compliations for ESP8266 to stub out missing functionality. --- googlemock/src/gmock_main.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'googlemock') diff --git a/googlemock/src/gmock_main.cc b/googlemock/src/gmock_main.cc index 4d4f48b7..16f97b0a 100644 --- a/googlemock/src/gmock_main.cc +++ b/googlemock/src/gmock_main.cc @@ -32,7 +32,10 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#if defined GTEST_OS_ESP8266 || defined GTEST_OS_ESP32 +#if GTEST_OS_ESP8266 || GTEST_OS_ESP32 +# if GTEST_OS_ESP8266 +extern "C" { +# endif void setup() { // Since Google Mock depends on Google Test, InitGoogleMock() is // also responsible for initializing Google Test. Therefore there's @@ -40,6 +43,10 @@ void setup() { testing::InitGoogleMock(); } void loop() { RUN_ALL_TESTS(); } +# if GTEST_OS_ESP8266 +} +# endif + #else // MS C++ compiler/linker has a bug on Windows (not on Windows CE), which -- cgit v1.2.3