コード例 #1
0
int main(int argc, void** argv)
	{
	UNUSED_ARG(argc);
	UNUSED_ARG(argv);

	TestOpen("t_sqliteapi test");
	TestTitle();

	TestHeapMark();
		
	TestEnvCreate();
	
	TestSqliteApi();
	TwoReadersTest();
	TwoWritersTest();
	ThreadsTest();
	TwoSyncThreadsTest();
	TwoConnectionsTest();
	UdfTest();
	
	TestEnvDestroy();

	TestHeapMarkEnd();

	TestEnd();
	TestClose();
	
	return 0;	
	}
コード例 #2
0
STATUS DdmTestChaosFile::StartTest(void *context) 
{
	ChaosFile cf0(tcf_names[0]);

	if (cf0.IsValid())
	{
		printf("Persistence check OK!\n");
		return OK;
	}	
	TestCreation();
	TestClose();
	TestOpen();
		
	for (int i=0; i < 30; ++i)
	{
		if (i != 4)
		{
			printf("Closing #%d...", i);
			if (OK == cf[i]->Close())
				printf("Sucess!\n");
			else
				printf("Failed!\n");
		}
	}

	TestReadWrite();
		
	return OK;
}
コード例 #3
0
//*******************************************************************************
// Method      : CTestAppConsole::RunTest1()
// Purpose     : 
// Parameters  : 
// Return Value: 
//*******************************************************************************
void CTestAppConsole::RunTest1()
    {
    SetUpRtpStack();

    TInt cells = User::CountAllocCells();
    iConsole->Printf( _L("Allocated cells: %d\n"), cells);

    iKeepgoingUL = ETrue;
    CMccSymSubthreadClient* ul_client = CMccSymSubthreadClient::NewL(this);
    
    iKeepgoingDL = ETrue;
    CMccSymSubthreadClient* dl_client = CMccSymSubthreadClient::NewL(this);

    if(!ul_client)
        {
        iKeepgoingUL = EFalse;
        }

    if(!dl_client)
        {
        iKeepgoingDL = EFalse;
        }

    iUlError = KErrNone;
    iDlError = KErrNone;

    if(iKeepgoingUL && iKeepgoingDL)
        {
        iConsole->Printf( _L("Allocations OK for UL & DL, going on...\n") );
        }
    else
        {
        if(!iKeepgoingDL)
            {
            iConsole->Printf( _L("DL Allocations failed...\n") );
            }
        else if(!iKeepgoingDL)
            {
            iConsole->Printf( _L("UL Allocations failed...\n") );
            }
        else
            {
            iConsole->Printf( _L("DL & UL Allocations failed!!!\n") );
            }
        }
    
    for(TInt k = 0; k < 1; k++)
        {
        TestOpen( ul_client, dl_client );

        TestParameters( ul_client, dl_client );

        TestPrepare( ul_client, dl_client );

        TestControls( ul_client, dl_client );
        }

    if(iKeepgoingDL && iKeepgoingDL)
        {
        iConsole->Printf( _L("All tests ran OK\n") );
        }
    else
        {
        iConsole->Printf( _L("Not all tests done\n") );
        }

    
    delete ul_client;
    delete dl_client;

    cells = User::CountAllocCells();
    iConsole->Printf( _L("Allocated cells: %d\n"), cells);
    
    iConsole->Getch();
   };