|
1 /* |
|
2 * Copyright (c) 2006 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: Testing glxexclusioniterator |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __T_TGLXEXCLUSIONITERATOR_H__ |
|
22 #define __T_TGLXEXCLUSIONITERATOR_H__ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <digia/eunit/ceunittestsuiteclass.h> |
|
26 #include <digia/eunit/eunitdecorators.h> |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 #include <mglxmedialist.h> |
|
31 #include <glxmedialistiterator.h> |
|
32 #include "tmglxmedialist_stub.h" |
|
33 |
|
34 #include <e32def.h> |
|
35 |
|
36 // CLASS DEFINITION |
|
37 /** |
|
38 * TODO Auto-generated EUnit test suite |
|
39 * |
|
40 */ |
|
41 NONSHARABLE_CLASS( t_tglxexclusioniterator ) |
|
42 : public CEUnitTestSuiteClass |
|
43 { |
|
44 public: // Constructors and destructors |
|
45 |
|
46 /** |
|
47 * Two phase construction |
|
48 */ |
|
49 static t_tglxexclusioniterator* NewL(); |
|
50 static t_tglxexclusioniterator* NewLC(); |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 ~t_tglxexclusioniterator(); |
|
55 |
|
56 private: // Constructors and destructors |
|
57 |
|
58 t_tglxexclusioniterator(); |
|
59 void ConstructL(); |
|
60 |
|
61 private: // New methods |
|
62 |
|
63 void SetupL(); |
|
64 |
|
65 void Teardown(); |
|
66 |
|
67 void T_InRangeL(); |
|
68 |
|
69 // unit test for the InRange function. |
|
70 void TestRange_True(TInt aCount,TInt aIndex,TInt aFocusIndex); |
|
71 // unit test for the InRange function. |
|
72 void TestRange_False(TInt aCount,TInt aIndex,TInt aFocusIndex); |
|
73 |
|
74 // unit test for the plus plus operator |
|
75 void T_PlusPlusL(); |
|
76 |
|
77 void Test( TInt aCount,TInt aIndex,TInt aFocusIndex); |
|
78 |
|
79 |
|
80 private: // Data |
|
81 |
|
82 MGlxMediaListIterator* iVirtualIterator; // To access virtual functions only |
|
83 TMGlxMediaList_Stub iList; |
|
84 TGlxSequentialIterator iIncludeIterator; |
|
85 TGlxFromFocusOutwardIterator iExcludeIterator; |
|
86 TGlxExclusionIterator iExclusionOrder; |
|
87 |
|
88 EUNIT_DECLARE_TEST_TABLE; |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // __T_TGLXEXCLUSIONITERATOR_H__ |
|
93 |
|
94 // End of file |