Open GoogleCodeExporter opened 9 years ago
I'd like that. But what about the following instead?
// Returns true if the mock registry doesn't contain the given
// mock object; otherwise returns false.
bool Mock::CatchLeakedMock(const void* mock_obj)
// Returns true if the mock registry is empty; otherwise
// generates a non-fatal failure for each leaked mock object
// and returns false.
bool Mock::CatchLeakedMocks()
Original comment by kai.diet...@secrypt.de
on 17 Aug 2010 at 1:15
I think it's a good idea to rename the argumentless version to
CatchLeakedMocks() (i.e. adding an 's' to the end).
I don't like CatchLeakedMock(const void* mock_obj) though as it's unsound: if
mock_obj was already deleted and another mock object was then created at the
same address, this function will fail even though the original mock_obj wasn't
leaked.
Original comment by w...@google.com
on 27 Sep 2010 at 9:25
Original issue reported on code.google.com by
zhanyong...@gmail.com
on 17 Apr 2009 at 9:51