title: Why is the MOCK_METHOD syntax not working in GMock?
body: <p>I have not even begun testing and I am encountering some syntax issues with GMock's  MOCK_METHOD macro even though I am following GMock's documentation properly. Could it be a compiler issue? I have:</p>
  
  <p>MingGW (GCC 4.9.2)</p>
  
  <p>Googletest 1.10.x</p>
  
  <pre><code>class SimpleClass {
  
  public:
      virtual int simpleFirstFunction(int a, int b) { return (a + simpleSecondFunction(b)); }
      virtual int simpleSecondFunction(int b) { return (2 * b); }
      virtual ~SimpleClass();
  };
  
  
  class MockSimpleClass :public SimpleClass {
      MOCK_METHOD(int, simpleSecondFunction, (int a, int b), (override));
  };
  </code></pre>
  
  <p>I am seeing 3 compiler errors:</p>
  
  <p><strong>Error-1: about the function name</strong></p>
  
  <p>MockSimpleClass.cpp:18:24: error: </p>
  
  <p>'simpleSecondFunction' is not a type
  MOCK_METHOD(int, simpleSecondFunction(int a, int b), (override));</p>
  
  <p><strong>Error-2: about input parameters</strong></p>
  
  <p>MockSimpleClass.cpp:18:46: error: </p>
  
  <p>expected identifier before '(' token
         MOCK_METHOD(int, simpleSecondFunction, (int a, int b), (override));</p>
  
  <p><strong>Error-3: About parentheses around "override"</strong></p>
  
  <p>MockSimpleClass.cpp:18:60: error: </p>
  
  <p>expected identifier before '(' token
  MOCK_METHOD(int, simpleSecondFunction(int a, int b), (override));</p>