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
90943525
Unverified
Commit
90943525
authored
Sep 20, 2018
by
Gennadiy Civil
Committed by
GitHub
Sep 20, 2018
Browse files
Merge branch 'master' into python3-tests
parents
149c0d24
258def01
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
googlemock/CMakeLists.txt
googlemock/CMakeLists.txt
+3
-0
googletest/include/gtest/gtest-printers.h
googletest/include/gtest/gtest-printers.h
+9
-0
googletest/include/gtest/internal/gtest-port-arch.h
googletest/include/gtest/internal/gtest-port-arch.h
+3
-2
googletest/test/googletest-printers-test.cc
googletest/test/googletest-printers-test.cc
+16
-0
googletest/test/gtest_unittest.cc
googletest/test/gtest_unittest.cc
+1
-1
No files found.
googlemock/CMakeLists.txt
View file @
90943525
...
...
@@ -157,6 +157,9 @@ if (gmock_build_tests)
cxx_test
(
gmock-generated-matchers_test gmock_main
)
cxx_test
(
gmock-internal-utils_test gmock_main
)
cxx_test
(
gmock-matchers_test gmock_main
)
if
(
MINGW
)
target_compile_options
(
gmock-matchers_test PRIVATE
"-Wa,-mbig-obj"
)
endif
()
cxx_test
(
gmock-more-actions_test gmock_main
)
cxx_test
(
gmock-nice-strict_test gmock_main
)
cxx_test
(
gmock-port_test gmock_main
)
...
...
googletest/include/gtest/gtest-printers.h
View file @
90943525
...
...
@@ -100,6 +100,7 @@
#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
#include <functional>
#include <ostream> // NOLINT
#include <sstream>
#include <string>
...
...
@@ -639,7 +640,15 @@ inline void PrintTo(absl::string_view sp, ::std::ostream* os) {
#endif // GTEST_HAS_ABSL
#if GTEST_LANG_CXX11
inline
void
PrintTo
(
std
::
nullptr_t
,
::
std
::
ostream
*
os
)
{
*
os
<<
"(nullptr)"
;
}
template
<
typename
T
>
void
PrintTo
(
std
::
reference_wrapper
<
T
>
ref
,
::
std
::
ostream
*
os
)
{
// Delegate to wrapped value.
PrintTo
(
ref
.
get
(),
os
);
}
#endif // GTEST_LANG_CXX11
#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
...
...
googletest/include/gtest/internal/gtest-port-arch.h
View file @
90943525
...
...
@@ -38,14 +38,15 @@
// Determines the platform on which Google Test is compiled.
#ifdef __CYGWIN__
# define GTEST_OS_CYGWIN 1
# elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
# define GTEST_OS_WINDOWS_MINGW 1
# define GTEST_OS_WINDOWS 1
#elif defined __SYMBIAN32__
# define GTEST_OS_SYMBIAN 1
#elif defined _WIN32
# define GTEST_OS_WINDOWS 1
# ifdef _WIN32_WCE
# define GTEST_OS_WINDOWS_MOBILE 1
# elif defined(__MINGW__) || defined(__MINGW32__)
# define GTEST_OS_WINDOWS_MINGW 1
# elif defined(WINAPI_FAMILY)
# include <winapifamily.h>
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
...
...
googletest/test/googletest-printers-test.cc
View file @
90943525
...
...
@@ -1112,9 +1112,25 @@ TEST(PrintStdTupleTest, NestedTuple) {
#endif // GTEST_LANG_CXX11
#if GTEST_LANG_CXX11
TEST
(
PrintNullptrT
,
Basic
)
{
EXPECT_EQ
(
"(nullptr)"
,
Print
(
nullptr
));
}
TEST
(
PrintReferenceWrapper
,
Printable
)
{
int
x
=
5
;
EXPECT_EQ
(
"5"
,
Print
(
std
::
ref
(
x
)));
EXPECT_EQ
(
"5"
,
Print
(
std
::
cref
(
x
)));
}
TEST
(
PrintReferenceWrapper
,
Unprintable
)
{
::
foo
::
UnprintableInFoo
up
;
EXPECT_EQ
(
"16-byte object <EF-12 00-00 34-AB 00-00 00-00 00-00 00-00 00-00>"
,
Print
(
std
::
ref
(
up
)));
EXPECT_EQ
(
"16-byte object <EF-12 00-00 34-AB 00-00 00-00 00-00 00-00 00-00>"
,
Print
(
std
::
cref
(
up
)));
}
#endif // GTEST_LANG_CXX11
// Tests printing user-defined unprintable types.
...
...
googletest/test/gtest_unittest.cc
View file @
90943525
...
...
@@ -6826,7 +6826,7 @@ TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) {
TEST
(
ColoredOutputTest
,
UsesColorsWhenTermSupportsColors
)
{
GTEST_FLAG
(
color
)
=
"auto"
;
#if GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
&& !GTEST_OS_WINDOWS_MINGW
// On Windows, we ignore the TERM variable as it's usually not set.
SetEnv
(
"TERM"
,
"dumb"
);
...
...
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