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