diff --git a/src/tests/turtle_test/integration_test.cpp b/src/tests/turtle_test/integration_test.cpp index 4fc2319..00b6b3b 100644 --- a/src/tests/turtle_test/integration_test.cpp +++ b/src/tests/turtle_test/integration_test.cpp @@ -518,7 +518,7 @@ BOOST_AUTO_TEST_CASE( a_free_function_can_be_mocked ) namespace { - struct some_class + struct some_class : mock::object { MOCK_STATIC_METHOD( some_static_method, 1, void( int ), some_static_method ) }; @@ -533,6 +533,15 @@ BOOST_AUTO_TEST_CASE( a_static_method_can_be_mocked ) MOCK_RESET( some_class::some_static_method ); } +BOOST_AUTO_TEST_CASE( a_static_method_is_not_reset_when_resetting_an_instance_of_the_class ) +{ + MOCK_EXPECT( some_class::some_static_method ).once(); + some_class c; + mock::reset( c ); + BOOST_CHECK( ! MOCK_VERIFY( some_class::some_static_method ) ); + MOCK_RESET( some_class::some_static_method ); +} + namespace { template< typename T >