本文整理汇总了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;未经允许,请勿转载。 |
请发表评论