|
1 /* |
|
2 * Copyright (c) 2002 - 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 api of alf_core_toolkit |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <e32svr.h> |
|
22 #include <stifparser.h> |
|
23 #include <stiftestinterface.h> |
|
24 #include <uiacceltk/huirealpoint.h> |
|
25 |
|
26 #include "testuiaifcoretoolkit.h" |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CTestUiAifCoreToolkit::TestTHRPConstructor |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 TInt CTestUiAifCoreToolkit::TestTHRPConstructor( CStifItemParser& /*aItem*/ ) |
|
33 { |
|
34 |
|
35 // Print to UI |
|
36 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
37 _LIT( KHuiMappingFunctions, "In TestTHRPConstructor" ); |
|
38 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
39 // Print to log file |
|
40 iLog->Log( KHuiMappingFunctions ); |
|
41 |
|
42 THuiRealPoint point; |
|
43 |
|
44 return KErrNone; |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CTestUiAifCoreToolkit::TestTHRPConstructorWithTReal |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 TInt CTestUiAifCoreToolkit::TestTHRPConstructorWithTReal( CStifItemParser& /*aItem*/ ) |
|
52 { |
|
53 |
|
54 // Print to UI |
|
55 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
56 _LIT( KHuiMappingFunctions, "In TestTHRPConstructorWithTReal" ); |
|
57 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
58 // Print to log file |
|
59 iLog->Log( KHuiMappingFunctions ); |
|
60 |
|
61 THuiRealPoint point( 1, 1 ); |
|
62 |
|
63 return KErrNone; |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // CTestUiAifCoreToolkit::TestTHRPConstructorWithTPoint |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 TInt CTestUiAifCoreToolkit::TestTHRPConstructorWithTPoint( CStifItemParser& /*aItem*/ ) |
|
71 { |
|
72 |
|
73 // Print to UI |
|
74 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
75 _LIT( KHuiMappingFunctions, "In TestTHRPConstructorWithTPoint" ); |
|
76 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
77 // Print to log file |
|
78 iLog->Log( KHuiMappingFunctions ); |
|
79 |
|
80 TPoint point( 1, 1 ); |
|
81 THuiRealPoint realPoint( point ); |
|
82 TPoint a = realPoint; |
|
83 |
|
84 return KErrNone; |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CTestUiAifCoreToolkit::TestTHRPAsSize |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 TInt CTestUiAifCoreToolkit::TestTHRPAsSize( CStifItemParser& /*aItem*/ ) |
|
92 { |
|
93 |
|
94 // Print to UI |
|
95 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
96 _LIT( KHuiMappingFunctions, "In TestTHRPAsSize" ); |
|
97 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
98 // Print to log file |
|
99 iLog->Log( KHuiMappingFunctions ); |
|
100 |
|
101 THuiRealPoint realPoint; |
|
102 realPoint.AsSize(); |
|
103 |
|
104 return KErrNone; |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // CTestUiAifCoreToolkit::TestTHRPTPoint |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 TInt CTestUiAifCoreToolkit::TestTHRPTPoint( CStifItemParser& /*aItem*/ ) |
|
112 { |
|
113 |
|
114 // Print to UI |
|
115 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
116 _LIT( KHuiMappingFunctions, "In TestTHRPTPoint" ); |
|
117 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
118 // Print to log file |
|
119 iLog->Log( KHuiMappingFunctions ); |
|
120 |
|
121 THuiRealPoint realPoint; |
|
122 TPoint point = realPoint; |
|
123 |
|
124 return KErrNone; |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // CTestUiAifCoreToolkit::TestTHRPRound |
|
129 // ----------------------------------------------------------------------------- |
|
130 // |
|
131 TInt CTestUiAifCoreToolkit::TestTHRPRound( CStifItemParser& /*aItem*/ ) |
|
132 { |
|
133 |
|
134 // Print to UI |
|
135 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
136 _LIT( KHuiMappingFunctions, "In TestTHRPRound" ); |
|
137 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
138 // Print to log file |
|
139 iLog->Log( KHuiMappingFunctions ); |
|
140 |
|
141 THuiRealPoint realPoint; |
|
142 TPoint point = realPoint.Round(); |
|
143 |
|
144 return KErrNone; |
|
145 } |
|
146 |
|
147 // ----------------------------------------------------------------------------- |
|
148 // CTestUiAifCoreToolkit::TestTHRPoperator1 |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 TInt CTestUiAifCoreToolkit::TestTHRPoperator1( CStifItemParser& /*aItem*/ ) |
|
152 { |
|
153 |
|
154 // Print to UI |
|
155 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
156 _LIT( KHuiMappingFunctions, "In TestTHRPoperator1" ); |
|
157 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
158 // Print to log file |
|
159 iLog->Log( KHuiMappingFunctions ); |
|
160 |
|
161 THuiRealPoint realPoint; |
|
162 realPoint = realPoint + realPoint; |
|
163 |
|
164 return KErrNone; |
|
165 } |
|
166 |
|
167 // ----------------------------------------------------------------------------- |
|
168 // CTestUiAifCoreToolkit::TestTHRPoperator2 |
|
169 // ----------------------------------------------------------------------------- |
|
170 // |
|
171 TInt CTestUiAifCoreToolkit::TestTHRPoperator2( CStifItemParser& /*aItem*/ ) |
|
172 { |
|
173 |
|
174 // Print to UI |
|
175 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
176 _LIT( KHuiMappingFunctions, "In TestTHRPoperator2" ); |
|
177 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
178 // Print to log file |
|
179 iLog->Log( KHuiMappingFunctions ); |
|
180 |
|
181 THuiRealPoint realPoint; |
|
182 realPoint += realPoint; |
|
183 |
|
184 return KErrNone; |
|
185 } |
|
186 |
|
187 // ----------------------------------------------------------------------------- |
|
188 // CTestUiAifCoreToolkit::TestTHRPoperator3 |
|
189 // ----------------------------------------------------------------------------- |
|
190 // |
|
191 TInt CTestUiAifCoreToolkit::TestTHRPoperator3( CStifItemParser& /*aItem*/ ) |
|
192 { |
|
193 |
|
194 // Print to UI |
|
195 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
196 _LIT( KHuiMappingFunctions, "In TestTHRPoperator3" ); |
|
197 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
198 // Print to log file |
|
199 iLog->Log( KHuiMappingFunctions ); |
|
200 |
|
201 THuiRealPoint realPoint; |
|
202 realPoint -= realPoint; |
|
203 |
|
204 return KErrNone; |
|
205 } |
|
206 |
|
207 // ----------------------------------------------------------------------------- |
|
208 // CTestUiAifCoreToolkit::TestTHRPoperator4 |
|
209 // ----------------------------------------------------------------------------- |
|
210 // |
|
211 TInt CTestUiAifCoreToolkit::TestTHRPoperator4( CStifItemParser& /*aItem*/ ) |
|
212 { |
|
213 |
|
214 // Print to UI |
|
215 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
216 _LIT( KHuiMappingFunctions, "In TestTHRPoperator4" ); |
|
217 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
218 // Print to log file |
|
219 iLog->Log( KHuiMappingFunctions ); |
|
220 |
|
221 THuiRealPoint realPoint; |
|
222 realPoint = -realPoint; |
|
223 |
|
224 return KErrNone; |
|
225 } |
|
226 |
|
227 // ----------------------------------------------------------------------------- |
|
228 // CTestUiAifCoreToolkit::TestTHRPoperator5 |
|
229 // ----------------------------------------------------------------------------- |
|
230 // |
|
231 TInt CTestUiAifCoreToolkit::TestTHRPoperator5( CStifItemParser& /*aItem*/ ) |
|
232 { |
|
233 |
|
234 // Print to UI |
|
235 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
236 _LIT( KHuiMappingFunctions, "In TestTHRPoperator5" ); |
|
237 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
238 // Print to log file |
|
239 iLog->Log( KHuiMappingFunctions ); |
|
240 |
|
241 THuiRealPoint realPoint; |
|
242 realPoint = realPoint - realPoint; |
|
243 |
|
244 return KErrNone; |
|
245 } |
|
246 |
|
247 // ----------------------------------------------------------------------------- |
|
248 // CTestUiAifCoreToolkit::TestTHRPoperator6 |
|
249 // ----------------------------------------------------------------------------- |
|
250 // |
|
251 TInt CTestUiAifCoreToolkit::TestTHRPoperator6( CStifItemParser& /*aItem*/ ) |
|
252 { |
|
253 |
|
254 // Print to UI |
|
255 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
256 _LIT( KHuiMappingFunctions, "In TestTHRPoperator6" ); |
|
257 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
258 // Print to log file |
|
259 iLog->Log( KHuiMappingFunctions ); |
|
260 |
|
261 THuiRealPoint realPoint; |
|
262 realPoint = realPoint * 1; |
|
263 |
|
264 return KErrNone; |
|
265 } |
|
266 |
|
267 // ----------------------------------------------------------------------------- |
|
268 // CTestUiAifCoreToolkit::TestTHRPAbs |
|
269 // ----------------------------------------------------------------------------- |
|
270 // |
|
271 TInt CTestUiAifCoreToolkit::TestTHRPAbs( CStifItemParser& /*aItem*/ ) |
|
272 { |
|
273 |
|
274 // Print to UI |
|
275 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
276 _LIT( KHuiMappingFunctions, "In TestTHRPAbs" ); |
|
277 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
278 // Print to log file |
|
279 iLog->Log( KHuiMappingFunctions ); |
|
280 |
|
281 THuiRealPoint realPoint; |
|
282 realPoint.Abs(); |
|
283 |
|
284 return KErrNone; |
|
285 } |