Since I learnt to use Google Test/Mock framework, I allways used the form to setup an expectation as following:
EXPECT_CALL( mock_obj, mock_method ).WillOnce( Invoke( []() { do_things; } ) );
Few days ago, I found that another form also can work as this:
EXPECT_CALL( mock_obj, mock_method ).WillOnce( []() { do_things; } );
My question is:
- Is there any difference between those two forms?
- When should I use one over another?
Thanks!