|
1 // Copyright (c) 2002-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 // EPOC includes |
|
17 #include <e32base.h> |
|
18 |
|
19 // Test system includes |
|
20 #include <testframework.h> |
|
21 #include "script.h" |
|
22 #include "parseline.h" |
|
23 |
|
24 #include "TSU_MmTsthStep02.h" |
|
25 #include "TSU_MmTsthSuite02.h" |
|
26 |
|
27 // preamble |
|
28 TVerdict RTSUMmTsthStep02::OpenL() |
|
29 { |
|
30 // initialise iScript and associated objects for tests. if this fails, tests are |
|
31 // inconclusive (will not run) |
|
32 iLogClient = iSuite->LogSystem(); |
|
33 TRAPD(err, iTestUtils = CTestUtils::NewL(iLogClient)); |
|
34 if(err != KErrNone) |
|
35 { |
|
36 ERR_PRINTF2(_L("Could not initialise CTestUtils, error code %d"), err); |
|
37 return iTestStepResult = EInconclusive; |
|
38 } |
|
39 |
|
40 // NB : CScript has a NewL() for completion only : it is through NewLC that the Test |
|
41 // Framework initialises its CScripts |
|
42 TInt64 defTime(-1); |
|
43 TRAPD(err2, iTestScript = CScript::NewLC(iTestUtils, iLogClient, defTime, KNullDesC); |
|
44 CleanupStack::Pop(iTestScript) ); |
|
45 if(err2 != KErrNone) |
|
46 { |
|
47 ERR_PRINTF2(_L("Could not initialise CScript, error code %d"), err2); |
|
48 return iTestStepResult = EInconclusive; |
|
49 } |
|
50 |
|
51 return iTestStepResult = EPass; |
|
52 } |
|
53 |
|
54 // postamble |
|
55 void RTSUMmTsthStep02::Close() |
|
56 { |
|
57 delete iTestScript; |
|
58 delete iTestUtils; |
|
59 } |