phonebookengines_old/contactsmodel/tsrc/cntmodel2/T_CAsyncTestMain.cpp
branchRCL_3
changeset 19 5b6f26637ad3
equal deleted inserted replaced
18:d4f567ce2e7c 19:5b6f26637ad3
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 #include "T_CAsyncTest.h"
       
    18 
       
    19 void RunTestL()
       
    20 	{
       
    21 	CAsyncTest* asyncTest = CAsyncTest::NewLC();
       
    22 	CleanupStack::PopAndDestroy(asyncTest);
       
    23 	asyncTest = NULL;
       
    24 	}
       
    25 
       
    26 
       
    27 GLDEF_C TInt E32Main()
       
    28 	{
       
    29 	__UHEAP_MARK;
       
    30 	CActiveScheduler* scheduler=new CActiveScheduler;
       
    31 	if (scheduler)
       
    32 		{
       
    33 		CActiveScheduler::Install(scheduler);
       
    34 		CTrapCleanup* cleanup = CTrapCleanup::New();
       
    35 		if (cleanup)
       
    36 			{
       
    37 			TRAPD(err,RunTestL());	
       
    38 			__ASSERT_ALWAYS(err == KErrNone, User::Panic(_L("DBDumper Failed"),err) ); 
       
    39 			delete cleanup;
       
    40 			}
       
    41 		delete scheduler;
       
    42 		}
       
    43 	__UHEAP_MARKEND;
       
    44 	return KErrNone;
       
    45     }
       
    46 
       
    47