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);
}
Exemplo n.º 2
0
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(); 
}