mirror of
https://github.com/google/googletest.git
synced 2024-12-27 10:11:03 +08:00
add support for nrf52
Added support for Nordic nRF52 series of MCUs
This commit is contained in:
parent
372e81d814
commit
091d7eb897
@ -32,7 +32,7 @@
|
|||||||
#include "gmock/gmock.h"
|
#include "gmock/gmock.h"
|
||||||
#include "gtest/gtest.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
|
#ifdef GTEST_OS_ESP8266
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -115,6 +115,8 @@
|
|||||||
#define GTEST_OS_QURT 1
|
#define GTEST_OS_QURT 1
|
||||||
#elif defined(CPU_QN9090) || defined(CPU_QN9090HN)
|
#elif defined(CPU_QN9090) || defined(CPU_QN9090HN)
|
||||||
#define GTEST_OS_NXP_QN9090 1
|
#define GTEST_OS_NXP_QN9090 1
|
||||||
|
#elif defined(NRF52)
|
||||||
|
#define GTEST_OS_NRF52 1
|
||||||
#endif // __CYGWIN__
|
#endif // __CYGWIN__
|
||||||
|
|
||||||
#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
|
#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
|
||||||
|
@ -506,7 +506,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
|||||||
defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || \
|
defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || \
|
||||||
defined(GTEST_OS_ESP32) || defined(GTEST_OS_ESP8266) || \
|
defined(GTEST_OS_ESP32) || defined(GTEST_OS_ESP8266) || \
|
||||||
defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT) || \
|
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
|
#define GTEST_HAS_STD_WSTRING 1
|
||||||
#else
|
#else
|
||||||
#define GTEST_HAS_STD_WSTRING 0
|
#define GTEST_HAS_STD_WSTRING 0
|
||||||
|
@ -102,7 +102,8 @@ FilePath FilePath::GetCurrentDir() {
|
|||||||
#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
|
#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
|
||||||
defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \
|
defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \
|
||||||
defined(GTEST_OS_ESP32) || defined(GTEST_OS_XTENSA) || \
|
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
|
// These platforms do not have a current directory, so we just return
|
||||||
// something reasonable.
|
// something reasonable.
|
||||||
return FilePath(kCurrentDirectoryString);
|
return FilePath(kCurrentDirectoryString);
|
||||||
@ -356,7 +357,8 @@ bool FilePath::CreateFolder() const {
|
|||||||
#elif defined(GTEST_OS_WINDOWS)
|
#elif defined(GTEST_OS_WINDOWS)
|
||||||
int result = _mkdir(pathname_.c_str());
|
int result = _mkdir(pathname_.c_str());
|
||||||
#elif defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
|
#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
|
// do nothing
|
||||||
int result = 0;
|
int result = 0;
|
||||||
#else
|
#else
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "gtest/gtest.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))
|
||||||
// Arduino-like platforms: program entry points are setup/loop instead of main.
|
// Arduino-like platforms: program entry points are setup/loop instead of main.
|
||||||
|
|
||||||
#ifdef GTEST_OS_ESP8266
|
#ifdef GTEST_OS_ESP8266
|
||||||
|
Loading…
x
Reference in New Issue
Block a user