/
jiteman
/
jsd-foreign-libreoffice-cppunit
Обзор
Документация
Войти
/
jiteman
/
jsd-foreign-libreoffice-cppunit
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/cppunit/TestSuite.cpp
64 строки
891 B
jiteman
initial commit has been done
14 апр 2024, 15:49
14 апр 2024, 15:49
4c53812
Код
Авторство
О чём код?
#include <cppunit/config/SourcePrefix.h> #include <cppunit/TestSuite.h> #include <cppunit/TestResult.h> CPPUNIT_NS_BEGIN /// Default constructor TestSuite::TestSuite( std::string name ) : TestComposite( name ) , m_tests() { } /// Destructor TestSuite::~TestSuite() { deleteContents(); } /// 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(); } /// Adds a test to the suite. void TestSuite::addTest( Test *test ) { m_tests.push_back( test ); } const std::vector<Test *> & TestSuite::getTests() const { return m_tests; } int TestSuite::getChildTestCount() const { return m_tests.size(); } Test * TestSuite::doGetChildTestAt( int index ) const { return m_tests[index]; } CPPUNIT_NS_END