1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmtestenv/mmtestfwunittest/src/tsu_mmtsth02/TSU_MmTsthStep02.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,59 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +// EPOC includes
1.20 +#include <e32base.h>
1.21 +
1.22 +// Test system includes
1.23 +#include <testframework.h>
1.24 +#include "script.h"
1.25 +#include "parseline.h"
1.26 +
1.27 +#include "TSU_MmTsthStep02.h"
1.28 +#include "TSU_MmTsthSuite02.h"
1.29 +
1.30 +// preamble
1.31 +TVerdict RTSUMmTsthStep02::OpenL()
1.32 + {
1.33 + // initialise iScript and associated objects for tests. if this fails, tests are
1.34 + // inconclusive (will not run)
1.35 + iLogClient = iSuite->LogSystem();
1.36 + TRAPD(err, iTestUtils = CTestUtils::NewL(iLogClient));
1.37 + if(err != KErrNone)
1.38 + {
1.39 + ERR_PRINTF2(_L("Could not initialise CTestUtils, error code %d"), err);
1.40 + return iTestStepResult = EInconclusive;
1.41 + }
1.42 +
1.43 + // NB : CScript has a NewL() for completion only : it is through NewLC that the Test
1.44 + // Framework initialises its CScripts
1.45 + TInt64 defTime(-1);
1.46 + TRAPD(err2, iTestScript = CScript::NewLC(iTestUtils, iLogClient, defTime, KNullDesC);
1.47 + CleanupStack::Pop(iTestScript) );
1.48 + if(err2 != KErrNone)
1.49 + {
1.50 + ERR_PRINTF2(_L("Could not initialise CScript, error code %d"), err2);
1.51 + return iTestStepResult = EInconclusive;
1.52 + }
1.53 +
1.54 + return iTestStepResult = EPass;
1.55 + }
1.56 +
1.57 +// postamble
1.58 +void RTSUMmTsthStep02::Close()
1.59 + {
1.60 + delete iTestScript;
1.61 + delete iTestUtils;
1.62 + }