summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCopybara-Service <copybara-worker@google.com>2023-07-18 15:16:57 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-07-18 15:16:57 (GMT)
commitc541e7c11044b1e0303103ef8a47d7a9632c479b (patch)
treee5d8b04eb9a4ce220b9d62589bc666d95ff2591b
parentcc366710bbf40a9816d47c35802d06dbaccb8792 (diff)
parent091d7eb897d5671449efb348834e5c78d36f6459 (diff)
downloadgoogletest-c541e7c11044b1e0303103ef8a47d7a9632c479b.zip
googletest-c541e7c11044b1e0303103ef8a47d7a9632c479b.tar.gz
googletest-c541e7c11044b1e0303103ef8a47d7a9632c479b.tar.bz2
Merge pull request #4302 from ciband:feat/nrf52
PiperOrigin-RevId: 549006105 Change-Id: Ifbe2bf57e10df4c71e51dbfaf1687f4f621f5106
-rw-r--r--googlemock/src/gmock_main.cc3
-rw-r--r--googletest/include/gtest/internal/gtest-port-arch.h2
-rw-r--r--googletest/include/gtest/internal/gtest-port.h2
-rw-r--r--googletest/src/gtest-filepath.cc6
-rw-r--r--googletest/src/gtest_main.cc3
5 files changed, 11 insertions, 5 deletions
diff --git a/googlemock/src/gmock_main.cc b/googlemock/src/gmock_main.cc
index fb37b53..6b55412 100644
--- a/googlemock/src/gmock_main.cc
+++ b/googlemock/src/gmock_main.cc
@@ -32,7 +32,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32)
+#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \
+ (defined(GTEST_OS_NRF52) && defined(ARDUINO))
#ifdef GTEST_OS_ESP8266
extern "C" {
#endif
diff --git a/googletest/include/gtest/internal/gtest-port-arch.h b/googletest/include/gtest/internal/gtest-port-arch.h
index 3496493..3162f2b 100644
--- a/googletest/include/gtest/internal/gtest-port-arch.h
+++ b/googletest/include/gtest/internal/gtest-port-arch.h
@@ -115,6 +115,8 @@
#define GTEST_OS_QURT 1
#elif defined(CPU_QN9090) || defined(CPU_QN9090HN)
#define GTEST_OS_NXP_QN9090 1
+#elif defined(NRF52)
+#define GTEST_OS_NRF52 1
#endif // __CYGWIN__
#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 26e4cc3..514b1cc 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -506,7 +506,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || \
defined(GTEST_OS_ESP32) || defined(GTEST_OS_ESP8266) || \
defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT) || \
- defined(GTEST_OS_NXP_QN9090)))
+ defined(GTEST_OS_NXP_QN9090) || defined(GTEST_OS_NRF52)))
#define GTEST_HAS_STD_WSTRING 1
#else
#define GTEST_HAS_STD_WSTRING 0
diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc
index 1d30c95..513e947 100644
--- a/googletest/src/gtest-filepath.cc
+++ b/googletest/src/gtest-filepath.cc
@@ -102,7 +102,8 @@ FilePath FilePath::GetCurrentDir() {
#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \
defined(GTEST_OS_ESP32) || defined(GTEST_OS_XTENSA) || \
- defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090)
+ defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) || \
+ defined(GTEST_OS_NRF52)
// These platforms do not have a current directory, so we just return
// something reasonable.
return FilePath(kCurrentDirectoryString);
@@ -356,7 +357,8 @@ bool FilePath::CreateFolder() const {
#elif defined(GTEST_OS_WINDOWS)
int result = _mkdir(pathname_.c_str());
#elif defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
- defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090)
+ defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) || \
+ defined(GTEST_OS_NRF52)
// do nothing
int result = 0;
#else
diff --git a/googletest/src/gtest_main.cc b/googletest/src/gtest_main.cc
index c2e3b3c..8141caf 100644
--- a/googletest/src/gtest_main.cc
+++ b/googletest/src/gtest_main.cc
@@ -31,7 +31,8 @@
#include "gtest/gtest.h"
-#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32)
+#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \
+ (defined(GTEST_OS_NRF52) && defined(ARDUINO))
// Arduino-like platforms: program entry points are setup/loop instead of main.
#ifdef GTEST_OS_ESP8266