コード例 #1
0
ファイル: TestPath.cpp プロジェクト: cellmlapi/cellml-api
void
TestPath::insert( const TestPath &path,
                  int index )
{
  int itemIndex = path.getTestCount() -1;
  while ( itemIndex >= 0 )
    insert( path.getTestAt( itemIndex-- ), index );
}
コード例 #2
0
ファイル: TestRunner.cpp プロジェクト: asir6/Colt
void 
TestRunner::run( TestResult &controller,
                 const std::string &testPath )
{
  TestPath path = m_suite->resolveTestPath( testPath );
  Test *testToRun = path.getChildTest();

  controller.runTest( testToRun );
}
コード例 #3
0
ファイル: Test.cpp プロジェクト: 337529542/EngineLite
Test *
Test::findTest( const std::string &testName ) const
{
  TestPath path;
  Test *mutableThis = CPPUNIT_CONST_CAST( Test *, this );
  mutableThis->findTestPath( testName, path );
  if ( !path.isValid() )
    throw std::invalid_argument( "No test named <" + testName + "> found in test <"
                                 + getName() + ">." );
  return path.getChildTest();
}
コード例 #4
0
ファイル: FileSystemTest.cpp プロジェクト: kevinxw/CIS687-Pr1
bool test()
{
  bool t1, t2, t3, t4;
  TestFile tf;
  t1 = tf.test();
  TestFileInfo tfi;
  t2 = tfi.test();
  TestPath tp;
  t3 = tp.test();
  TestDirectory td;
  t4 = td.test();
  return t1 && t2 && t3;
}
コード例 #5
0
ファイル: TestPath.cpp プロジェクト: cellmlapi/cellml-api
TestPath::TestPath( const TestPath &other,
                    int indexFirst,
                    int count )
{
  int countAdjustment = 0;
  if ( indexFirst < 0 )
  {
    countAdjustment = indexFirst;
    indexFirst = 0;
  }

  if ( count < 0 )
    count = other.getTestCount();
  else
    count += countAdjustment;

  int index = indexFirst;
  while ( count-- > 0  &&  index < other.getTestCount() )
    add( other.getTestAt( index++ ) );
}
コード例 #6
0
ファイル: test_path.cpp プロジェクト: Valvador/PyroSpaceFork
 void runTest() { suite_TestPath.test_ctor(); }
コード例 #7
0
ファイル: TestPath.cpp プロジェクト: cellmlapi/cellml-api
void
TestPath::add( const TestPath &path )
{
  for ( int index =0; index < path.getTestCount(); ++index )
    add( path.getTestAt( index ) );
}