aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test
diff options
context:
space:
mode:
authorJoshua Cannon <joshdcannon@gmail.com>2019-10-07 15:49:52 -0500
committerJoshua Cannon <joshdcannon@gmail.com>2019-10-07 15:49:52 -0500
commit7f8617a7c53275654531e3c75fe11bc9b1b7e1a1 (patch)
tree4c327b4c77845f48ab32104ed6a6d06027ca1fbd /googlemock/test
parent872b9ceb6045949a5e8ab22221301e65fea3fe29 (diff)
downloadgoogletest-7f8617a7c53275654531e3c75fe11bc9b1b7e1a1.tar.gz
googletest-7f8617a7c53275654531e3c75fe11bc9b1b7e1a1.tar.bz2
googletest-7f8617a7c53275654531e3c75fe11bc9b1b7e1a1.zip
Switch to free function to avoid GCC bug
Diffstat (limited to 'googlemock/test')
-rw-r--r--googlemock/test/gmock-function-mocker_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/googlemock/test/gmock-function-mocker_test.cc b/googlemock/test/gmock-function-mocker_test.cc
index efd2499d..94f01fe2 100644
--- a/googlemock/test/gmock-function-mocker_test.cc
+++ b/googlemock/test/gmock-function-mocker_test.cc
@@ -656,6 +656,7 @@ TEST(MockMethodMockFunctionTest, MockMethodSizeOverhead) {
EXPECT_EQ(sizeof(MockMethodSizes0), sizeof(MockMethodSizes4));
}
+void hasTwoParams(int, int);
struct MockMethodNoexceptSpecifier {
MOCK_METHOD(void, func1, (), (noexcept));
MOCK_METHOD(void, func2, (), (noexcept(true)));
@@ -664,8 +665,7 @@ 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
- void other_func(int, int) noexcept;
- MOCK_METHOD(void, func7, (), (noexcept(noexcept(other_func(1,2))), const));
+ MOCK_METHOD(void, func7, (), (noexcept(noexcept(hasTwoParams(1,2))), const));
};
TEST(MockMethodMockFunctionTest, NoexceptSpecifierPreserved) {
@@ -675,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(MockMethodNoexceptSpecifier{}.other_func(1,2)));
+ EXPECT_EQ(noexcept(MockMethodNoexceptSpecifier{}.func7()), noexcept(hasTwoParams(1,2)));
}
} // namespace gmock_function_mocker_test