Re: Issue 6 in mockitopp: when() required to avoid crashes for functions without parameters

4 views
Skip to first unread message

mock...@googlecode.com

unread,
Sep 29, 2012, 3:39:23 AM9/29/12
to mockit...@googlegroups.com
Updates:
Status: Accepted
Owner: trevor.p...@gmail.com

Comment #1 on issue 6 by trevor.p...@gmail.com: when() required to avoid
crashes for functions without parameters
http://code.google.com/p/mockitopp/issues/detail?id=6

(No comment was entered for this change.)

mock...@googlecode.com

unread,
Sep 29, 2012, 3:43:23 AM9/29/12
to mockit...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 6 by trevor.p...@gmail.com: when() required to avoid
crashes for functions without parameters
http://code.google.com/p/mockitopp/issues/detail?id=6

This issue was closed by revision r147.

mock...@googlecode.com

unread,
Oct 1, 2012, 12:30:01 PM10/1/12
to mockit...@googlegroups.com

Comment #3 on issue 6 by nwon...@gmail.com: when() required to avoid
crashes for functions without parameters
http://code.google.com/p/mockitopp/issues/detail?id=6

After updating to r147, the code example above fails to compile:

example.cc:10: error: within this context
example.cc:10: error: ‘mockitopp::detail::dynamic_vfunction_action<void>’
is not an accessible base of ‘mockitopp::detail::dynamic_vfunction<void
(Foo::*)()>’

mock...@googlecode.com

unread,
Oct 1, 2012, 9:26:33 PM10/1/12
to mockit...@googlegroups.com

Comment #4 on issue 6 by trevor.p...@gmail.com: when() required to avoid
crashes for functions without parameters
http://code.google.com/p/mockitopp/issues/detail?id=6

The example above and corresponding wiki documentation actually use
incorrect syntax although it was never strictly enforced. The fix here is
to ensure that the compiler enforces the proper mocking syntax.

e.g. mock(&Foo::bar).when().thenReturn();

Reply all
Reply to author
Forward
0 new messages