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
872b9ceb
Commit
872b9ceb
authored
Oct 07, 2019
by
Joshua Cannon
Browse files
Avoid comma operator
parent
0eadff8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
googlemock/test/gmock-function-mocker_test.cc
googlemock/test/gmock-function-mocker_test.cc
+3
-2
No files found.
googlemock/test/gmock-function-mocker_test.cc
View file @
872b9ceb
...
...
@@ -664,7 +664,8 @@ struct MockMethodNoexceptSpecifier {
MOCK_METHOD
(
void
,
func5
,
(),
(
const
,
noexcept
(
noexcept
(
1
+
1
))));
MOCK_METHOD
(
void
,
func6
,
(),
(
noexcept
(
noexcept
(
1
+
1
)),
const
));
// Put commas in the noexcept expression
MOCK_METHOD
(
void
,
func7
,
(),
(
noexcept
(
noexcept
(
1
,
2
,
3
)),
const
));
void
other_func
(
int
,
int
)
noexcept
;
MOCK_METHOD
(
void
,
func7
,
(),
(
noexcept
(
noexcept
(
other_func
(
1
,
2
))),
const
));
};
TEST
(
MockMethodMockFunctionTest
,
NoexceptSpecifierPreserved
)
{
...
...
@@ -674,7 +675,7 @@ TEST(MockMethodMockFunctionTest, NoexceptSpecifierPreserved) {
EXPECT_EQ
(
noexcept
(
MockMethodNoexceptSpecifier
{}.
func4
()),
noexcept
(
1
+
1
));
EXPECT_EQ
(
noexcept
(
MockMethodNoexceptSpecifier
{}.
func5
()),
noexcept
(
1
+
1
));
EXPECT_EQ
(
noexcept
(
MockMethodNoexceptSpecifier
{}.
func6
()),
noexcept
(
1
+
1
));
EXPECT_EQ
(
noexcept
(
MockMethodNoexceptSpecifier
{}.
func7
()),
noexcept
(
1
,
2
,
3
));
EXPECT_EQ
(
noexcept
(
MockMethodNoexceptSpecifier
{}.
func7
()),
noexcept
(
MockMethodNoexceptSpecifier
{}.
other_func
(
1
,
2
)
));
}
}
// namespace gmock_function_mocker_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