Пример #1
0
 def test_multiple_arguments(self):
     self.verify(
         makemock.MockMethod("int", "DoThis",
                             "(const char * str, string &)", "const"),
         "ON_CALL(*this, DoThis(_, _)).WillByDefault(Invoke([](const char * str, string & p1) "
         "{ return real->DoThis(str, p1); }));",
     )
Пример #2
0
 def test_with_namespace(self):
     self.verify(
         makemock.MockMethod("int", "DoThis", "(const std::string &)",
                             "const"),
         "ON_CALL(*this, DoThis(_)).WillByDefault(Invoke([](const std::string & p0) "
         "{ return real->DoThis(p0); }));",
     )
Пример #3
0
 def test_without_arg_name(self):
     self.verify(
         makemock.MockMethod("int", "DoThis", "(int val)", "const"),
         "ON_CALL(*this, DoThis(_)).WillByDefault(Invoke([](int val) "
         "{ return real->DoThis(val); }));",
     )
Пример #4
0
 def test_with_const_ref_arg(self):
     self.verify(
         makemock.MockMethod("int", "DoThis", "(const int &)", "const"),
         "ON_CALL(*this, DoThis(_)).WillByDefault(Invoke([](const int & p0) "
         "{ return real->DoThis(p0); }));",
     )
Пример #5
0
 def test_simple_call(self):
     self.verify(
         makemock.MockMethod("int", "DoThis", "()", "const"),
         "ON_CALL(*this, DoThis()).WillByDefault(Invoke([]() "
         "{ return real->DoThis(); }));",
     )