Merge "Reducesd image visual memory consumption by removing unnecessary fragment...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TransitionData.cpp
1 /*
2  * Copyright (c) 2016 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 #include <iostream>
18 #include <stdlib.h>
19 #include <dali-toolkit-test-suite-utils.h>
20 #include <dali.h>
21 #include <dali-toolkit/dali-toolkit.h>
22 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
23 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
24 #include "dummy-control.h"
25
26 using namespace Dali;
27 using namespace Toolkit;
28
29
30 void utc_dali_toolkit_transition_data_startup(void)
31 {
32   test_return_value = TET_UNDEF;
33 }
34
35 void utc_dali_toolkit_transition_data_cleanup(void)
36 {
37   test_return_value = TET_PASS;
38 }
39
40 Property::Map CreateMap()
41 {
42   Property::Map map;
43
44   map["target"] = "Actor1";
45   map["property"] = "color";
46   map["initialValue"] = Color::MAGENTA;
47   map["targetValue"] = Color::RED;
48   map["animator"] = Property::Map()
49     .Add("alphaFunction", "EASE_IN_OUT_BACK")
50     .Add("timePeriod", Property::Map()
51          .Add("delay", 0.5f)
52          .Add("duration", 1.0f));
53   return map;
54 }
55
56 void CHECK_MAP_EQUALS( Property::Map test, Property::Map result )
57 {
58   DALI_TEST_EQUALS(test.Count(), result.Count(), TEST_LOCATION);
59
60   for( unsigned int i=0; i< test.Count(); ++i )
61   {
62     KeyValuePair keyValue = test.GetKeyValue(i);
63     Property::Value* value;
64
65     if( keyValue.first.type == Property::Key::STRING )
66     {
67       value = result.Find(keyValue.first.stringKey);
68     }
69     else
70     {
71       value = result.Find(keyValue.first.indexKey);
72     }
73
74     DALI_TEST_CHECK( value != NULL );
75     if( value != NULL )
76     {
77       DALI_TEST_EQUALS( keyValue.second.GetType(), value->GetType(), TEST_LOCATION );
78       if( keyValue.second.GetType() == Property::MAP )
79       {
80         CHECK_MAP_EQUALS( *(keyValue.second.GetMap()), *(value->GetMap()) );
81       }
82       else if( keyValue.second.GetType() == Property::ARRAY )
83       {
84       }
85       else if( keyValue.second.GetType() == Property::STRING )
86       {
87         std::string str;
88         value->Get(str);
89         DALI_TEST_EQUALS( keyValue.second, str.c_str(), TEST_LOCATION );
90       }
91       else
92       {
93         DALI_TEST_EQUALS( keyValue.second, *value, 0.001f, TEST_LOCATION );
94       }
95     }
96   }
97 }
98
99
100 int UtcDaliTransitionDataNew(void)
101 {
102   TestApplication application;
103
104   Property::Map map = CreateMap();
105   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
106   DALI_TEST_CHECK( transition );
107
108   END_TEST;
109 }
110
111 int UtcDaliTransitionDataDownCast(void)
112 {
113   TestApplication application;
114
115   Property::Map map = CreateMap();
116
117   BaseHandle handle = TransitionData::New( map );
118   DALI_TEST_CHECK( handle );
119
120   TransitionData transitionData = TransitionData::DownCast( handle );
121   DALI_TEST_CHECK( transitionData );
122   END_TEST;
123 }
124
125 int UtcDaliTransitionDataCopyConstructor(void)
126 {
127   TestApplication application;
128
129   Property::Map map = CreateMap();
130
131   TransitionData transitionData = TransitionData::New( map );
132   DALI_TEST_CHECK( transitionData );
133
134   TransitionData td2( transitionData );
135   DALI_TEST_CHECK( td2 );
136   DALI_TEST_EQUALS( td2.Count(), 1, TEST_LOCATION );
137   END_TEST;
138 }
139
140 int UtcDaliTransitionDataAssignmentOperator(void)
141 {
142   TestApplication application;
143
144   Property::Map map = CreateMap();
145
146   TransitionData transitionData = TransitionData::New( map );
147   DALI_TEST_CHECK( transitionData );
148
149   TransitionData td2;
150   DALI_TEST_CHECK( !td2 );
151
152   td2 = transitionData;
153   DALI_TEST_CHECK( td2 );
154
155   DALI_TEST_EQUALS( td2.Count(), 1, TEST_LOCATION );
156   END_TEST;
157 }
158
159 int UtcDaliTransitionDataCount(void)
160 {
161   TestApplication application;
162
163   Property::Map map = CreateMap();
164   TransitionData transitionData = TransitionData::New( map );
165   DALI_TEST_CHECK( transitionData );
166   DALI_TEST_EQUALS( transitionData.Count(), 1, TEST_LOCATION );
167
168   Property::Array array;
169   array.PushBack( map );
170   array.PushBack( map );
171   array.PushBack( map );
172
173   TransitionData transitionData2 = TransitionData::New( array );
174   DALI_TEST_CHECK( transitionData2 );
175   DALI_TEST_EQUALS( transitionData2.Count(), 3, TEST_LOCATION );
176
177   END_TEST;
178 }
179
180 int UtcDaliTransitionDataMap1P(void)
181 {
182   TestApplication application;
183
184   tet_printf("Testing animation of a visual property using stylesheet equivalent maps\n");
185
186   Property::Map map;
187   map["target"] = "visual1";
188   map["property"] = "mixColor";
189   map["initialValue"] = Color::MAGENTA;
190   map["targetValue"] = Color::RED;
191   map["animator"] = Property::Map()
192     .Add("alphaFunction", "EASE_IN_OUT")
193     .Add("timePeriod", Property::Map()
194          .Add("delay", 0.5f)
195          .Add("duration", 1.0f));
196
197   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
198
199   DummyControl actor = DummyControl::New();
200   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
201   actor.SetName("Actor1");
202   actor.SetColor(Color::CYAN);
203   Stage::GetCurrent().Add(actor);
204
205   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
206
207   Property::Map visualMap;
208   visualMap[Visual::Property::TYPE] = Visual::COLOR;
209   visualMap[ColorVisual::Property::MIX_COLOR] = Color::MAGENTA;
210   Visual::Base visual = VisualFactory::Get().CreateVisual( visualMap );
211   visual.SetName( "visual1" );
212
213   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
214   dummyImpl.RegisterVisual( visualIndex, actor, visual );
215
216   Animation anim = dummyImpl.CreateTransition( transition );
217   DALI_TEST_CHECK( anim );
218
219   Renderer renderer = actor.GetRendererAt(0);
220   Property::Index mixColorIndex = renderer.GetPropertyIndex( ColorVisual::Property::MIX_COLOR );
221   application.SendNotification();
222   application.Render(0);
223
224   DALI_TEST_EQUALS( renderer.GetProperty<Vector4>(mixColorIndex), Color::MAGENTA, TEST_LOCATION);
225
226   anim.Play();
227
228   application.SendNotification();
229   application.Render(0);
230   application.Render(500); // Start animation
231   application.Render(500); // Halfway thru anim
232   application.SendNotification();
233   DALI_TEST_EQUALS( renderer.GetProperty<Vector4>(mixColorIndex), (Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
234
235   application.Render(500); // End of anim
236   application.SendNotification();
237   DALI_TEST_EQUALS( renderer.GetProperty<Vector4>(mixColorIndex), Color::RED, TEST_LOCATION );
238
239   END_TEST;
240 }
241
242 int UtcDaliTransitionDataMap2P(void)
243 {
244   TestApplication application;
245
246   tet_printf("Testing animation of a visual property using programmatic maps\n");
247
248   Property::Map map;
249   map["target"] = "visual1";
250   //Control::CONTROL_PROPERTY_END_INDEX + 1
251   map["property"] = ColorVisual::Property::MIX_COLOR;
252   map["initialValue"] = Color::MAGENTA;
253   map["targetValue"] = Color::RED;
254   map["animator"] = Property::Map()
255     .Add("alphaFunction", "LINEAR")
256     .Add("timePeriod", Property::Map()
257          .Add("delay", 0.5f)
258          .Add("duration", 1.0f));
259
260   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
261
262   DummyControl actor = DummyControl::New();
263   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
264   actor.SetName("Actor1");
265   actor.SetColor(Color::CYAN);
266   Stage::GetCurrent().Add(actor);
267
268   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
269
270   Property::Map visualMap;
271   visualMap[Visual::Property::TYPE] = Visual::COLOR;
272   visualMap[ColorVisual::Property::MIX_COLOR] = Color::MAGENTA;
273   Visual::Base visual = VisualFactory::Get().CreateVisual( visualMap );
274   visual.SetName( "visual1" );
275
276   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
277   dummyImpl.RegisterVisual( visualIndex, actor, visual );
278
279   Animation anim = dummyImpl.CreateTransition( transition );
280   DALI_TEST_CHECK( anim );
281
282   Renderer renderer = actor.GetRendererAt(0);
283   Property::Index mixColorIndex = renderer.GetPropertyIndex( ColorVisual::Property::MIX_COLOR );
284   application.SendNotification();
285   application.Render(0);
286
287   DALI_TEST_EQUALS( renderer.GetProperty<Vector4>(mixColorIndex), Color::MAGENTA, TEST_LOCATION);
288
289   anim.Play();
290
291   application.SendNotification();
292   application.Render(0);
293   application.Render(500); // Start animation
294   application.Render(500); // Halfway thru anim
295   application.SendNotification();
296   DALI_TEST_EQUALS( renderer.GetProperty<Vector4>(mixColorIndex), (Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
297
298   application.Render(500); // End of anim
299   application.SendNotification();
300   DALI_TEST_EQUALS( renderer.GetProperty<Vector4>(mixColorIndex), Color::RED, TEST_LOCATION );
301
302   END_TEST;
303 }
304
305
306 int UtcDaliTransitionDataMapP3(void)
307 {
308   TestApplication application;
309
310   tet_printf("Testing animation of a visual's placement actor property\n");
311
312   Property::Map map;
313   map["target"] = "visual1";
314   map["property"] = "color";
315   map["initialValue"] = Color::MAGENTA;
316   map["targetValue"] = Color::RED;
317   map["animator"] = Property::Map()
318     .Add("alphaFunction", "EASE_IN_OUT")
319     .Add("timePeriod", Property::Map()
320          .Add("delay", 0.5f)
321          .Add("duration", 1.0f));
322
323   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
324
325   DummyControl actor = DummyControl::New();
326   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
327   actor.SetName("Actor1");
328   actor.SetColor(Color::CYAN);
329   Stage::GetCurrent().Add(actor);
330
331   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
332
333   Property::Map visualMap;
334   visualMap[Visual::Property::TYPE] = Visual::COLOR;
335   visualMap[ColorVisual::Property::MIX_COLOR] = Color::MAGENTA;
336   Visual::Base visual = VisualFactory::Get().CreateVisual( visualMap );
337   visual.SetName( "visual1" );
338
339   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
340   dummyImpl.RegisterVisual( visualIndex, actor, visual );
341
342   Animation anim = dummyImpl.CreateTransition( transition );
343   DALI_TEST_CHECK( anim );
344
345   application.SendNotification();
346   application.Render(0);
347   DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION);
348
349   anim.Play();
350
351   application.SendNotification();
352   application.Render(0);
353   application.Render(500);
354   application.Render(500); // Halfway thru map1 anim
355   application.SendNotification();
356   DALI_TEST_EQUALS( actor.GetCurrentColor(), (Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
357
358   application.Render(500); // End of map1 anim
359   application.SendNotification();
360   DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::RED, TEST_LOCATION );
361   END_TEST;
362 }
363
364 int UtcDaliTransitionDataMap1N(void)
365 {
366   TestApplication application;
367
368   Property::Map map;
369   map["target"] = "Actor1";
370   map["property"] = "randomProperty";
371   map["initialValue"] = Color::MAGENTA;
372   map["targetValue"] = Color::RED;
373   map["animator"] = Property::Map()
374     .Add("alphaFunction", "EASE_OUT")
375     .Add("timePeriod", Property::Map()
376          .Add("delay", 0.5f)
377          .Add("duration", 1.0f));
378
379   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
380
381   DummyControl actor = DummyControl::New();
382   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
383   actor.SetName("Actor1");
384   actor.SetColor(Color::CYAN);
385   Stage::GetCurrent().Add(actor);
386
387   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
388   Animation anim = dummyImpl.CreateTransition( transition );
389   DALI_TEST_CHECK( ! anim );
390
391   CHECK_MAP_EQUALS( map, transition.GetAnimatorAt(0) );
392   END_TEST;
393 }
394
395
396 int UtcDaliTransitionDataMapN3(void)
397 {
398   TestApplication application;
399
400   tet_printf("Testing visual lookup with no renderers\n");
401
402   Property::Map map;
403   map["target"] = "visual1";
404   map["property"] = "mixColor";
405   map["initialValue"] = Color::MAGENTA;
406   map["targetValue"] = Color::RED;
407   map["animator"] = Property::Map()
408     .Add("alphaFunction", "EASE_OUT_BACK")
409     .Add("timePeriod", Property::Map()
410          .Add("delay", 0.5f)
411          .Add("duration", 1.0f));
412
413   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
414   CHECK_MAP_EQUALS( map, transition.GetAnimatorAt(0) );
415
416   DummyControl actor = DummyControl::New();
417   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
418   actor.SetName("Actor1");
419   actor.SetColor(Color::CYAN);
420   // Don't stage actor
421
422   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
423   Property::Map visualMap;
424   visualMap[Visual::Property::TYPE] = Visual::COLOR;
425   visualMap[ColorVisual::Property::MIX_COLOR] = Color::MAGENTA;
426   Visual::Base visual = VisualFactory::Get().CreateVisual( visualMap );
427   visual.SetName( "visual1" );
428
429   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
430   dummyImpl.RegisterVisual( visualIndex, actor, visual );
431
432   Animation anim = dummyImpl.CreateTransition( transition );
433   DALI_TEST_CHECK( !anim );
434   END_TEST;
435 }
436
437 int UtcDaliTransitionDataArrayP(void)
438 {
439   TestApplication application;
440
441   Property::Map map1;
442   map1["target"] = "Actor1";
443   map1["property"] = "color";
444   map1["initialValue"] = Color::MAGENTA;
445   map1["targetValue"] = Color::RED;
446   map1["animator"] = Property::Map()
447     .Add("alphaFunction", "EASE_IN_OUT")
448     .Add("timePeriod", Property::Map()
449          .Add("delay", 0.5f)
450          .Add("duration", 1.0f));
451
452   Property::Map map2;
453   map2["target"] = "Actor1";
454   map2["property"] = "position";
455   map2["initialValue"] = Vector3(100,0,0);
456   map2["targetValue"] = Vector3(0,100,0);
457   map2["animator"] = Property::Map()
458     .Add("alphaFunction", "EASE_IN_OUT")
459     .Add("timePeriod", Property::Map()
460          .Add("delay", 0.0f)
461          .Add("duration", 1.0f));
462
463   Property::Map map3;
464   map3["target"] = "Actor1";
465   map3["property"] = "orientation";
466   map3["targetValue"] = Quaternion( Radian(Math::PI_2), Vector3::ZAXIS );
467
468   Property::Array array;
469   array.PushBack(map1);
470   array.PushBack(map2);
471   array.PushBack(map3);
472
473   Dali::Toolkit::TransitionData transition = TransitionData::New( array );
474
475   DummyControl actor = DummyControl::New();
476   actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
477   actor.SetName("Actor1");
478   actor.SetColor(Color::CYAN);
479   Stage::GetCurrent().Add(actor);
480   DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(0), Vector3::ZAXIS), TEST_LOCATION);
481
482   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
483   Animation anim = dummyImpl.CreateTransition( transition );
484   DALI_TEST_CHECK( anim );
485   application.SendNotification();
486   application.Render(0);
487   DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION);
488   DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(Math::PI_2), Vector3::ZAXIS), TEST_LOCATION);
489   anim.Play();
490
491   application.SendNotification();
492   application.Render(0);   // start map2 anim
493   application.SendNotification();
494   DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(100,0,0), TEST_LOCATION);
495
496   application.Render(500); // Start map1 animation, halfway thru map2 anim
497   application.SendNotification();
498   DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(50,50,0), TEST_LOCATION);
499
500   application.Render(500); // Halfway thru map1 anim, end of map2 anim
501   application.SendNotification();
502   DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0,100,0), TEST_LOCATION);
503   DALI_TEST_EQUALS( actor.GetCurrentColor(), (Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
504
505   application.Render(500); // End of map1 anim
506   application.SendNotification();
507   DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::RED, TEST_LOCATION );
508
509   END_TEST;
510 }
511
512
513 int UtcDaliTransitionDataGetAnimatorP(void)
514 {
515   TestApplication application;
516
517   Property::Map map1;
518   map1["target"] = "Actor1";
519   map1["property"] = "color";
520   map1["initialValue"] = Color::MAGENTA;
521   map1["targetValue"] = Color::RED;
522   map1["animator"] = Property::Map()
523     .Add("alphaFunction", "EASE_IN_SQUARE")
524     .Add("timePeriod", Property::Map()
525          .Add("delay", 0.5f)
526          .Add("duration", 0.5f));
527
528   Property::Map map2;
529   map2["target"] = "Actor1";
530   map2["property"] = "position";
531   map2["initialValue"] = Vector3(100,0,0);
532   map2["targetValue"] = Vector3(0,100,0);
533   map2["animator"] = Property::Map()
534     .Add("alphaFunction", "EASE_OUT_SQUARE")
535     .Add("timePeriod", Property::Map()
536          .Add("delay", 0.2f)
537          .Add("duration", 2.0f));
538
539   Property::Map map3;
540   map3["target"] = "Actor1";
541   map3["property"] = "size";
542   map3["initialValue"] = Vector2(10,10);
543   map3["targetValue"] = Vector2(100,100);
544   map3["animator"] = Property::Map()
545     .Add("alphaFunction", "EASE_OUT_SINE")
546     .Add("timePeriod", Property::Map()
547          .Add("delay", 0.4f)
548          .Add("duration", 3.0f));
549
550   Property::Map map4;
551   map4["target"] = "Actor2";
552   map4["property"] = "color";
553   map4["initialValue"] = Color::BLACK;
554   map4["targetValue"] = Color::GREEN;
555   map4["animator"] = Property::Map()
556     .Add("alphaFunction", "EASE_IN_OUT_SINE")
557     .Add("timePeriod", Property::Map()
558          .Add("delay", 0.5f)
559          .Add("duration", 0.5f));
560
561   Property::Map map5;
562   map5["target"] = "Actor2";
563   map5["property"] = "position";
564   map5["initialValue"] = Vector3(100,0,0);
565   map5["targetValue"] = Vector3(0,100,0);
566   map5["animator"] = Property::Map()
567     .Add("alphaFunction", "BOUNCE")
568     .Add("timePeriod", Property::Map()
569          .Add("delay", 0.2f)
570          .Add("duration", 2.0f));
571
572   Property::Map map6;
573   map6["target"] = "Actor2";
574   map6["property"] = "size";
575   map6["initialValue"] = Vector2(10,10);
576   map6["targetValue"] = Vector2(100,100);
577   map6["animator"] = Property::Map()
578     .Add("alphaFunction", "SIN")
579     .Add("timePeriod", Property::Map()
580          .Add("delay", 0.4f)
581          .Add("duration", 3.0f));
582
583   Property::Map map7;
584   map7["target"] = "Actor4";
585   map7["property"] = "sizeModeFactor";
586   map7["initialValue"] = Vector3(1,1,1);
587   map7["targetValue"] = Vector3(2,2,2);
588   map7["animator"] = Property::Map()
589     .Add("alphaFunction", "EASE_IN_SINE")
590     .Add("timePeriod", Property::Map()
591          .Add("delay", 0.0f)
592          .Add("duration", 1.0f));
593
594   Property::Map map8;
595   map8["target"] = "Visual1";
596   map8["property"] = "colorAlpha";
597   map8["targetValue"] = 1.0f;
598   map8["animator"] = Property::Map()
599     .Add("alphaFunction", "EASE_IN")
600     .Add("timePeriod", Property::Map()
601          .Add("delay", 0.3f)
602          .Add("duration", 9.0f));
603
604   Property::Map map9;
605   map9["target"] = "Actor2";
606   map9["property"] = "scale";
607   map9["initialValue"] = Vector3(0,0,0);
608   map9["targetValue"] = Vector3(1,1,1);
609   map9["animator"] = Property::Map()
610     .Add("alphaFunction", "REVERSE")
611     .Add("timePeriod", Property::Map()
612          .Add("delay", 0.0f)
613          .Add("duration", 1.0f));
614
615   Property::Map map10;
616   map10["target"] = "Actor1";
617   map10["property"] = "orientation";
618   map10["targetValue"] = Quaternion( Radian(Math::PI_2), Vector3::ZAXIS );
619
620   Property::Array array;
621   array.PushBack(map1);
622   array.PushBack(map2);
623   array.PushBack(map3);
624   array.PushBack(map4);
625   array.PushBack(map5);
626   array.PushBack(map6);
627   array.PushBack(map7);
628   array.PushBack(map8);
629   array.PushBack(map9);
630   array.PushBack(map10);
631
632   Dali::Toolkit::TransitionData transition = TransitionData::New( array );
633
634   DALI_TEST_EQUALS( transition.Count(), array.Count(), TEST_LOCATION );
635
636   for( unsigned int i=0; i < array.Count(); ++i )
637   {
638     Property::Map animatorMap = transition.GetAnimatorAt(i);
639     Property::Value& value = array.GetElementAt(i);
640     Property::Map* inputMap = value.GetMap();
641     DALI_TEST_CHECK( inputMap );
642     CHECK_MAP_EQUALS( *inputMap, animatorMap );
643   }
644
645   END_TEST;
646 }