1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cteststepusbromconfig003.h" |
|
19 #include <c32comm.h> |
|
20 #include <AcmInterface.h> |
|
21 |
|
22 CTestStepUsbRomConfig003::~CTestStepUsbRomConfig003() |
|
23 { |
|
24 } |
|
25 |
|
26 CTestStepUsbRomConfig003::CTestStepUsbRomConfig003 |
|
27 (CTestServer& aParent) |
|
28 : CTestStepUsbRomConfigBase(aParent) |
|
29 { |
|
30 SetTestStepName(KTestName003); |
|
31 } |
|
32 |
|
33 /** |
|
34 Static Constructor |
|
35 Note the lack of ELeave. This means that having insufficient memory will return NULL; |
|
36 */ |
|
37 CTestStepUsbRomConfig003* CTestStepUsbRomConfig003::New |
|
38 (CTestServer& aParent) |
|
39 { |
|
40 return new CTestStepUsbRomConfig003(aParent); |
|
41 } |
|
42 |
|
43 /** |
|
44 See USB_ROMCONFIG_003.script |
|
45 */ |
|
46 TVerdict CTestStepUsbRomConfig003::doTestStepL() |
|
47 { |
|
48 INFO_PRINTF1(\ |
|
49 _L(">>CTestStepUsbRomConfig003::doTestStepL()")); |
|
50 |
|
51 const TInt expectedError = ( iUsbExcluded ? KErrNotFound : KErrNone ); |
|
52 const TDesC* expectedErrorDesPtr = ( iUsbExcluded ? &KErrNotFoundLit : &KErrNoneLit ); |
|
53 |
|
54 RCommServ commServ; |
|
55 commServ.Connect(); |
|
56 TInt err = commServ.LoadCommModule(KAcmCsyName); |
|
57 if ( err!=expectedError ) |
|
58 { |
|
59 INFO_PRINTF5(\ |
|
60 _L("Failed: Expected %S(%d) and got %d when calling LoadCommModule(%S)"),\ |
|
61 expectedErrorDesPtr, expectedError, err, &KAcmCsyName); |
|
62 SetTestStepResult(EFail); |
|
63 } |
|
64 commServ.Close(); |
|
65 |
|
66 INFO_PRINTF1(\ |
|
67 _L("<<CTestStepUsbRomConfig003::doTestStepL()")); |
|
68 CheckAndSetTestResult(); |
|
69 return TestStepResult(); |
|
70 } |
|
71 |
|
72 // EOF |
|