⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testsuite.cpp.svn-base

📁 很好用的网络封装库,不熟悉网络编程的人也可以使用。使用风格良好的标准c++编写。
💻 SVN-BASE
字号:
//
// TestSuite.cpp
//
// $Id: //poco/1.3/CppUnit/src/TestSuite.cpp#1 $
//


#include "CppUnit/TestSuite.h"
#include "CppUnit/TestResult.h"


namespace CppUnit {


// Deletes all tests in the suite.
void TestSuite::deleteContents()
{
	for (std::vector<Test*>::iterator it = _tests.begin(); it != _tests.end(); ++it)
		delete *it;
}


// Runs the tests and collects their result in a TestResult.
void TestSuite::run(TestResult *result)
{
	for (std::vector<Test*>::iterator it = _tests.begin(); it != _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()
{
	int count = 0;

	for (std::vector<Test*>::iterator it = _tests.begin (); it != _tests.end (); ++it)
		count += (*it)->countTestCases();

	return count;
}


} // namespace CppUnit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -