|
1 /* |
|
2 * Copyright (c) 2007 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: Unit tests |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __UT_CGLXITEMLIST_H__ |
|
22 #define __UT_CGLXITEMLIST_H__ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <digia/eunit/ceunittestsuiteclass.h> |
|
26 #include <digia/eunit/eunitdecorators.h> |
|
27 |
|
28 // INTERNAL INCLUDES |
|
29 #include "glxitemlist.h" |
|
30 #include "glxlistreconstruction.h" |
|
31 #include "glxlisttestbase.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 |
|
35 /** |
|
36 * Reconstruction of an item list |
|
37 */ |
|
38 NONSHARABLE_CLASS( CGlxItemListReconstruction ) : public CGlxListReconstruction< CGlxItemList > |
|
39 { |
|
40 public: |
|
41 static CGlxItemListReconstruction* NewL( TInt aReservationCount = 400 ); |
|
42 // From CGlxListReconstructionBase |
|
43 TBool ReconstructionEquals() const; |
|
44 }; |
|
45 |
|
46 /** |
|
47 * EUnit test suite |
|
48 */ |
|
49 NONSHARABLE_CLASS( ut_CGlxItemList ) : |
|
50 public CGlxListTestBase< CGlxItemList, CGlxItemListReconstruction > |
|
51 { |
|
52 public: // Constructors and destructors |
|
53 /** |
|
54 * Two phase construction |
|
55 */ |
|
56 static ut_CGlxItemList* NewL(); |
|
57 static ut_CGlxItemList* NewLC(); |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 ~ut_CGlxItemList(); |
|
62 void ConstructL(); |
|
63 |
|
64 private: // Constructors and destructors |
|
65 ut_CGlxItemList(); |
|
66 |
|
67 private: // New methods |
|
68 void SetupL(); |
|
69 void Teardown(); |
|
70 |
|
71 void T_SetContentsLL(); |
|
72 void T_RemoveL(); |
|
73 void T_RemoveReferenceL(); |
|
74 void T_CountL(); |
|
75 void T_ItemL(); |
|
76 void T_IndexL(); |
|
77 void T_IdSpaceIdL(); |
|
78 |
|
79 private: // Data |
|
80 EUNIT_DECLARE_TEST_TABLE; |
|
81 }; |
|
82 |
|
83 #endif // __UT_CGLXITEMLIST_H__ |
|
84 |