コード例 #1
0
TVerdict CRandomBlobStep::doTestStepL()
	{
	__UHEAP_MARK;
	InitializeL();
	_LIT(KDoStepPrint,"CRandomBlobStep::doTestStepL()");
	INFO_PRINTF1(KDoStepPrint);  //Block start 
	
	const TDesC &run = ConfigSection();
	
	if( run == KRun1 )
		{
		INFO_PRINTF1(KTest1);
		BlobTestL();
		}
	else if( run == KRun2 )
		{
		INFO_PRINTF1(KTest2);
		MaxBlobTestL();
		}
	else
		{
		MissingTestPanic();
		}
	Cleanup();
	__UHEAP_MARKEND;

	return TestStepResult();
	}
コード例 #2
0
TVerdict CNotificationStep::doTestStepL()
	{
	__UHEAP_MARK;
	InitializeL();
	
	_LIT(KDoStepPrint,"CNotificationStep::doTestStepL()");
	INFO_PRINTF1(KDoStepPrint);  //Block start 
	iIterate->Reset();
	
	CActiveScheduler::Add(iMyActive);
	ClearNotifications();
	
	const TDesC &run = ConfigSection();
	
	if( run == KRun1 )
		{
		UnkownChangeTestL();
		}
	else if( run == KRun2 )
		{
		TransactionUnkownChangeTestL( EFalse );
		}
	else if( run == KRun3 )
		{
		PlusTransactionUnkownChangeTestL( EFalse );
		}
	else if( run == KRun4 )
		{
		TransactionUnkownChangeTestL( ETrue );
		}
	else if( run == KRun5 )
		{
		PlusTransactionUnkownChangeTestL( ETrue );
		}
	else
		{
		MissingTestPanic();
		}

	Cleanup();
	__UHEAP_MARKEND;

	return TestStepResult();
	}
コード例 #3
0
TVerdict CCompactAndRecoverStep::doTestStepL()
	{
#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__
	return EPass;
#else	
	__UHEAP_MARK;
	InitializeL();
	_LIT(KPrintStart, "CCompactAndRecoverStep::doTestStepL()");
	INFO_PRINTF1(KPrintStart);  //Block start 
	iIterate->Reset();

	const TDesC &run = ConfigSection();
	
	if( run.Find( KRun1 ) > KErrNotFound )
		{
		INFO_PRINTF1( KTest1 );
		TestWrapperL( &CCompactAndRecoverStep::CRUDOperationsL, KErrNotReady, KErrNotReady, KErrNone, KErrNotReady );
		}
	else if( run.Find( KRun2 ) > KErrNotFound )
		{
		INFO_PRINTF1( KTest2 );
		TestWrapperL(  &CCompactAndRecoverStep::TransactionOperations, KErrNotReady, KErrNotReady, KErrNone, KErrNotReady );
		}
	else if( run.Find( KRun3 ) > KErrNotFound )
		{
		INFO_PRINTF1( KTest3 );
		TestWrapperL(  &CCompactAndRecoverStep::SimpleOperationsL, KErrAccessDenied, KErrNone, KErrNone, KErrNone );
		}
	else if( run.Find( KRun4 ) > KErrNotFound )
		{
		INFO_PRINTF1( KTest4 );
		OpenAsyncTestL();
		}
	else
		{
		MissingTestPanic();
		}
		
	Cleanup();
	__UHEAP_MARKEND;

	return TestStepResult();
#endif
	}
コード例 #4
0
/**
create active object and test array
append contact lock or transaction lock test as necessary
*/	
void CConcurrentTimeOutNotifierStep::PreTestL()
	{
	iMyActive = new (ELeave) CConcurrentTimeOutNotifierStep::CConcurrentTimeOutNotifierMyActive( this );
	iTests = new(ELeave) RArray< void (CConcurrentTimeOutNotifierStep::*)() >();
	
	const TDesC &run = ConfigSection();
	
	if( run == KRun1 )
		{
		iTests->AppendL( &CConcurrentTimeOutNotifierStep::LockContactTestL );
		}
	else if( run == KRun2 )
		{
		iTests->AppendL( &CConcurrentTimeOutNotifierStep::LockDatabaseTestL );
		}
	else
		{
		MissingTestPanic();
		}
	}
