|
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 functions for alfvisual.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <e32svr.h> |
|
22 #include <stifparser.h> |
|
23 #include <stiftestinterface.h> |
|
24 |
|
25 #include "testplatalfvisual.h" |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CTestPlatAlfVisual::TestAlfConstantMapFuncL |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 TInt CTestPlatAlfVisual::TestAlfConstantMapFuncL( CStifItemParser& /*aItem*/ ) |
|
34 { |
|
35 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
36 _LIT( KTestAlfConstantMapFuncL, "TestAlfConstantMapFuncL" ); |
|
37 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfConstantMapFuncL ); |
|
38 // Print to log file |
|
39 iLog->Log( KTestAlfConstantMapFuncL ); |
|
40 |
|
41 CAlfConstantMappingFunction* vMapFunc = |
|
42 CAlfConstantMappingFunction::NewL( *iAlfEnv ); |
|
43 vMapFunc->SetValue( 0 ); |
|
44 vMapFunc->Value(); |
|
45 return KErrNone; |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CTestPlatAlfVisual::TestAlfLinearMapFuncL |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 TInt CTestPlatAlfVisual::TestAlfLinearMapFuncL( CStifItemParser& /*aItem*/ ) |
|
53 { |
|
54 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
55 _LIT( KTestAlfLinearMapFuncL, "TestAlfLinearMapFuncL" ); |
|
56 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfLinearMapFuncL ); |
|
57 // Print to log file |
|
58 iLog->Log( KTestAlfLinearMapFuncL ); |
|
59 |
|
60 CAlfLinearMappingFunction* vMapFunc = |
|
61 CAlfLinearMappingFunction::NewL( *iAlfEnv ); |
|
62 vMapFunc->SetFactor( 0 ); |
|
63 vMapFunc->Factor(); |
|
64 vMapFunc->SetOffset( 0 ); |
|
65 vMapFunc->Offset(); |
|
66 return KErrNone; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CTestPlatAlfVisual::TestAlfSineMapFuncL |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 TInt CTestPlatAlfVisual::TestAlfSineMapFuncL( CStifItemParser& /*aItem*/ ) |
|
74 { |
|
75 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
76 _LIT( KTestAlfSineMapFuncL, "TestAlfSineMapFuncL" ); |
|
77 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfSineMapFuncL ); |
|
78 // Print to log file |
|
79 iLog->Log( KTestAlfSineMapFuncL ); |
|
80 |
|
81 CAlfSineMappingFunction* vMapFunc = |
|
82 CAlfSineMappingFunction::NewL( *iAlfEnv ); |
|
83 vMapFunc->SetFactor( 0 ); |
|
84 vMapFunc->Factor(); |
|
85 vMapFunc->SetOffset( 0 ); |
|
86 vMapFunc->Offset(); |
|
87 return KErrNone; |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CTestPlatAlfVisual::TestAlfCosineMapFuncL |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 TInt CTestPlatAlfVisual::TestAlfCosineMapFuncL( CStifItemParser& /*aItem*/ ) |
|
95 { |
|
96 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
97 _LIT( KTestAlfCosineMapFuncL, "TestAlfCosineMapFuncL" ); |
|
98 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfCosineMapFuncL ); |
|
99 // Print to log file |
|
100 iLog->Log( KTestAlfCosineMapFuncL ); |
|
101 |
|
102 CAlfCosineMappingFunction* vMapFunc = |
|
103 CAlfCosineMappingFunction::NewL( *iAlfEnv ); |
|
104 vMapFunc->SetFactor( 0 ); |
|
105 vMapFunc->Factor(); |
|
106 vMapFunc->SetOffset( 0 ); |
|
107 vMapFunc->Offset(); |
|
108 return KErrNone; |
|
109 } |
|
110 |
|
111 // ----------------------------------------------------------------------------- |
|
112 // CTestPlatAlfVisual::TestAlfAverageMapFuncL |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 TInt CTestPlatAlfVisual::TestAlfAverageMapFuncL( CStifItemParser& /*aItem*/ ) |
|
116 { |
|
117 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
118 _LIT( KTestAlfAverageMapFuncL, "TestAlfAverageMapFuncL" ); |
|
119 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfAverageMapFuncL ); |
|
120 // Print to log file |
|
121 iLog->Log( KTestAlfAverageMapFuncL ); |
|
122 |
|
123 CAlfAverageMappingFunction* vMapFunc = |
|
124 CAlfAverageMappingFunction::NewL( *iAlfEnv ); |
|
125 const TAlfTimedValue vValue( 0 ); |
|
126 vMapFunc->SetWeight( vValue ); |
|
127 vMapFunc->SetMappingFunction1( NULL ); |
|
128 vMapFunc->SetMappingFunction2( NULL ); |
|
129 vMapFunc->SetMappingFunctions( NULL, NULL ); |
|
130 return KErrNone; |
|
131 } |
|
132 |
|
133 // ----------------------------------------------------------------------------- |
|
134 // CTestPlatAlfVisual::TestAlfTableMapFuncL |
|
135 // ----------------------------------------------------------------------------- |
|
136 // |
|
137 TInt CTestPlatAlfVisual::TestAlfTableMapFuncL( CStifItemParser& /*aItem*/ ) |
|
138 { |
|
139 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
140 _LIT( KTestAlfTableMapFuncL, "TestAlfTableMapFuncL" ); |
|
141 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfTableMapFuncL ); |
|
142 // Print to log file |
|
143 iLog->Log( KTestAlfTableMapFuncL ); |
|
144 |
|
145 CAlfTableMappingFunction* vMapFunc = |
|
146 CAlfTableMappingFunction::NewL( *iAlfEnv ); |
|
147 const TAlfTimedValue vValue( 0 ); |
|
148 vMapFunc->SetMappingTableValues( 0, 0, NULL ); |
|
149 |
|
150 return KErrNone; |
|
151 } |
|
152 |
|
153 // End of file |
|
154 |