Change the CheatSheet where you show the mock example:
template <typename Elem>
class MockStack : public StackInterface<Elem> {
...
MOCK_CONST_METHOD0_T(GetSize, int());
MOCK_METHOD1_T(Push, void(const Elem& x));
};
and make sure to put public: in there. eg:
template <typename Elem>
class MockStack : public StackInterface<Elem> {
public:
...
MOCK_CONST_METHOD0_T(GetSize, int());
MOCK_METHOD1_T(Push, void(const Elem& x));
};
otherwise you get private mock methods. I had no idea what the macros did
and didn't konw if they did magic with scoping.
The Dummies page says this in the text and the example but I didn't think I
was a dummy.
Original issue reported on code.google.com by mr.ga...@gmail.com on 14 Apr 2010 at 1:46
Original issue reported on code.google.com by
mr.ga...@gmail.com
on 14 Apr 2010 at 1:46