|
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: STIF testing for MPX Collection Playlist |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <Stiftestinterface.h> |
|
21 #include <SettingServerClient.h> |
|
22 #include "mpxcollectionplaylisttest.h" |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // CMPXCollectionPlaylistTest::CMPXCollectionPlaylistTest |
|
28 // C++ default constructor can NOT contain any code, that |
|
29 // might leave. |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CMPXCollectionPlaylistTest::CMPXCollectionPlaylistTest( |
|
33 CTestModuleIf& aTestModuleIf ): |
|
34 CScriptBase( aTestModuleIf ) |
|
35 { |
|
36 iCollectionPlaylist = NULL; |
|
37 } |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // CMPXCollectionPlaylistTest::ConstructL |
|
41 // Symbian 2nd phase constructor can leave. |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 void CMPXCollectionPlaylistTest::ConstructL() |
|
45 { |
|
46 iLog = CStifLogger::NewL( KMPXCollectionPlaylistTestLogPath, |
|
47 KMPXCollectionPlaylistTestLogFile, |
|
48 CStifLogger::ETxt, |
|
49 CStifLogger::EFile, |
|
50 EFalse ); |
|
51 // Print title of the test case |
|
52 TName title; |
|
53 TestModuleIf().GetTestCaseTitleL(title); |
|
54 iLog->Log(_L(" ")); |
|
55 iLog->Log(_L("[Title] %S"), &title); |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // CMPXCollectionPlaylistTest::NewL |
|
60 // Two-phased constructor. |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 CMPXCollectionPlaylistTest* CMPXCollectionPlaylistTest::NewL( |
|
64 CTestModuleIf& aTestModuleIf ) |
|
65 { |
|
66 CMPXCollectionPlaylistTest* self = new (ELeave) CMPXCollectionPlaylistTest( aTestModuleIf ); |
|
67 |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop(); |
|
71 return self; |
|
72 } |
|
73 |
|
74 // Destructor |
|
75 CMPXCollectionPlaylistTest::~CMPXCollectionPlaylistTest() |
|
76 { |
|
77 // Delete resources allocated from test methods |
|
78 Delete(); |
|
79 // Delete logger |
|
80 delete iLog; |
|
81 } |
|
82 |
|
83 // ======== GLOBAL FUNCTIONS ======== |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // LibEntryL is a polymorphic Dll entry point. |
|
87 // Returns: CScriptBase: New CScriptBase derived object |
|
88 // --------------------------------------------------------------------------- |
|
89 // |
|
90 EXPORT_C CScriptBase* LibEntryL( |
|
91 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
92 { |
|
93 return ( CScriptBase* ) CMPXCollectionPlaylistTest::NewL( aTestModuleIf ); |
|
94 } |