|
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 #include <uiacceltk/huirealsize.h> |
|
26 |
|
27 #include "testuiaifcoretoolkit.h" |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CTestUiAifCoreToolkit::TestTHRSConstructor |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 TInt CTestUiAifCoreToolkit::TestTHRSConstructor( CStifItemParser& /*aItem*/ ) |
|
34 { |
|
35 |
|
36 // Print to UI |
|
37 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
38 _LIT( KHuiMappingFunctions, "In TestTHRSConstructor" ); |
|
39 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
40 // Print to log file |
|
41 iLog->Log( KHuiMappingFunctions ); |
|
42 |
|
43 THuiRealSize size; |
|
44 |
|
45 return KErrNone; |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CTestUiAifCoreToolkit::TestTHRSConstructorWithTReal |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 TInt CTestUiAifCoreToolkit::TestTHRSConstructorWithTReal( CStifItemParser& /*aItem*/ ) |
|
53 { |
|
54 |
|
55 // Print to UI |
|
56 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
57 _LIT( KHuiMappingFunctions, "In TestTHRSConstructorWithTReal" ); |
|
58 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
59 // Print to log file |
|
60 iLog->Log( KHuiMappingFunctions ); |
|
61 |
|
62 THuiRealSize size( 1, 0.1 ); |
|
63 |
|
64 return KErrNone; |
|
65 } |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // CTestUiAifCoreToolkit::TestTHRSConstructorWithTSize |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 TInt CTestUiAifCoreToolkit::TestTHRSConstructorWithTSize( CStifItemParser& /*aItem*/ ) |
|
72 { |
|
73 |
|
74 // Print to UI |
|
75 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
76 _LIT( KHuiMappingFunctions, "In TestTHRSConstructorWithTSize" ); |
|
77 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
78 // Print to log file |
|
79 iLog->Log( KHuiMappingFunctions ); |
|
80 |
|
81 TSize size( 1, 1 ); |
|
82 THuiRealSize realSize( size ); |
|
83 |
|
84 return KErrNone; |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CTestUiAifCoreToolkit::TestTHRSoperatorTSize |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 TInt CTestUiAifCoreToolkit::TestTHRSoperatorTSize( CStifItemParser& /*aItem*/ ) |
|
92 { |
|
93 |
|
94 // Print to UI |
|
95 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
96 _LIT( KHuiMappingFunctions, "In TestTHRSoperatorTSize" ); |
|
97 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
98 // Print to log file |
|
99 iLog->Log( KHuiMappingFunctions ); |
|
100 |
|
101 TSize size( 1, 1 ); |
|
102 THuiRealSize realSize = size; |
|
103 |
|
104 return KErrNone; |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // CTestUiAifCoreToolkit::TestTHRSRound |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 TInt CTestUiAifCoreToolkit::TestTHRSRound( CStifItemParser& /*aItem*/ ) |
|
112 { |
|
113 |
|
114 // Print to UI |
|
115 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
116 _LIT( KHuiMappingFunctions, "In TestTHRSRound" ); |
|
117 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
118 // Print to log file |
|
119 iLog->Log( KHuiMappingFunctions ); |
|
120 |
|
121 TSize size( 1, 1 ); |
|
122 THuiRealSize realSize = size; |
|
123 realSize.Round(); |
|
124 |
|
125 return KErrNone; |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // CTestUiAifCoreToolkit::TestTHRSoperatorPlus |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 TInt CTestUiAifCoreToolkit::TestTHRSoperatorPlus( CStifItemParser& /*aItem*/ ) |
|
133 { |
|
134 |
|
135 // Print to UI |
|
136 _LIT( KTestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
137 _LIT( KHuiMappingFunctions, "In TestTHRSoperatorPlus" ); |
|
138 TestModuleIf().Printf( 0, KTestuiaifcoretoolkit, KHuiMappingFunctions ); |
|
139 // Print to log file |
|
140 iLog->Log( KHuiMappingFunctions ); |
|
141 |
|
142 TSize size( 1, 1 ); |
|
143 THuiRealSize realSize = size; |
|
144 realSize = realSize * 0.1; |
|
145 |
|
146 return KErrNone; |
|
147 } |