Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
40a6b966
Commit
40a6b966
authored
Aug 28, 2019
by
Chris Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Add support for ESP8266 platform
Added support for ESP8266 Arduino platform. Refactored Arduino defines to use the GTEST_OS_* model.
parent
ba513d2c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
3 deletions
+9
-3
gmock_main.cc
googlemock/src/gmock_main.cc
+1
-1
gtest-port-arch.h
googletest/include/gtest/internal/gtest-port-arch.h
+4
-0
gtest-filepath.cc
googletest/src/gtest-filepath.cc
+1
-1
gtest.cc
googletest/src/gtest.cc
+2
-0
gtest_main.cc
googletest/src/gtest_main.cc
+1
-1
No files found.
googlemock/src/gmock_main.cc
View file @
40a6b966
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "gmock/gmock.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#if
def ARDUINO
#if
defined GTEST_OS_ESP8266 || defined GTEST_OS_ESP32
void
setup
()
{
void
setup
()
{
// Since Google Mock depends on Google Test, InitGoogleMock() is
// Since Google Mock depends on Google Test, InitGoogleMock() is
// also responsible for initializing Google Test. Therefore there's
// also responsible for initializing Google Test. Therefore there's
...
...
googletest/include/gtest/internal/gtest-port-arch.h
View file @
40a6b966
...
@@ -102,6 +102,10 @@
...
@@ -102,6 +102,10 @@
# define GTEST_OS_QNX 1
# define GTEST_OS_QNX 1
#elif defined(__HAIKU__)
#elif defined(__HAIKU__)
#define GTEST_OS_HAIKU 1
#define GTEST_OS_HAIKU 1
#elif defined ESP8266
# define GTEST_OS_ESP8266 1
#elif defined ESP32
# define GTEST_OS_ESP32 1
#endif // __CYGWIN__
#endif // __CYGWIN__
#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
googletest/src/gtest-filepath.cc
View file @
40a6b966
...
@@ -93,7 +93,7 @@ static bool IsPathSeparator(char c) {
...
@@ -93,7 +93,7 @@ static bool IsPathSeparator(char c) {
// Returns the current working directory, or "" if unsuccessful.
// Returns the current working directory, or "" if unsuccessful.
FilePath
FilePath
::
GetCurrentDir
()
{
FilePath
FilePath
::
GetCurrentDir
()
{
#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \
#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \
GTEST_OS_WINDOWS_RT ||
ARDUINO || defined(ESP_PLATFORM)
GTEST_OS_WINDOWS_RT ||
GTEST_OS_ESP8266 || GTEST_OS_ESP32
// 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
);
...
...
googletest/src/gtest.cc
View file @
40a6b966
...
@@ -4508,6 +4508,7 @@ class ScopedPrematureExitFile {
...
@@ -4508,6 +4508,7 @@ class ScopedPrematureExitFile {
}
}
~
ScopedPrematureExitFile
()
{
~
ScopedPrematureExitFile
()
{
#if !defined GTEST_OS_ESP8266
if
(
!
premature_exit_filepath_
.
empty
())
{
if
(
!
premature_exit_filepath_
.
empty
())
{
int
retval
=
remove
(
premature_exit_filepath_
.
c_str
());
int
retval
=
remove
(
premature_exit_filepath_
.
c_str
());
if
(
retval
)
{
if
(
retval
)
{
...
@@ -4516,6 +4517,7 @@ class ScopedPrematureExitFile {
...
@@ -4516,6 +4517,7 @@ class ScopedPrematureExitFile {
<<
retval
;
<<
retval
;
}
}
}
}
#endif
}
}
private
:
private
:
...
...
googletest/src/gtest_main.cc
View file @
40a6b966
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include <cstdio>
#include <cstdio>
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#if
def ARDUINO
#if
defined GTEST_OS_ESP8266 || defined GTEST_OS_ESP32
void
setup
()
{
void
setup
()
{
testing
::
InitGoogleTest
();
testing
::
InitGoogleTest
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment