Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
📝 Description
This PR replaces manually created functions for two Mock/Stub/Spy classes with the MOCK_METHOD macro implemented in GMock. This has a couple of advantages:
If we have to override functions (i.e. base class has purely virtual functions), this can be done easily with the MOCK_METHOD macro
Functions created with these macro can be checked using the EXPECT_CALL macro. You can set the expectation for how many times a function is called (for example EXPECT_CALL(*converging_strategy, Predict()).Times(1)), you can also control what it will output (for example EXPECT_CALL(*converging_strategy, GetNumberOfIterations()).WillOnce(testing::Return(4)); or ON_CALL(*this, GetNumberOfIterations()).WillByDefault(testing::Return(4));)
📝 Description This PR replaces manually created functions for two Mock/Stub/Spy classes with the MOCK_METHOD macro implemented in GMock. This has a couple of advantages:
EXPECT_CALL(*converging_strategy, Predict()).Times(1)
), you can also control what it will output (for exampleEXPECT_CALL(*converging_strategy, GetNumberOfIterations()).WillOnce(testing::Return(4));
orON_CALL(*this, GetNumberOfIterations()).WillByDefault(testing::Return(4));
)