title: Is it possible to define (pure virtual) test cases in a base class using googletest
body: <p>is it possible to define a base test-fixture with (abstract) test cases and derive classes from them? </p>
  
  <p>There are two szenarios I'd like to support (Taken from Roy Overshores "The art of Unit Testing"):</p>
  
  <ol>
  <li><strong>Template test class pattern</strong> Define abstract test cases in the base test-fixture and thus force derived classes to implement them.</li>
  <li><strong>Abstract test driver class pattern</strong> Implement tests in the base class that all derived class inherit automatically</li>
  </ol>
  
  <p>I cannot figure out how this works with googletest. If I have a base class</p>
  
  <pre><code>#pragma once
  
  class BaseClass : public ::testing::Test
  {
  };
  
  TEST_F(BaseClass, T1)
  {
  
  }
  </code></pre>
  
  <p>and two derived classes (in different files) </p>
  
  <pre><code>#include "stdafx.h"
  
  #include "BaseClass.h"
  
  class DerivedClass1 : public BaseClass
  {
  
  };
  </code></pre>
  
  <p>and</p>
  
  <pre><code>#include "stdafx.h"
  
  #include "BaseClass.h"
  
  class DerivedClass2 : public BaseClass
  {
  
  };
  </code></pre>
  
  <p>I get the compiler error </p>
  
  <pre><code>virtual void __thiscall BaseClass_T1_Test::TestBody(void)" (?TestBody@BaseClass_T1_Test@@EAEXXZ) already defined in DerivedClass1.obj
  </code></pre>
  
  <p>Is it somehow possible to define concrete and pure virtual tests in a test base class?</p>