Imported Upstream version 1.14.0
[platform/upstream/gtest.git] / googlemock / src / gmock_main.cc
index b411c5e..6b55412 100644 (file)
@@ -32,8 +32,9 @@
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
-#if GTEST_OS_ESP8266 || GTEST_OS_ESP32
-#if GTEST_OS_ESP8266
+#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \
+    (defined(GTEST_OS_NRF52) && defined(ARDUINO))
+#ifdef GTEST_OS_ESP8266
 extern "C" {
 #endif
 void setup() {
@@ -43,7 +44,7 @@ void setup() {
   testing::InitGoogleMock();
 }
 void loop() { RUN_ALL_TESTS(); }
-#if GTEST_OS_ESP8266
+#ifdef GTEST_OS_ESP8266
 }
 #endif
 
@@ -55,7 +56,7 @@ void loop() { RUN_ALL_TESTS(); }
 // Windows. See the following link to track the current status of this bug:
 // 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
+#ifdef GTEST_OS_WINDOWS_MOBILE
 #include <tchar.h>  // NOLINT
 
 GTEST_API_ int _tmain(int argc, TCHAR** argv) {