title: Google Test (gtest): ASSERT_PREDx and class member functions
body: <p>Ok, so I'm using gtest for unit testing, and I've got something I want to do:</p>
  
  <pre><code>class A {
      /* Private members */
  public:
      bool function_to_test(int index);
  }
  </code></pre>
  
  <p>In the test function, I'd like to use:</p>
  
  <pre><code>A testEntity;
  const int b = 40;
  ASSERT_PRED1(testEntity.function_to_test, b);
  </code></pre>
  
  <p>This doesn't work as <code>ASSERT_PREDx</code> seems to be designed for global scope functions. I get a message on the lines of</p>
  
  <blockquote>
  <pre><code>argument of type ‘bool (A::)(int) {aka bool (A::)(int)}’ does not match ‘bool (A::*)(int)’
  </code></pre>
  </blockquote>
  
  <p>I was wondering if there was a good work around for this? I can always use a function with a global variable, but I wasn't sure if there was a one-line way around it.</p>