Merge "Remove unsafe new-delete pair from program and change unoptimal resizes to...
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-AlphaFunctions.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #include <iostream>
19
20 #include <stdlib.h>
21 #include <dali/public-api/dali-core.h>
22 #include <dali-test-suite-utils.h>
23
24 using namespace Dali;
25
26 void utc_dali_alpha_functions_startup(void)
27 {
28   test_return_value = TET_UNDEF;
29 }
30
31 void utc_dali_alpha_functions_cleanup(void)
32 {
33   test_return_value = TET_PASS;
34 }
35
36
37 // Positive test case for a method
38 int UtcDaliAlphaFunctionsDefault(void)
39 {
40   TestApplication application;
41
42   DALI_TEST_EQUALS( AlphaFunctions::Default( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
43   DALI_TEST_EQUALS( AlphaFunctions::Default( 0.25f ), 0.25f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
44   DALI_TEST_EQUALS( AlphaFunctions::Default( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
45   DALI_TEST_EQUALS( AlphaFunctions::Default( 0.75f ), 0.75f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
46   DALI_TEST_EQUALS( AlphaFunctions::Default( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
47   END_TEST;
48 }
49
50 // Positive test case for a method
51 int UtcDaliAlphaFunctionsLinear(void)
52 {
53   TestApplication application;
54
55   DALI_TEST_EQUALS( AlphaFunctions::Linear( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
56   DALI_TEST_EQUALS( AlphaFunctions::Linear( 0.25f ), 0.25f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
57   DALI_TEST_EQUALS( AlphaFunctions::Linear( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
58   DALI_TEST_EQUALS( AlphaFunctions::Linear( 0.75f ), 0.75f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
59   DALI_TEST_EQUALS( AlphaFunctions::Linear( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
60   END_TEST;
61 }
62
63 // Positive test case for a method
64 int UtcDaliAlphaFunctionsReverse(void)
65 {
66   TestApplication application;
67
68   DALI_TEST_EQUALS( AlphaFunctions::Reverse( 0.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
69   DALI_TEST_EQUALS( AlphaFunctions::Reverse( 0.25f ), 0.75f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
70   DALI_TEST_EQUALS( AlphaFunctions::Reverse( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
71   DALI_TEST_EQUALS( AlphaFunctions::Reverse( 0.75f ), 0.25f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
72   DALI_TEST_EQUALS( AlphaFunctions::Reverse( 1.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
73   END_TEST;
74 }
75
76 // Positive test case for a method
77 int UtcDaliAlphaFunctionsEaseIn(void)
78 {
79   TestApplication application;
80
81   DALI_TEST_EQUALS( AlphaFunctions::EaseIn( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
82   DALI_TEST_EQUALS( AlphaFunctions::EaseIn( 0.25f ), 0.015625f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
83   DALI_TEST_EQUALS( AlphaFunctions::EaseIn( 0.5f ), 0.125f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
84   DALI_TEST_EQUALS( AlphaFunctions::EaseIn( 0.75f ), 0.421875f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
85   DALI_TEST_EQUALS( AlphaFunctions::EaseIn( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
86   END_TEST;
87 }
88
89 // Positive test case for a method
90 int UtcDaliAlphaFunctionsEaseOut(void)
91 {
92   TestApplication application;
93
94   DALI_TEST_EQUALS( AlphaFunctions::EaseOut( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
95   DALI_TEST_EQUALS( AlphaFunctions::EaseOut( 0.25f ), 0.578125f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
96   DALI_TEST_EQUALS( AlphaFunctions::EaseOut( 0.5f ), 0.875f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
97   DALI_TEST_EQUALS( AlphaFunctions::EaseOut( 0.75f ), 0.984375f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
98   DALI_TEST_EQUALS( AlphaFunctions::EaseOut( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
99   END_TEST;
100 }
101
102 // Positive test case for a method
103 int UtcDaliAlphaFunctionsEaseInOut(void)
104 {
105   TestApplication application;
106
107   DALI_TEST_EQUALS( AlphaFunctions::EaseInOut( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
108   DALI_TEST_EQUALS( AlphaFunctions::EaseInOut( 0.25f ), 0.0625f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
109   DALI_TEST_EQUALS( AlphaFunctions::EaseInOut( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
110   DALI_TEST_EQUALS( AlphaFunctions::EaseInOut( 0.75f ), 0.9375f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
111   DALI_TEST_EQUALS( AlphaFunctions::EaseInOut( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
112   END_TEST;
113 }
114
115 // Positive test case for a method
116 int UtcDaliAlphaFunctionsEaseInSine(void)
117 {
118   TestApplication application;
119
120   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
121   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine( 0.25f ), 0.07612f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
122   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine( 0.5f ), 0.292893f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
123   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine( 0.75f ), 0.617317f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
124   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
125   END_TEST;
126 }
127
128 // Positive test case for a method
129 int UtcDaliAlphaFunctionsEaseOutSine(void)
130 {
131   TestApplication application;
132
133   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
134   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine( 0.25f ), 0.382683f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
135   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine( 0.5f ), 0.707107f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
136   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine( 0.75f ), 0.92388f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
137   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
138   END_TEST;
139 }
140
141 // Positive test case for a method
142 int UtcDaliAlphaFunctionsEaseInOutSine(void)
143 {
144   TestApplication application;
145
146   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
147   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine( 0.25f ), 0.146447f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
148   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
149   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine( 0.75f ), 0.853553f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
150   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
151   END_TEST;
152 }
153
154 // Positive test case for a method
155 int UtcDaliAlphaFunctionsBounce(void)
156 {
157   TestApplication application;
158
159   DALI_TEST_EQUALS( AlphaFunctions::Bounce( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
160   DALI_TEST_EQUALS( AlphaFunctions::Bounce( 0.25f ), 0.707107f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
161   DALI_TEST_EQUALS( AlphaFunctions::Bounce( 0.5f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
162   DALI_TEST_EQUALS( AlphaFunctions::Bounce( 0.75f ), 0.707107f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
163   DALI_TEST_EQUALS( AlphaFunctions::Bounce( 1.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
164   END_TEST;
165 }
166
167 // Positive test case for a method
168 int UtcDaliAlphaFunctionsBounceBack(void)
169 {
170   TestApplication application;
171
172   DALI_TEST_EQUALS( AlphaFunctions::BounceBack( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
173   DALI_TEST_EQUALS( AlphaFunctions::BounceBack( 0.25f ), 0.900316f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
174   DALI_TEST_EQUALS( AlphaFunctions::BounceBack( 0.5f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
175   DALI_TEST_EQUALS( AlphaFunctions::BounceBack( 0.75f ), -0.300105f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
176   DALI_TEST_EQUALS( AlphaFunctions::BounceBack( 1.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
177   END_TEST;
178 }
179
180 // Positive test case for a method
181 int UtcDaliAlphaFunctionsEaseOutBack(void)
182 {
183   TestApplication application;
184
185   DALI_TEST_EQUALS( AlphaFunctions::EaseOutBack( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
186   DALI_TEST_EQUALS( AlphaFunctions::EaseOutBack( 0.25f ), 0.817410f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
187   DALI_TEST_EQUALS( AlphaFunctions::EaseOutBack( 0.5f ), 1.087698f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
188   DALI_TEST_EQUALS( AlphaFunctions::EaseOutBack( 0.75f ), 1.064137f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
189   DALI_TEST_EQUALS( AlphaFunctions::EaseOutBack( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
190   END_TEST;
191 }
192
193 // Positive test case for a method
194 int UtcDaliAlphaFunctionsSin(void)
195 {
196   TestApplication application;
197
198   DALI_TEST_EQUALS( AlphaFunctions::Sin( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
199   DALI_TEST_EQUALS( AlphaFunctions::Sin( 0.25f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
200   DALI_TEST_EQUALS( AlphaFunctions::Sin( 0.5f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
201   DALI_TEST_EQUALS( AlphaFunctions::Sin( 0.75f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
202   DALI_TEST_EQUALS( AlphaFunctions::Sin( 1.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
203   END_TEST;
204 }
205
206 // Positive test case for a method
207 int UtcDaliAlphaFunctionsSin2x(void)
208 {
209   TestApplication application;
210
211   DALI_TEST_EQUALS( AlphaFunctions::Sin2x( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
212   DALI_TEST_EQUALS( AlphaFunctions::Sin2x( 0.25f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
213   DALI_TEST_EQUALS( AlphaFunctions::Sin2x( 0.5f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
214   DALI_TEST_EQUALS( AlphaFunctions::Sin2x( 0.75f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
215   DALI_TEST_EQUALS( AlphaFunctions::Sin2x( 1.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
216   END_TEST;
217 }
218
219 // Positive test case for a method
220 int UtcDaliAlphaFunctionsSquare(void)
221 {
222   TestApplication application;
223
224   DALI_TEST_EQUALS( AlphaFunctions::Square( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
225   DALI_TEST_EQUALS( AlphaFunctions::Square( 0.25f ), 0.0625f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
226   DALI_TEST_EQUALS( AlphaFunctions::Square( 0.5f ), 0.25f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
227   DALI_TEST_EQUALS( AlphaFunctions::Square( 0.75f ), 0.5625f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
228   DALI_TEST_EQUALS( AlphaFunctions::Square( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
229   END_TEST;
230 }
231
232 // Positive test case for a method
233 int UtcDaliAlphaFunctionsEaseInSine33(void)
234 {
235   TestApplication application;
236
237   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine33( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
238   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine33( 0.25f ), 0.064146f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
239   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine33( 0.5f ), 0.255256f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
240   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine33( 0.75f ), 0.569374f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
241   DALI_TEST_EQUALS( AlphaFunctions::EaseInSine33( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
242   END_TEST;
243 }
244
245 // Positive test case for a method
246 int UtcDaliAlphaFunctionsEaseOutSine33(void)
247 {
248   TestApplication application;
249
250   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine33( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
251   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine33( 0.25f ), 0.430626f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
252   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine33( 0.5f ), 0.744744f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
253   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine33( 0.75f ), 0.935854f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
254   DALI_TEST_EQUALS( AlphaFunctions::EaseOutSine33( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
255   END_TEST;
256 }
257
258 // Positive test case for a method
259 int UtcDaliAlphaFunctionsEaseInOutSineXX(void)
260 {
261   TestApplication application;
262
263   {
264     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine33( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
265     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine33( 0.25f ), 0.239263f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
266     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine33( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
267     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine33( 0.75f ), 0.760737f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
268     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine33( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
269   }
270   {
271     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine50( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
272     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine50( 0.25f ), 0.224156f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
273     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine50( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
274     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine50( 0.75f ), 0.775844f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
275     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine50( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
276   }
277   {
278     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine60( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
279     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine60( 0.25f ), 0.211325f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
280     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine60( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
281     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine60( 0.75f ), 0.788675f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
282     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine60( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
283   }
284   {
285     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine70( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
286     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine70( 0.25f ), 0.194806f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
287     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine70( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
288     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine70( 0.75f ), 0.805194f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
289     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine70( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
290   }
291   {
292     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine80( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
293     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine80( 0.25f ), 0.173648f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
294     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine80( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
295     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine80( 0.75f ), 0.826352f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
296     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine80( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
297   }
298   {
299     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine90( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
300     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine90( 0.25f ), 0.146447f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
301     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine90( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
302     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine90( 0.75f ), 0.853553f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
303     DALI_TEST_EQUALS( AlphaFunctions::EaseInOutSine90( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
304   }
305   END_TEST;
306 }
307
308 // Positive test case for a method
309 int UtcDaliAlphaFunctionsDoubleEaseInOutSine60(void)
310 {
311   TestApplication application;
312
313   DALI_TEST_EQUALS( AlphaFunctions::DoubleEaseInOutSine60( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
314   DALI_TEST_EQUALS( AlphaFunctions::DoubleEaseInOutSine60( 0.25f ), 0.25f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
315   DALI_TEST_EQUALS( AlphaFunctions::DoubleEaseInOutSine60( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
316   DALI_TEST_EQUALS( AlphaFunctions::DoubleEaseInOutSine60( 0.75f ), 0.75f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
317   DALI_TEST_EQUALS( AlphaFunctions::DoubleEaseInOutSine60( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
318   END_TEST;
319 }
320
321 // Positive test case for a method
322 int UtcDaliAlphaFunctionsEaseOutQuint50(void)
323 {
324   TestApplication application;
325
326   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint50( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
327   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint50( 0.25f ), 0.386797f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
328   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint50( 0.5f ), 0.692214f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
329   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint50( 0.75f ), 0.905268f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
330   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint50( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
331   END_TEST;
332 }
333
334 // Positive test case for a method
335 int UtcDaliAlphaFunctionsEaseOutQuint80(void)
336 {
337   TestApplication application;
338
339   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint80( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
340   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint80( 0.25f ), 0.484010f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
341   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint80( 0.5f ), 0.796937f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
342   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint80( 0.75f ), 0.958765f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
343   DALI_TEST_EQUALS( AlphaFunctions::EaseOutQuint80( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
344   END_TEST;
345 }
346
347 // Positive test case for a method
348 int UtcDaliAlphaFunctionsEaseInBack(void)
349 {
350   TestApplication application;
351
352   DALI_TEST_EQUALS( AlphaFunctions::EaseInBack( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
353   DALI_TEST_EQUALS( AlphaFunctions::EaseInBack( 0.25f ), -0.064137f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
354   DALI_TEST_EQUALS( AlphaFunctions::EaseInBack( 0.5f ), -0.087698f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
355   DALI_TEST_EQUALS( AlphaFunctions::EaseInBack( 0.75f ), 0.182590f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
356   DALI_TEST_EQUALS( AlphaFunctions::EaseInBack( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
357   END_TEST;
358 }
359
360 // Positive test case for a method
361 int UtcDaliAlphaFunctionsEaseInOutBack(void)
362 {
363   TestApplication application;
364
365   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutBack( 0.0f ), 0.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
366   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutBack( 0.25f ), -0.043849f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
367   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutBack( 0.5f ), 0.5f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
368   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutBack( 0.75f ), 1.043849f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
369   DALI_TEST_EQUALS( AlphaFunctions::EaseInOutBack( 1.0f ), 1.0f, Math::MACHINE_EPSILON_10, TEST_LOCATION);
370   END_TEST;
371 }