开发源代码的CPU卡的COS源程序。

源代码在线查看: testsuite.cpp

软件大小: 1436 K
上传用户: xufengping716
关键词: CPU COS 源代码 源程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				#include "cppunit/TestSuite.h"				#include "cppunit/TestResult.h"								namespace CppUnit {								/// Default constructor				TestSuite::TestSuite( std::string name )				    : m_name( name )				{				}												/// Destructor				TestSuite::~TestSuite()				{ 				  deleteContents(); 				}												/// Deletes all tests in the suite.				void 				TestSuite::deleteContents()				{				  for ( std::vector::iterator it = m_tests.begin();				        it != m_tests.end();				        ++it)				    delete *it;				  m_tests.clear();				}												/// Runs the tests and collects their result in a TestResult.				void 				TestSuite::run( TestResult *result )				{				  for ( std::vector::iterator it = m_tests.begin();				        it != m_tests.end();				        ++it )				  {				    if ( result->shouldStop() )				        break;								    Test *test = *it;				    test->run( result );				  }				}												/// Counts the number of test cases that will be run by this test.				int 				TestSuite::countTestCases() const				{				  int count = 0;								  for ( std::vector::const_iterator it = m_tests.begin();				        it != m_tests.end();				        ++it )				    count += (*it)->countTestCases();								  return count;				}												/// Adds a test to the suite. 				void 				TestSuite::addTest( Test *test )				{ 				  m_tests.push_back( test ); 				}												/// Returns a string representation of the test suite.				std::string 				TestSuite::toString() const				{ 				  return "suite " + getName();				}												/// Returns the name of the test suite.				std::string 				TestSuite::getName() const				{ 				  return m_name; 				}												const std::vector &				TestSuite::getTests() const				{				  return m_tests;				}												} // namespace CppUnit											

相关资源