|
1 /* |
|
2 * Copyright (c) 2007-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: Test for control for the slideshow |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // CLASS HEADER |
|
22 #include "t_cshweffects.h" |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <digia/eunit/CEUnitTestSuite.h> |
|
26 |
|
27 // CLASS UNDER TEST |
|
28 #include "shwcrossfadeeffect.h" |
|
29 #include "shwzoomandpaneffect.h" |
|
30 |
|
31 MShwEffect* CreateCrossfadeL() |
|
32 { |
|
33 // create the normal zoom and pan |
|
34 MShwEffect* eff = CShwCrossFadeEffect::NewLC(); |
|
35 CleanupStack::Pop(); |
|
36 return eff; |
|
37 } |
|
38 |
|
39 MShwEffect* CreateZoomAndPanL() |
|
40 { |
|
41 MShwEffect* eff = CShwZoomAndPanEffect::NewLC(); |
|
42 CleanupStack::Pop(); |
|
43 return eff; |
|
44 } |
|
45 |
|
46 EXPORT_C MEUnitTest* CreateTestSuiteL() |
|
47 { |
|
48 // Create a root suite to contain tests for both the effects |
|
49 CEUnitTestSuite* rootSuite = |
|
50 CEUnitTestSuite::NewLC( _L("ShwEffect Unit Tests") ); |
|
51 |
|
52 // Note that NewLC leaves the object in the cleanupstack. |
|
53 rootSuite->AddL( T_CShwEffects::NewLC( &CreateCrossfadeL ) ); |
|
54 CleanupStack::Pop(); // T_CShwEffects instance |
|
55 |
|
56 rootSuite->AddL( T_CShwEffects::NewLC( &CreateZoomAndPanL ) ); |
|
57 CleanupStack::Pop(); // T_CShwEffects instance |
|
58 |
|
59 CleanupStack::Pop( rootSuite ); // rootSuite instance |
|
60 |
|
61 return rootSuite; |
|
62 } |
|
63 |
|
64 // END OF FILE |