|
1 /* |
|
2 * Copyright (c) 2010 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: This file contains testclass implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 // [Include Files] Begin - Do not remove |
|
19 #include <e32svr.h> |
|
20 #include <StifParser.h> |
|
21 #include <StifTestInterface.h> |
|
22 |
|
23 //!!//!![Repeat Section Begin]::// [Include Files] |
|
24 #include "${class_name}.h" |
|
25 //!!foreach( ${header_file} in ${class_object.IncludeHeaders}) |
|
26 #include <${header_file}> |
|
27 //!!end |
|
28 //!!//!![Repeat Section End]::// [Include Files] |
|
29 // [Include Files] End - Do not remove |
|
30 |
|
31 // ============================ MEMBER FUNCTIONS =============================== |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // C${class_name}::Delete |
|
35 // Delete here all resources allocated and opened from test methods. |
|
36 // Called from destructor. |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 void C${class_name}::Delete() |
|
40 { |
|
41 |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // C${class_name}::RunMethodL |
|
46 // Run specified method. Contains also table of test mothods and their names. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 TInt C${class_name}::RunMethodL(CStifItemParser& aItem) |
|
50 { |
|
51 |
|
52 static TStifFunctionInfo const KFunctions[] = |
|
53 { |
|
54 // Copy this line for every implemented function. |
|
55 // First string is the function name used in TestScripter script file. |
|
56 // Second is the actual implementation member function. |
|
57 |
|
58 // [Test Case Entries] Begin - Do not remove |
|
59 //!!//!![Repeat Section Begin]::// [Test Case Entries] |
|
60 //!!foreach( ${method_object} in ${class_object.Children}) |
|
61 ENTRY( "${class_object.Name}_${method_object.NormalisedName}${RepeatCounter}", C${class_object.Name}::${method_object.NormalisedName}${RepeatCounter} ), |
|
62 //!!end |
|
63 //!!//!![Repeat Section End]::// [Test Case Entries] |
|
64 // [Test Case Entries] End - Do not remove |
|
65 }; |
|
66 |
|
67 const TInt count = sizeof(KFunctions) / sizeof(TStifFunctionInfo); |
|
68 |
|
69 return RunInternalL(KFunctions, count, aItem); |
|
70 |
|
71 } |
|
72 |
|
73 // [Test Case Implement] Begin - Do not remove |
|
74 //!!//!![Repeat Section Begin]::// [Test Case Implement] |
|
75 //!!foreach( ${method_object} in ${class_object.Children}) |
|
76 TInt C${class_name}::${method_object.NormalisedName}${RepeatCounter}(CStifItemParser& aItem) |
|
77 { |
|
78 STIF_ASSERT_LEAVES(_L("This test case is unimplemented.")); |
|
79 return KErrNone; |
|
80 } |
|
81 |
|
82 //!!end |
|
83 //!!//!![Repeat Section End]::// [Test Case Implement] |
|
84 // [Test Case Implement] End - Do not remove |