title: Unit testing a class constructor
body: <p>In C++ how would one test a class constructor? For example:</p>
  
  <pre><code>Class myClass{
      int a;
  
  public:
      myClass(); //Constructor
      void reset(); //resets a to 0;
  
  };
  
  //Constructor defined to initialize a to 0
  myClass::myClass(){
      reset();
  }
  
  //reset sets a to 0
  void myClass::reset(){
      a = 0;
  }
  </code></pre>
  
  <p>How would I test the myClass() constructor? I can't access the private data member, so would it be valid to say if reset works then the constructor works?</p>