User Activity

  • Modified ticket #65 on Turtle

    Force a mock method to throw an exception

  • Modified a comment on ticket #65 on Turtle

    Indeed this explains the issue. I believe you could also do PathMock* path = new PathMock(); MOCK_EXPECT(path->smooth).throws(Exception()); MOCK_EXPECT(path->clone).returns(new PathMock(*path)); because as stated in http://turtle.sourceforge.net/turtle/reference.html#turtle.reference.creation mock objects can be copied and all copies then share the same state. MAT.

  • Posted a comment on ticket #65 on Turtle

    Indeed this explains the issue. I believe you could also do PathMock* path = new PathMock(); MOCK_EXPECT(path->smooth).throws(Exception()); MOCK_EXPECT(path->clone).returns(new PathMock(*path)); because as stated in http://turtle.sourceforge.net/turtle/reference.html#turtle.reference.creation mock can be copied and all copies then share the same state. MAT.

  • Posted a comment on ticket #65 on Turtle

    Hi, Do you think you might be able to make a small self contained test case I could investigate? Thanks, MAT.

  • Posted a comment on ticket #65 on Turtle

    Hi Gianni, At first glace it looks like it should work, here is a test I just wrote to confirm it: namespace { MOCK_CLASS( my_mock ) { MOCK_METHOD_EXT( my_method, 1, int( int ), my_tag ) }; } BOOST_AUTO_TEST_CASE( basic_mock_object_usage ) { my_mock m; MOCK_EXPECT( m.my_tag ).once().throws( std::runtime_error( "some exception" ) ); BOOST_CHECK_THROW( m.my_method( 27 ), std::exception ); } How are Exception and ExecutionException defined ? MAT.

  • Created a blog post on XeuMeuLeu

    XeuMeuLeu 1.7.1 released

  • Modified ticket #16 on Turtle

    mock::retrieve fails with boost::function

  • Created a blog post on XeuMeuLeu

    XeuMeuLeu 1.7.0 released

View All

Personal Data

Username:
mat007
Joined:
2000-09-02 17:18:25

Projects

Skills

  • No skills entered.

Personal Tools