aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-function-mocker_test.cc
diff options
context:
space:
mode:
authorJoshua Cannon <joshdcannon@gmail.com>2019-10-07 15:12:51 -0500
committerJoshua Cannon <joshdcannon@gmail.com>2019-10-07 15:12:51 -0500
commit872b9ceb6045949a5e8ab22221301e65fea3fe29 (patch)
tree45bb88cec6004c6536ce425bc545c0572f36b08a /googlemock/test/gmock-function-mocker_test.cc
parent0eadff8a932d5d4fb9eeaf52434cd62ac0bc2b45 (diff)
downloadgoogletest-872b9ceb6045949a5e8ab22221301e65fea3fe29.tar.gz
googletest-872b9ceb6045949a5e8ab22221301e65fea3fe29.tar.bz2
googletest-872b9ceb6045949a5e8ab22221301e65fea3fe29.zip
Avoid comma operator
Diffstat (limited to 'googlemock/test/gmock-function-mocker_test.cc')
-rw-r--r--googlemock/test/gmock-function-mocker_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/googlemock/test/gmock-function-mocker_test.cc b/googlemock/test/gmock-function-mocker_test.cc
index 4b41437e..efd2499d 100644
--- a/googlemock/test/gmock-function-mocker_test.cc
+++ b/googlemock/test/gmock-function-mocker_test.cc
@@ -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