Exemple #1
0
/// Deletes all tests in the suite.
void 
TestSuite::deleteContents()
{
  int childCount = getChildTestCount();
  for ( int index =0; index < childCount; ++index )
    delete getChildTestAt( index );

  m_tests.clear();
}
int
TestComposite::countTestCases() const
{
  int count = 0;

  int childCount = getChildTestCount();
  for ( int index =0; index < childCount; ++index )
    count += getChildTestAt( index )->countTestCases();

  return count;
}
void
TestComposite::doRunChildTests( TestResult *controller )
{
  int childCount = getChildTestCount();
  for ( int index =0; index < childCount; ++index )
  {
    if ( controller->shouldStop() )
      break;

    getChildTestAt( index )->run( controller );
  }
}