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
7e7f9d5f
Unverified
Commit
7e7f9d5f
authored
Jun 04, 2018
by
Gennadiy Civil
Committed by
GitHub
Jun 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1620 from gennadiycivil/master
Adress, #1616, add printer for std::nullptr_t
parents
db5f9ec5
f66ab007
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
gtest-printers.h
googletest/include/gtest/gtest-printers.h
+4
-0
gtest-printers_test.cc
googletest/test/gtest-printers_test.cc
+6
-0
No files found.
googletest/include/gtest/gtest-printers.h
View file @
7e7f9d5f
...
...
@@ -636,6 +636,10 @@ 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)"
;
}
#endif // GTEST_LANG_CXX11
#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
// Helper function for printing a tuple. T must be instantiated with
// a tuple type.
...
...
googletest/test/gtest-printers_test.cc
View file @
7e7f9d5f
...
...
@@ -1115,6 +1115,12 @@ TEST(PrintStdTupleTest, NestedTuple) {
#endif // GTEST_LANG_CXX11
#if GTEST_LANG_CXX11
TEST
(
PrintNullptrT
,
Basic
)
{
EXPECT_EQ
(
"(nullptr)"
,
Print
(
nullptr
));
}
#endif // GTEST_LANG_CXX11
// Tests printing user-defined unprintable types.
// Unprintable types in the global namespace.
...
...
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