|
1 /* |
|
2 * Copyright (c) 2002-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 the License "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 |
|
19 |
|
20 |
|
21 #ifndef __BITSETSTEP_H__ |
|
22 #define __BITSETSTEP_H__ |
|
23 |
|
24 #include <test/testexecutestepbase.h> |
|
25 #include "cafstep.h" |
|
26 |
|
27 namespace ContentAccess |
|
28 { |
|
29 class CBitset; |
|
30 } |
|
31 |
|
32 _LIT(KBasicBitsetStep,"BasicBitsetStep"); |
|
33 _LIT(KBitsetListStep,"BitsetListStep"); |
|
34 _LIT(KBitsetEqualityStep,"BitsetEqualityStep"); |
|
35 _LIT(KBitsetCopyStep,"BitsetCopyStep"); |
|
36 _LIT(KBitsetSerialiseStep,"BitsetSerialiseStep"); |
|
37 _LIT(KBitsetPanicStep,"BitsetPanicStep"); |
|
38 |
|
39 // not a step, but baseclass for all bitset tests |
|
40 class CBitsetBaseStep : public CCAFStep |
|
41 { |
|
42 public: |
|
43 CBitsetBaseStep(const TDesC& aStepName); |
|
44 virtual TVerdict doTestStepPreambleL(); |
|
45 virtual TVerdict doTestStepPostambleL(); |
|
46 |
|
47 protected: |
|
48 // Create bitset based on data from the script. |
|
49 // aHeader specifies how the key is formed. eg if aHeader is "left-", |
|
50 // then the key "left-bitcount" specifies how many bits there are, |
|
51 // and "left-bit0" specifies bit0, etc |
|
52 ContentAccess::CBitset* GetBitsetLC(const TDesC& aHeader); |
|
53 }; |
|
54 |
|
55 class CBasicBitsetStep : public CBitsetBaseStep |
|
56 { |
|
57 public: |
|
58 CBasicBitsetStep(); |
|
59 virtual TVerdict doTestStepL(); |
|
60 }; |
|
61 |
|
62 class CBitsetListStep : public CBitsetBaseStep |
|
63 { |
|
64 public: |
|
65 CBitsetListStep(); |
|
66 virtual TVerdict doTestStepL(); |
|
67 }; |
|
68 |
|
69 class CBitsetEqualityStep : public CBitsetBaseStep |
|
70 { |
|
71 public: |
|
72 CBitsetEqualityStep(); |
|
73 virtual TVerdict doTestStepL(); |
|
74 }; |
|
75 |
|
76 class CBitsetCopyStep : public CBitsetBaseStep |
|
77 { |
|
78 public: |
|
79 CBitsetCopyStep(); |
|
80 virtual TVerdict doTestStepL(); |
|
81 }; |
|
82 |
|
83 // Test the internalize and externalize methods |
|
84 class CBitsetSerialiseStep : public CBitsetBaseStep |
|
85 { |
|
86 public: |
|
87 CBitsetSerialiseStep(); |
|
88 virtual TVerdict doTestStepL(); |
|
89 }; |
|
90 |
|
91 // Test the panic when invalid bits are set, cleared or checked |
|
92 class CBitsetPanicStep : public CBitsetBaseStep |
|
93 { |
|
94 public: |
|
95 CBitsetPanicStep(); |
|
96 virtual TVerdict doTestStepL(); |
|
97 }; |
|
98 |
|
99 #endif |