|
1 // Copyright (c) 2006-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 the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // $FILENAME.cpp |
|
15 // This file was generated automatically from the template eventteststepsource.tmpl |
|
16 // on $GENERATE_TIME_STAMP |
|
17 // Implementation of test step $CLASSNAME. |
|
18 // |
|
19 // |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent |
|
24 */ |
|
25 |
|
26 #include "$FILENAME.h" |
|
27 #include <TEFSharedData.h> |
|
28 #include <bluetooth\hci\$EVENTFILENAME.h> |
|
29 |
|
30 #include <bluetooth\hci\hardwareerrorevent.h> |
|
31 #include <bluetooth\hci\hciopcodes.h> |
|
32 #include <bluetooth\hci\writevoicesettingcompleteevent.h> |
|
33 |
|
34 |
|
35 $CLASSNAME::$CLASSNAME() |
|
36 { |
|
37 SetTestStepName(K${TESTSTEPNAME}); |
|
38 } |
|
39 |
|
40 $CLASSNAME::~$CLASSNAME() |
|
41 { |
|
42 } |
|
43 |
|
44 TVerdict $CLASSNAME::doTestStepL() |
|
45 { |
|
46 if(TestStepResult() != EPass) |
|
47 { |
|
48 return TestStepResult(); |
|
49 } |
|
50 |
|
51 SetTestStepResult(EFail); |
|
52 |
|
53 $EVENTINITPARAMS |
|
54 $EVENTNAME* event = new $EVENTNAME($EVENTPARAMS); |
|
55 CleanupStack::PushL(event); |
|
56 |
|
57 if(event->ErrorCode() != EOK) |
|
58 { |
|
59 return TestStepResult(); |
|
60 } |
|
61 |
|
62 if(event->EventCode() != $EVENTCODE) |
|
63 { |
|
64 return TestStepResult(); |
|
65 } |
|
66 |
|
67 $CHECK_EVENT_ACCESSORS |
|
68 |
|
69 $EVENTNAME::Cast(*event); |
|
70 |
|
71 // Will panic if not THardwareErrorEvent |
|
72 THardwareErrorEvent::Cast(*event); |
|
73 |
|
74 // Will panic if not TWriteVoiceSettingCompleteEvent |
|
75 TWriteVoiceSettingCompleteEvent::Cast(*event); |
|
76 |
|
77 CleanupStack::PopAndDestroy(1); |
|
78 SetTestStepResult(EPass); |
|
79 return TestStepResult(); |
|
80 } |