title: Generate automatically unit tests with different input parameters c++
body: <p>I want to automatically generate a lot of test functions. I am using <a href="http://cpptest.sourceforge.net/" rel="nofollow">cpptest</a> tool where the standard way to add test is</p>
  
  <pre><code>TEST_ADD(MyTest::test1)
  TEST_ADD(MyTest::test2)
  ...
  TEST_ADD(MyTest::test100)
  </code></pre>
  
  <p>where I need to manually write test functions from <code>void test1(){...}</code> to <code>void test100(){...}</code>. I want to change this to be like this</p>
  
  <pre><code>for(i=0;i&lt;100;i++)
      TEST_ADD(MyTest::test(i))
  </code></pre>
  
  <p>but TEST_ADD does not support functions with parameters. I had idea to automatically generate <code>cpp</code> file with all this 100 functions and then compile it in runtime, but this solution sounds to complicated. Is there some good way to organize such testing?</p>
  
  <p>Back to the real problem, I have program with command line arguments like this</p>
  
  <pre><code>algorithmName parm1 parm2 ... parmN
  </code></pre>
  
  <p>I want to write unit tests to test all (or almost all) combinations of command line arguments, and each combination should be separate test in order to easily identify which combination failed. Is there some standard way to do this?</p>