phonebookengines/contactsmodel/tsrc/t_view2.cpp
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // under the terms of "Eclipse Public License v1.0"
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 //
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
    15 
    18 
    16 #include <e32std.h>
    19 #include <e32std.h>
    17 #include <e32test.h>
    20 #include <e32test.h>
    18 #include <collate.h>
    21 #include <collate.h>
    19 #include <cntdb.h>
    22 #include <cntdb.h>
    20 #include <cntitem.h>
    23 #include <cntitem.h>
    21 #include <cntfldst.h>
    24 #include <cntfldst.h>
    22 #include "t_utils2.h"
    25 #include "t_utils2.h"
    23 #include "t_view2.h"
    26 #include "t_view2.h"
    24 #include "T_UTILS.H"
    27 #include "t_utils.h"
    25 #include <badesca.h>
    28 #include <badesca.h>
    26 
    29 
    27 //#define VERBOSE_LOGGING
    30 //#define VERBOSE_LOGGING
    28 
    31 
    29 // Test Macro
    32 // Test Macro
    31 
    34 
    32 //
    35 //
    33 // Constants.
    36 // Constants.
    34 //
    37 //
    35 
    38 
    36 _LIT(KTestName,"@SYMTESTCaseID:PIM-T-VIEW2-0001 t_view2");
    39 _LIT(KTestName,"t_view2");
    37 _LIT(KLogFileName,"t_view2.log");
    40 _LIT(KLogFileName,"t_view2.log");
    38 
    41 
    39 _LIT(KDbFileName,"c:t_view2.cdb");
    42 _LIT(KDbFileName,"c:t_view2.cdb");
    40 
    43 
    41 _LIT(KLocalViewName,"LocalView");
    44 _LIT(KLocalViewName,"LocalView");
  1384 		aView.ContactAtL(ii);
  1387 		aView.ContactAtL(ii);
  1385 		}
  1388 		}
  1386 	CCntTest::ProfileEnd(0);
  1389 	CCntTest::ProfileEnd(0);
  1387 	TCntProfile profile[1];
  1390 	TCntProfile profile[1];
  1388 	CCntTest::ProfileResult(profile,0,1);
  1391 	CCntTest::ProfileResult(profile,0,1);
  1389 	TReal result = profile[0].iTime;//1000000.0;
  1392 	TReal result = profile[0].iTime;///1000000.0;
  1390 	RDebug::Print(_L("Profile ContactAt Time Taken: %g"),result);
  1393 	RDebug::Print(_L("Profile ContactAt Time Taken: %g"),result);
  1391 	}
  1394 	}
  1392 
  1395 
  1393 void CViewExerciser::ExerciseViewL(CSortChecker::TSortOrder aSortOrder,CContactViewBase& aView)
  1396 void CViewExerciser::ExerciseViewL(CSortChecker::TSortOrder aSortOrder,CContactViewBase& aView)
  1394 	{
  1397 	{
  1773 		CActiveScheduler::Install(scheduler);
  1776 		CActiveScheduler::Install(scheduler);
  1774 		CTrapCleanup* cleanup=CTrapCleanup::New();
  1777 		CTrapCleanup* cleanup=CTrapCleanup::New();
  1775 		if (cleanup)
  1778 		if (cleanup)
  1776 			{
  1779 			{
  1777 			CTestConductor* tester=NULL;
  1780 			CTestConductor* tester=NULL;
  1778 			test.Start(KTestName);
  1781 			test.Start(_L("@SYMTESTCaseID:PIM-T-VIEW2-0001 t_view2"));
  1779 
  1782 
  1780 			TRAPD(err,tester=CTestConductor::NewL());
  1783 			TRAPD(err,tester=CTestConductor::NewL());
  1781 			__ASSERT_ALWAYS(err == KErrNone, User::Invariant());
  1784 			__ASSERT_ALWAYS(err == KErrNone, User::Invariant());
  1782 			test.End();
  1785 			test.End();
  1783 			delete tester;
  1786 			delete tester;