• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Utest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Utest的典型用法代码示例。如果您正苦于以下问题:C++ Utest类的具体用法?C++ Utest怎么用?C++ Utest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Utest类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: runAllTests

void TestRegistry::runAllTests (TestResult& result)
{
	bool groupStart = true;

	result.testsStarted ();
	for (Utest *test = tests; !test->isNull(); test = test->getNext ()){

		if (groupStart) {
			result.currentGroupStarted(test);
			groupStart = false;
		}

		result.setProgressIndicator(test->getProgressIndicator());
		result.countTest();
		if (testShouldRun(test, result)) {
			result.currentTestStarted(test);
			test->runOneTestWithPlugins(firstPlugin_, result);
			result.currentTestEnded(test);
		}

		if (endOfGroup (test)) {
			groupStart = true;
			result.currentGroupEnded(test);
		}
	}
  result.testsEnded ();
}
开发者ID:xforever1313,项目名称:sethcommon,代码行数:27,代码来源:TestRegistry.cpp


示例2: getTestWithNext

Utest* TestRegistry::getTestWithNext(Utest* test)
{
   Utest* current = tests;
   while (!current->getNext()->isNull() && current->getNext() != test)
      current = current->getNext();
   return current;
}
开发者ID:xforever1313,项目名称:sethcommon,代码行数:7,代码来源:TestRegistry.cpp


示例3: getLastTest

Utest* TestRegistry::getLastTest()
{
   Utest* current = tests;
   while (!current->getNext()->isNull())
      current = current->getNext();
   return current;
}
开发者ID:xforever1313,项目名称:sethcommon,代码行数:7,代码来源:TestRegistry.cpp


示例4: printCurrentTestStarted

void JUnitTestOutput::printCurrentTestStarted(const Utest& test)
{
	results_.testCount_++;
	results_.group_ = test.getGroup();
	results_.startTime_ = GetPlatformSpecificTimeInMillis();
	
	if (results_.tail_ == 0) {
		results_.head_ = results_.tail_ = new JUnitTestCaseResultNode;
	}
	else {
		results_.tail_->next_ = new JUnitTestCaseResultNode; 
		results_.tail_ = results_.tail_->next_; 
	}
	results_.tail_->name_ = test.getName(); 
}
开发者ID:RobinLiu,项目名称:Test,代码行数:15,代码来源:JUnitTestOutput.cpp


示例5: preTestAction

void MemoryReporterPlugin::preTestAction(Utest& test, TestResult& result)
{
	if (formatter_ == NULL) return;

	initializeAllocator(&mallocAllocator, result);
	initializeAllocator(&newAllocator, result);
	initializeAllocator(&newArrayAllocator, result);

	setGlobalMemoryReportAllocators();

	if (test.getGroup() != currentTestGroup_) {
		formatter_->report_testgroup_start(&result, test);
		currentTestGroup_ = test.getGroup();
	}

	formatter_->report_test_start(&result, test);
}
开发者ID:ykumano,项目名称:TDDforEmbeddedC,代码行数:17,代码来源:MemoryReporterPlugin.cpp


示例6: postTestAction

void MemoryReporterPlugin::postTestAction(Utest& test, TestResult& result)
{
	if (formatter_ == NULL) return;

	removeGlobalMemoryReportAllocators();
	formatter_->report_test_end(&result, test);

	if (test.getNext()->getGroup() != currentTestGroup_)
		formatter_->report_testgroup_end(&result, test);
}
开发者ID:ykumano,项目名称:TDDforEmbeddedC,代码行数:10,代码来源:MemoryReporterPlugin.cpp


示例7: createTest

void UtestShell::runOneTestInCurrentProcess(TestPlugin* plugin, TestResult& result)
{
    plugin->runAllPreTestAction(*this, result);

    //save test context, so that test class can be tested
    UtestShell* savedTest = UtestShell::getCurrent();
    TestResult* savedResult = UtestShell::getTestResult();

    result.countRun();
    UtestShell::setTestResult(&result);
    UtestShell::setCurrentTest(this);

    Utest* testToRun = createTest();
    testToRun->run();
    destroyTest(testToRun);

    UtestShell::setCurrentTest(savedTest);
    UtestShell::setTestResult(savedResult);

    plugin->runAllPostTestAction(*this, result);
}
开发者ID:KevinWMatthews,项目名称:cpputest,代码行数:21,代码来源:Utest.cpp


示例8: printCurrentTestStarted

void TestOutput::printCurrentTestStarted(const Utest& test)
{
	if (verbose_) print(test.getFormattedName().asCharString());
}
开发者ID:HackLinux,项目名称:KernelModuleTDDExperiment,代码行数:4,代码来源:TestOutput.cpp



注:本文中的Utest类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ UtestShell类代码示例发布时间:2022-05-31
下一篇:
C++ Usuario类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap