aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-function-mocker_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock/test/gmock-function-mocker_test.cc')
-rw-r--r--googlemock/test/gmock-function-mocker_test.cc46
1 files changed, 24 insertions, 22 deletions
diff --git a/googlemock/test/gmock-function-mocker_test.cc b/googlemock/test/gmock-function-mocker_test.cc
index 920b097f..94aaafba 100644
--- a/googlemock/test/gmock-function-mocker_test.cc
+++ b/googlemock/test/gmock-function-mocker_test.cc
@@ -779,55 +779,57 @@ TEST(MockMethodMockFunctionTest, AsStdFunctionWithReferenceParameter) {
EXPECT_EQ(-1, call(foo.AsStdFunction(), i));
}
-
namespace {
template <typename Expected, typename F>
-static constexpr bool IsMockFunctionTemplateArgumentDeducedTo(const MockFunction<F>&) {
+static constexpr bool IsMockFunctionTemplateArgumentDeducedTo(
+ const MockFunction<F>&) {
return std::is_same<F, Expected>::value;
}
-} // namespace
+} // namespace
template <typename F>
-class MockMethodMockFunctionSignatureTest : public Test {
-};
+class MockMethodMockFunctionSignatureTest : public Test {};
-using MockMethodMockFunctionSignatureTypes = Types<
- void(),
- int(),
- void(int),
- int(int),
- int(bool, int),
- int(bool, char, int, int, int, int, int, char, int, bool)
->;
-TYPED_TEST_SUITE(MockMethodMockFunctionSignatureTest, MockMethodMockFunctionSignatureTypes);
-
-TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionTemplateArgumentDeducedForRawSignature) {
+using MockMethodMockFunctionSignatureTypes =
+ Types<void(), int(), void(int), int(int), int(bool, int),
+ int(bool, char, int, int, int, int, int, char, int, bool)>;
+TYPED_TEST_SUITE(MockMethodMockFunctionSignatureTest,
+ MockMethodMockFunctionSignatureTypes);
+
+TYPED_TEST(MockMethodMockFunctionSignatureTest,
+ IsMockFunctionTemplateArgumentDeducedForRawSignature) {
using Argument = TypeParam;
MockFunction<Argument> foo;
EXPECT_TRUE(IsMockFunctionTemplateArgumentDeducedTo<Argument>(foo));
}
-TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionTemplateArgumentDeducedForStdFunction) {
+TYPED_TEST(MockMethodMockFunctionSignatureTest,
+ IsMockFunctionTemplateArgumentDeducedForStdFunction) {
using Argument = std::function<TypeParam>;
MockFunction<Argument> foo;
EXPECT_TRUE(IsMockFunctionTemplateArgumentDeducedTo<Argument>(foo));
}
-TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionCallMethodSignatureTheSameForRawSignatureAndStdFunction) {
+TYPED_TEST(
+ MockMethodMockFunctionSignatureTest,
+ IsMockFunctionCallMethodSignatureTheSameForRawSignatureAndStdFunction) {
using ForRawSignature = decltype(&MockFunction<TypeParam>::Call);
- using ForStdFunction = decltype(&MockFunction<std::function<TypeParam>>::Call);
+ using ForStdFunction =
+ decltype(&MockFunction<std::function<TypeParam>>::Call);
EXPECT_TRUE((std::is_same<ForRawSignature, ForStdFunction>::value));
}
-TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionAsStdFunctionMethodSignatureTheSameForRawSignatureAndStdFunction) {
+TYPED_TEST(
+ MockMethodMockFunctionSignatureTest,
+ IsMockFunctionAsStdFunctionMethodSignatureTheSameForRawSignatureAndStdFunction) {
using ForRawSignature = decltype(&MockFunction<TypeParam>::AsStdFunction);
- using ForStdFunction = decltype(&MockFunction<std::function<TypeParam>>::AsStdFunction);
+ using ForStdFunction =
+ decltype(&MockFunction<std::function<TypeParam>>::AsStdFunction);
EXPECT_TRUE((std::is_same<ForRawSignature, ForStdFunction>::value));
}
-
struct MockMethodSizes0 {
MOCK_METHOD(void, func, ());
};