コード例 #5
0
void CConcurrentNotifierStep::PreTestL()
	{
	_LIT(KPretestPrint,"I am in CConcurrentNotifierStep PreTestL()");
	INFO_PRINTF1(KPretestPrint);
	GetIntFromConfig( KNotifier, KClients, iManyListeners );
	iMyActive = new (ELeave) CConcurrentNotifierStep::CConcurrentNotifierActive( this );
	iTests = new(ELeave) RArray< void (CConcurrentNotifierStep::*)() >();

	ClearSharedL();
	SetSharedTextL(KSharedNextTest, KNullDesC, EFalse);

	const TDesC &run = ConfigSection();

	if( run == KRun1 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::UpdateTestL );
		}
	else if( run == KRun2 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::CommitTestL );
		}
	else if( run == KRun3 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::AddTestL );
		}
	else if( run == KRun4 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::DeleteTestL );
		}
	else if( run == KRun5 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::CloseTablesTestL );
		iTests->AppendL( &CConcurrentNotifierStep::OpenTablesTestL );
		}
	else if( run == KRun7 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::OwnCardTestL );
		iTests->AppendL( &CConcurrentNotifierStep::ChangeOwnCardTestL );
		iTests->AppendL( &CConcurrentNotifierStep::OwnCardDeleteTestL );
		}
	else if( run == KRun9 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::SpeedDialTestL );
		iTests->AppendL( &CConcurrentNotifierStep::RemoveSpeedDialTestL );
		iTests->AppendL( &CConcurrentNotifierStep::DeleteSpeedDialTestL );
		}
	else if( run == KRun10 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::SingleCommitTransactionTestL );
		}
	else if( run == KRun11 )
		{
		iRevert = ETrue;
		iTests->AppendL( &CConcurrentNotifierStep::SingleCommitTransactionTestL );
		}
	else if( run == KRun12 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::MultipleChangeTransactionTestL );
		}
	else if( run == KRun13 )
		{
		RProcess().SetPriority(EPriorityBackground);
		iRevert = ETrue;
		iTests->AppendL( &CConcurrentNotifierStep::MultipleChangeTransactionTestL );
		RProcess().SetPriority(EPriorityForeground);
		}
	else if( run == KRun14 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::EmptyTransactionTestL );
		}
	else if( run == KRun15 )
		{
		RProcess().SetPriority(EPriorityBackground);
		iRevert = ETrue;
		iTests->AppendL( &CConcurrentNotifierStep::EmptyTransactionTestL );
		RProcess().SetPriority(EPriorityForeground);
		}
	else if( run == KRun16 )
		{
		iTests->AppendL( &CConcurrentNotifierStep::UnkownChangeTestL );
		}
	else
		{
		MissingTestPanic();
		}

	}
コード例 #6
0
TVerdict CTransactionsStep::doTestStepL()
/**
 * @return - TVerdict code
 * Override of base class pure virtual
 * Our implementation only gets called if the base class doTestStepPreambleL() did
 * not leave. That being the case, the current test result value will be EPass.
 */
	{	
	__UHEAP_MARK;
	InitializeL();
	_LIT(KStartTest,"CTransactionsStep::doTestStepL()");
	ALLPRINT(KStartTest);  //Block start 
	iIterate->Reset();
	
	const TDesC &run = ConfigSection();
	
	if( run == KRun1 )
		{
		ALLPRINT(KTest1);
		NestedTransactionTestL();
		}
	else if( run == KRun2 )
		{
		ALLPRINT(KTest2);
		EmptyCommitTransactionTestL(EFalse);
		}
	else if( run == KRun3 )
		{
		ALLPRINT(KTest3);
		EmptyCommitTransactionTestL(ETrue);
		}
	else if( run == KRun4 )
		{
		ALLPRINT(KTest4);
		UpdateCommitTransactionTestL(EFalse);
		}
	else if( run == KRun5 )
		{
		ALLPRINT(KTest5);
		UpdateCommitTransactionTestL(ETrue);
		}
	else if( run == KRun6 )
		{
		ALLPRINT(KTest6);
		CreateCommitTransactionTestL(EFalse);
		}
	else if( run == KRun7 )
		{
		ALLPRINT(KTest7);
		CreateCommitTransactionTestL(ETrue);
		}
	else if( run == KRun8 )
		{
		ALLPRINT(KTest8);
		DeleteCommitTransactionTestL(EFalse);
		}
	else if( run == KRun9 )
		{
		ALLPRINT(KTest9);
		DeleteCommitTransactionTestL(ETrue);
		}
	else if( run == KRun10 )
		{
		ALLPRINT(KTest10);
		ManyUpdateCommitTransactionTestL(EFalse);
		}
	else if( run == KRun11 )
		{
		ALLPRINT(KTest11);
		ManyUpdateCommitTransactionTestL(ETrue);
		}
	else if( run == KRun12 )
		{
		ALLPRINT(KTest12);
		EmptyTransactionPerformanceTestL( EFalse);
		}
	else if( run == KRun13 )
		{
		ALLPRINT(KTest13);
		EmptyTransactionPerformanceTestL( ETrue );
		}
	else if( run == KRun14 )
		{
		ALLPRINT(KTest14);
		MediumTransactionPerformanceTestL( EFalse);
		}
	else if( run == KRun15 )
		{
		ALLPRINT(KTest15);
		MediumTransactionPerformanceTestL( ETrue);
		}
	else if( run == KRun16 )
		{
		ALLPRINT(KTest16);
		FullTransactionPerformanceTestL( EFalse);
		}
	else if( run == KRun17 )
		{
		ALLPRINT(KTest17);
		FullTransactionPerformanceTestL( ETrue);
		}
	else if( run == KRun18 )
		{
		ALLPRINT(KTest18);
		MultipleCommitTestL( EFalse);
		}
	else if( run == KRun19 )
		{
		ALLPRINT(KTest19);
		MultipleCommitTestL( ETrue);
		}
	else
		{
		MissingTestPanic();
		}

	Cleanup();
	__UHEAP_MARKEND;

	return TestStepResult();
	}