title: How do I write a unit test when the class to test is complicated?
body: <p>I am trying to employ <strong>TDD</strong> in writing a backgammon game in C++ using VS 2010.</p>
  
  <p>I have set up <a href="http://cxxtest.com" rel="nofollow">CxxTest</a> to write the test cases.</p>
  
  <p>The first class to test is</p>
  
  <pre><code>class Position
  {
  public:
  ...
  ...
  bool IsSingleMoveValid(.....)
  ...
  ...
  }
  </code></pre>
  
  <p>I 'd like to write a test for the function <strong>IsSingleMoveValid()</strong>, and I guess the test should prove that the function works correctly. Unfortunately there are so many cases to test and even if I test several cases, some might escape. </p>
  
  <p>What do you suggest ? How does TDD handle these problems ?</p>