Mocking an rvalue qualified method with gmock

Viewed 97

Is there a way I can mock an rvalue qualified method with gmock? Something like the following?

class Something {
public:
  virtual void test() &&;
};

class MockSomething : public Something {
public:
  MOCK_METHOD(void, test, (), (&&, override));
};

Trying this seems to give me a bunch of weird compiler errors that complain about, what it looks like, are preprocessed tokens. I can also not figure out how to make the older numbered mocking macros (eg. MOCK_METHOD1, MOCK_METHOD2, etc) work...

Thanks!

1 Answers
Related