Skip to content

Commit

Permalink
Merge pull request google#4302 from ciband:feat/nrf52
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 549006105
Change-Id: Ifbe2bf57e10df4c71e51dbfaf1687f4f621f5106
  • Loading branch information
copybara-github committed Jul 18, 2023
2 parents cc36671 + 091d7eb commit c541e7c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion googlemock/src/gmock_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions googletest/include/gtest/internal/gtest-port-arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
2 changes: 1 addition & 1 deletion googletest/include/gtest/internal/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions googletest/src/gtest-filepath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion googletest/src/gtest_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c541e7c

Please sign in to comment.