/// 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 ); } }
void TestList::tableCellTouched(TableView* table, TableViewCell* cell) { if (_cellTouchEnabled) { auto index = cell->getIdx(); if (_testCallbacks[index]) { auto test = _testCallbacks[index](); if (test->getChildTestCount() > 0) { _tableOffset = table->getContentOffset(); _shouldRestoreTableOffset = true; _cellTouchEnabled = false; test->setTestParent(this); test->runThisTest(); } else { delete test; } } } }