aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorChris <chrisjohnsonmail@gmail.com>2019-10-13 21:39:54 -0500
committerChris <chrisjohnsonmail@gmail.com>2019-10-13 21:39:54 -0500
commit778733f9ecdd2b14a0167df54dd25d2d6f6e24f6 (patch)
tree6bc53d159525957ead5df15a2adc1e3b7bfd9e53 /googlemock
parentba513d2c9525a7c986c115ed5d603f2cf17c6016 (diff)
parent84a5ae8b85605fd51cf3d0107315670d3cf00fa4 (diff)
downloadgoogletest-778733f9ecdd2b14a0167df54dd25d2d6f6e24f6.tar.gz
googletest-778733f9ecdd2b14a0167df54dd25d2d6f6e24f6.tar.bz2
googletest-778733f9ecdd2b14a0167df54dd25d2d6f6e24f6.zip
feat: Add ESP8266 support
* Added support for ESP8266 * Removed previous Arduino defines in favor of GTEST_OS_* syntax * Improved PlatformIO library file to be more stable when consumed in client applications.
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/src/gmock_main.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/googlemock/src/gmock_main.cc b/googlemock/src/gmock_main.cc
index 98611b93..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"
-#ifdef ARDUINO
+#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