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