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
41e82cad
Commit
41e82cad
authored
Aug 07, 2018
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upsream additional printer test
parent
b345bf90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
googletest-printers-test.cc
googletest/test/googletest-printers-test.cc
+15
-0
No files found.
googletest/test/googletest-printers-test.cc
View file @
41e82cad
...
@@ -1731,6 +1731,21 @@ TEST(PrintOptionalTest, Basic) {
...
@@ -1731,6 +1731,21 @@ TEST(PrintOptionalTest, Basic) {
EXPECT_EQ
(
"(1.1)"
,
PrintToString
(
absl
::
optional
<
double
>
{
1.1
}));
EXPECT_EQ
(
"(1.1)"
,
PrintToString
(
absl
::
optional
<
double
>
{
1.1
}));
EXPECT_EQ
(
"(
\"
A
\"
)"
,
PrintToString
(
absl
::
optional
<
std
::
string
>
{
"A"
}));
EXPECT_EQ
(
"(
\"
A
\"
)"
,
PrintToString
(
absl
::
optional
<
std
::
string
>
{
"A"
}));
}
}
struct
NonPrintable
{
unsigned
char
contents
=
17
;
};
TEST
(
PrintOneofTest
,
Basic
)
{
using
Type
=
absl
::
variant
<
int
,
StreamableInGlobal
,
NonPrintable
>
;
EXPECT_EQ
(
"('int' with value 7)"
,
PrintToString
(
Type
(
7
)));
EXPECT_EQ
(
"('StreamableInGlobal' with value StreamableInGlobal)"
,
PrintToString
(
Type
(
StreamableInGlobal
{})));
EXPECT_EQ
(
"('testing::gtest_printers_test::NonPrintable' with value 1-byte object "
"<11>)"
,
PrintToString
(
Type
(
NonPrintable
{})));
}
#endif // GTEST_HAS_ABSL
#endif // GTEST_HAS_ABSL
}
// namespace gtest_printers_test
}
// namespace gtest_printers_test
...
...
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