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
e55089ec
Commit
e55089ec
authored
Apr 04, 2018
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merging gmock matchers 1
parent
1776ed8c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
6 deletions
+52
-6
gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+0
-0
gmock-matchers.cc
googlemock/src/gmock-matchers.cc
+52
-6
gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+0
-0
No files found.
googlemock/include/gmock/gmock-matchers.h
View file @
e55089ec
This diff is collapsed.
Click to expand it.
googlemock/src/gmock-matchers.cc
View file @
e55089ec
...
...
@@ -105,6 +105,53 @@ Matcher<::string>::Matcher(const ::string& s) { *this = Eq(s); }
Matcher
<::
string
>::
Matcher
(
const
char
*
s
)
{
*
this
=
Eq
(
::
string
(
s
));
}
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_ABSL
// Constructs a matcher that matches a const absl::string_view& whose value is
// equal to s.
Matcher
<
const
absl
::
string_view
&>::
Matcher
(
const
std
::
string
&
s
)
{
*
this
=
Eq
(
s
);
}
#if GTEST_HAS_GLOBAL_STRING
// Constructs a matcher that matches a const absl::string_view& whose value is
// equal to s.
Matcher
<
const
absl
::
string_view
&>::
Matcher
(
const
::
string
&
s
)
{
*
this
=
Eq
(
s
);
}
#endif // GTEST_HAS_GLOBAL_STRING
// Constructs a matcher that matches a const absl::string_view& whose value is
// equal to s.
Matcher
<
const
absl
::
string_view
&>::
Matcher
(
const
char
*
s
)
{
*
this
=
Eq
(
std
::
string
(
s
));
}
// Constructs a matcher that matches a const absl::string_view& whose value is
// equal to s.
Matcher
<
const
absl
::
string_view
&>::
Matcher
(
absl
::
string_view
s
)
{
*
this
=
Eq
(
std
::
string
(
s
));
}
// Constructs a matcher that matches a absl::string_view whose value is equal to
// s.
Matcher
<
absl
::
string_view
>::
Matcher
(
const
std
::
string
&
s
)
{
*
this
=
Eq
(
s
);
}
#if GTEST_HAS_GLOBAL_STRING
// Constructs a matcher that matches a absl::string_view whose value is equal to
// s.
Matcher
<
absl
::
string_view
>::
Matcher
(
const
::
string
&
s
)
{
*
this
=
Eq
(
s
);
}
#endif // GTEST_HAS_GLOBAL_STRING
// Constructs a matcher that matches a absl::string_view whose value is equal to
// s.
Matcher
<
absl
::
string_view
>::
Matcher
(
const
char
*
s
)
{
*
this
=
Eq
(
std
::
string
(
s
));
}
// Constructs a matcher that matches a absl::string_view whose value is equal to
// s.
Matcher
<
absl
::
string_view
>::
Matcher
(
absl
::
string_view
s
)
{
*
this
=
Eq
(
std
::
string
(
s
));
}
#endif // GTEST_HAS_ABSL
namespace
internal
{
...
...
@@ -113,12 +160,11 @@ namespace internal {
// 'negation' is false; otherwise returns the description of the
// negation of the matcher. 'param_values' contains a list of strings
// that are the print-out of the matcher's parameters.
GTEST_API_
string
FormatMatcherDescription
(
bool
negation
,
const
char
*
matcher_name
,
const
Strings
&
param_values
)
{
string
result
=
ConvertIdentifierNameToWords
(
matcher_name
);
if
(
param_values
.
size
()
>=
1
)
result
+=
" "
+
JoinAsTuple
(
param_values
);
GTEST_API_
std
::
string
FormatMatcherDescription
(
bool
negation
,
const
char
*
matcher_name
,
const
Strings
&
param_values
)
{
std
::
string
result
=
ConvertIdentifierNameToWords
(
matcher_name
);
if
(
param_values
.
size
()
>=
1
)
result
+=
" "
+
JoinAsTuple
(
param_values
);
return
negation
?
"not ("
+
result
+
")"
:
result
;
}
...
...
googlemock/test/gmock-matchers_test.cc
View file @
e55089ec
This diff is collapsed.
Click to expand it.
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