mpx/tsrc/public/basic/collectionhelpertest/src/collectionhelpertest.cpp
changeset 64 92dbd2a406d9
equal deleted inserted replaced
61:3b098142db83 64:92dbd2a406d9
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Scripted STIF cases for MPXCollectionHelper
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include <Stiftestinterface.h>
       
    20 #include "collectionhelpertest.h"
       
    21 
       
    22 
       
    23 // ============================= LOCAL FUNCTIONS ===============================
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CCollectionHelperTest::CCollectionHelperTest
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CCollectionHelperTest::CCollectionHelperTest( CTestModuleIf& aTestModuleIf ):
       
    35         CBaseTest( aTestModuleIf )
       
    36     {	
       
    37     }
       
    38     
       
    39 CCollectionHelperTest::~CCollectionHelperTest()
       
    40     { 
       
    41     // Delete resources allocated from test methods
       
    42     Delete();
       
    43     
       
    44 	iCollectionUtility->Close();
       
    45 	iCollectionUtility = NULL;
       
    46     }
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // CCollectionHelperTest::NewL
       
    50 // Two-phased constructor.
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 CCollectionHelperTest* CCollectionHelperTest::NewL( 
       
    54     CTestModuleIf& aTestModuleIf )
       
    55     {
       
    56     CCollectionHelperTest* self = new (ELeave) CCollectionHelperTest( aTestModuleIf );
       
    57 
       
    58     CleanupStack::PushL( self );
       
    59     self->ConstructL();
       
    60     CleanupStack::Pop();
       
    61 
       
    62     return self;
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CCollectionHelperTest::ConstructL
       
    67 // Symbian 2nd phase constructor can leave.
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 void CCollectionHelperTest::ConstructL()
       
    71     {        
       
    72     CBaseTest::ConstructL();
       
    73     
       
    74     iLog = CStifLogger::NewL( KCollectionHelperTestLogPath, 
       
    75                       KCollectionHelperTestLogFile,
       
    76                       CStifLogger::ETxt,
       
    77                       CStifLogger::EFile,
       
    78                       EFalse );
       
    79     
       
    80     iCollectionUtility = MMPXCollectionUtility::NewL(this, KMcModeDefault);
       
    81     }
       
    82 
       
    83 
       
    84 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // LibEntryL is a polymorphic Dll entry point.
       
    88 // Returns: CScriptBase: New CScriptBase derived object
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 EXPORT_C CScriptBase* LibEntryL( 
       
    92     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
    93     {
       
    94 
       
    95     return ( CScriptBase* ) CCollectionHelperTest::NewL( aTestModuleIf );
       
    96 
       
    97     }
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // E32Dll is a DLL entry point function.
       
   101 // Returns: KErrNone
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 #ifndef EKA2 // Hide Dll entry point to EKA2
       
   105 GLDEF_C TInt E32Dll(
       
   106     TDllReason /*aReason*/) // Reason code
       
   107     {
       
   108     return(KErrNone);
       
   109 
       
   110     }
       
   111 #endif // EKA2
       
   112 
       
   113 //  End of File