Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
bf07131c
Commit
bf07131c
authored
Jan 23, 2019
by
Gennadiy Civil
Browse files
Merge pull request #2041 from ciband:chore/fix_library_json
PiperOrigin-RevId: 230554814
parents
fdc59ffd
45c58aa6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
16 deletions
+68
-16
.gitignore
.gitignore
+26
-0
.travis.yml
.travis.yml
+2
-2
googlemock/include/gmock/gmock.h
googlemock/include/gmock/gmock.h
+4
-0
googlemock/src/gmock.cc
googlemock/src/gmock.cc
+12
-0
googlemock/src/gmock_main.cc
googlemock/src/gmock_main.cc
+1
-7
googletest/include/gtest/gtest.h
googletest/include/gtest/gtest.h
+4
-0
googletest/src/gtest.cc
googletest/src/gtest.cc
+16
-0
googletest/src/gtest_main.cc
googletest/src/gtest_main.cc
+1
-7
library.json
library.json
+2
-0
No files found.
.gitignore
View file @
bf07131c
...
@@ -55,3 +55,29 @@ googlemock/CTestTestfile.cmake
...
@@ -55,3 +55,29 @@ googlemock/CTestTestfile.cmake
googlemock/Makefile
googlemock/Makefile
googlemock/cmake_install.cmake
googlemock/cmake_install.cmake
googlemock/gtest
googlemock/gtest
/bin
/googlemock/gmock.dir
/googlemock/gmock_main.dir
/googlemock/RUN_TESTS.vcxproj.filters
/googlemock/RUN_TESTS.vcxproj
/googlemock/INSTALL.vcxproj.filters
/googlemock/INSTALL.vcxproj
/googlemock/gmock_main.vcxproj.filters
/googlemock/gmock_main.vcxproj
/googlemock/gmock.vcxproj.filters
/googlemock/gmock.vcxproj
/googlemock/gmock.sln
/googlemock/ALL_BUILD.vcxproj.filters
/googlemock/ALL_BUILD.vcxproj
/lib
/Win32
/ZERO_CHECK.vcxproj.filters
/ZERO_CHECK.vcxproj
/RUN_TESTS.vcxproj.filters
/RUN_TESTS.vcxproj
/INSTALL.vcxproj.filters
/INSTALL.vcxproj
/googletest-distribution.sln
/CMakeCache.txt
/ALL_BUILD.vcxproj.filters
/ALL_BUILD.vcxproj
.travis.yml
View file @
bf07131c
...
@@ -46,9 +46,9 @@ matrix:
...
@@ -46,9 +46,9 @@ matrix:
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
-
os
:
osx
-
os
:
osx
compiler
:
gcc
compiler
:
gcc
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
-
os
:
osx
-
os
:
osx
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if
:
type != pull_request
if
:
type != pull_request
# These are the install and build (script) phases for the most common entries in the matrix. They could be included
# These are the install and build (script) phases for the most common entries in the matrix. They could be included
...
...
googlemock/include/gmock/gmock.h
View file @
bf07131c
...
@@ -92,6 +92,10 @@ GTEST_API_ void InitGoogleMock(int* argc, char** argv);
...
@@ -92,6 +92,10 @@ GTEST_API_ void InitGoogleMock(int* argc, char** argv);
// UNICODE mode.
// UNICODE mode.
GTEST_API_
void
InitGoogleMock
(
int
*
argc
,
wchar_t
**
argv
);
GTEST_API_
void
InitGoogleMock
(
int
*
argc
,
wchar_t
**
argv
);
// This overloaded version can be used on Arduino/embedded platforms where
// there is no argc/argv.
GTEST_API_
void
InitGoogleMock
();
}
// namespace testing
}
// namespace testing
#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_
#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_
googlemock/src/gmock.cc
View file @
bf07131c
...
@@ -198,4 +198,16 @@ GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv) {
...
@@ -198,4 +198,16 @@ GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv) {
internal
::
InitGoogleMockImpl
(
argc
,
argv
);
internal
::
InitGoogleMockImpl
(
argc
,
argv
);
}
}
// This overloaded version can be used on Arduino/embedded platforms where
// there is no argc/argv.
GTEST_API_
void
InitGoogleMock
()
{
// Since Arduino doesn't have a command line, fake out the argc/argv arguments
int
argc
=
1
;
const
auto
arg0
=
"dummy"
;
char
*
argv0
=
const_cast
<
char
*>
(
arg0
);
char
**
argv
=
&
argv0
;
internal
::
InitGoogleMockImpl
(
&
argc
,
argv
);
}
}
// namespace testing
}
// namespace testing
googlemock/src/gmock_main.cc
View file @
bf07131c
...
@@ -34,16 +34,10 @@
...
@@ -34,16 +34,10 @@
#ifdef ARDUINO
#ifdef ARDUINO
void
setup
()
{
void
setup
()
{
// Since Arduino doesn't have a command line, fake out the argc/argv arguments
int
argc
=
1
;
const
auto
arg0
=
"PlatformIO"
;
char
*
argv0
=
const_cast
<
char
*>
(
arg0
);
char
**
argv
=
&
argv0
;
// 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
// no need for calling testing::InitGoogleTest() separately.
// no need for calling testing::InitGoogleTest() separately.
testing
::
InitGoogleMock
(
&
argc
,
argv
);
testing
::
InitGoogleMock
();
}
}
void
loop
()
{
RUN_ALL_TESTS
();
}
void
loop
()
{
RUN_ALL_TESTS
();
}
#else
#else
...
...
googletest/include/gtest/gtest.h
View file @
bf07131c
...
@@ -1484,6 +1484,10 @@ GTEST_API_ void InitGoogleTest(int* argc, char** argv);
...
@@ -1484,6 +1484,10 @@ GTEST_API_ void InitGoogleTest(int* argc, char** argv);
// UNICODE mode.
// UNICODE mode.
GTEST_API_
void
InitGoogleTest
(
int
*
argc
,
wchar_t
**
argv
);
GTEST_API_
void
InitGoogleTest
(
int
*
argc
,
wchar_t
**
argv
);
// This overloaded version can be used on Arduino/embedded platforms where
// there is no argc/argv.
GTEST_API_
void
InitGoogleTest
();
namespace
internal
{
namespace
internal
{
// Separate the error generating code from the code path to reduce the stack
// Separate the error generating code from the code path to reduce the stack
...
...
googletest/src/gtest.cc
View file @
bf07131c
...
@@ -6020,6 +6020,22 @@ void InitGoogleTest(int* argc, wchar_t** argv) {
...
@@ -6020,6 +6020,22 @@ void InitGoogleTest(int* argc, wchar_t** argv) {
#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
}
}
// This overloaded version can be used on Arduino/embedded platforms where
// there is no argc/argv.
void
InitGoogleTest
()
{
// Since Arduino doesn't have a command line, fake out the argc/argv arguments
int
argc
=
1
;
const
auto
arg0
=
"dummy"
;
char
*
argv0
=
const_cast
<
char
*>
(
arg0
);
char
**
argv
=
&
argv0
;
#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_
(
&
argc
,
argv
);
#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
internal
::
InitGoogleTestImpl
(
&
argc
,
argv
);
#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
}
std
::
string
TempDir
()
{
std
::
string
TempDir
()
{
#if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_)
#if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_)
return
GTEST_CUSTOM_TEMPDIR_FUNCTION_
();
return
GTEST_CUSTOM_TEMPDIR_FUNCTION_
();
...
...
googletest/src/gtest_main.cc
View file @
bf07131c
...
@@ -32,13 +32,7 @@
...
@@ -32,13 +32,7 @@
#ifdef ARDUINO
#ifdef ARDUINO
void
setup
()
{
void
setup
()
{
// Since Arduino doesn't have a command line, fake out the argc/argv arguments
testing
::
InitGoogleTest
();
int
argc
=
1
;
const
auto
arg0
=
"PlatformIO"
;
char
*
argv0
=
const_cast
<
char
*>
(
arg0
);
char
**
argv
=
&
argv0
;
testing
::
InitGoogleTest
(
&
argc
,
argv
);
}
}
void
loop
()
{
RUN_ALL_TESTS
();
}
void
loop
()
{
RUN_ALL_TESTS
();
}
...
...
library.json
View file @
bf07131c
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
"googlemock/make"
,
"googlemock/make"
,
"googlemock/msvc"
,
"googlemock/msvc"
,
"googlemock/scripts"
,
"googlemock/scripts"
,
"googlemock/src/gmock_main.cc"
,
"googlemock/test"
,
"googlemock/test"
,
"googlemock/CMakeLists.txt"
,
"googlemock/CMakeLists.txt"
,
"googlemock/Makefile.am"
,
"googlemock/Makefile.am"
,
...
@@ -37,6 +38,7 @@
...
@@ -37,6 +38,7 @@
"googletest/make"
,
"googletest/make"
,
"googletest/msvc"
,
"googletest/msvc"
,
"googletest/scripts"
,
"googletest/scripts"
,
"googletest/src/gtest_main.cc"
,
"googletest/test"
,
"googletest/test"
,
"googletest/xcode"
,
"googletest/xcode"
,
"googletest/CMakeLists.txt"
,
"googletest/CMakeLists.txt"
,
...
...
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