Ejemplo n.º 1
0
// All files must have the main function.
int main(int UNUSED(argc), char **UNUSED(argv))
{
  Result result;
  hid_t file_id;

  InitResult(&result);
  file_id = CreateTestFile();

  if (file_id < 0)
  {
    printf("Fail to open temporary test file: %s\n", TEST_FILE);
    Clean(file_id);
    return EXIT_FAILURE;
  }

  CheckTestResult(TestRead(file_id), &result);

  Clean(file_id);
  DisplayResult(&result);

  return result.status;
}
Ejemplo n.º 2
0
EXPORT_C TVerdict RAsyncTestStep::DoTestStepL()
	{
	// allow recalls to same test step (?), so re-initialise the basic variables. Can't delete
	// as if in that case, old heap would be dead
	iReason = KErrNone;
	iResult = EPass;
	iScheduler = NULL;
	iActiveSchedulerWait = NULL;
	
	iScheduler = new (ELeave) CAsyncTestActiveScheduler(*this);	
	CActiveScheduler::Install(iScheduler);
	iActiveSchedulerWait = new (ELeave) CActiveSchedulerWait();
	
	// arrange for DoCallBack() to be called as the first thing. Use low priority to reduce
	// the overhead of an extra AO on everything else
	TCallBack callback (CallBack, this);
	iStartAO = NULL;
	iStartAO = new (ELeave) CAsyncCallBack (callback, CActive::EPriorityIdle); 
	iStartAO->Call();
	
	iStarted = ETrue; // obviously do this before we start, as can't once it is
	iActiveSchedulerWait->Start();
	return CheckTestResult();
	}