2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <dali/public-api/dali-core.h>
22 #include "dali-test-suite-utils/dali-test-suite-utils.h"
26 void handle_test_startup(void)
28 test_return_value = TET_UNDEF;
31 void handle_test_cleanup(void)
33 test_return_value = TET_PASS;
39 /// Allows the creation of a BaseObject
40 class BaseObjectType : public BaseObject
48 Handle ImplicitCopyConstructor(Handle passedByValue)
50 // object + copy + passedByValue, ref count == 3
51 DALI_TEST_CHECK(passedByValue);
54 DALI_TEST_EQUALS(3, passedByValue.GetBaseObject().ReferenceCount(), TEST_LOCATION);
60 void CheckTypeName(const Property::Type& type)
66 DALI_TEST_CHECK( "NONE" == std::string(PropertyTypes::GetName( type ) ) );
69 case Property::BOOLEAN:
71 DALI_TEST_CHECK( "BOOLEAN" == std::string(PropertyTypes::GetName( type ) ) );
76 DALI_TEST_CHECK( "FLOAT" == std::string(PropertyTypes::GetName( type ) ) );
79 case Property::INTEGER:
81 DALI_TEST_CHECK( "INTEGER" == std::string(PropertyTypes::GetName( type ) ) );
84 case Property::UNSIGNED_INTEGER:
86 DALI_TEST_CHECK( "UNSIGNED_INTEGER" == std::string(PropertyTypes::GetName( type ) ) );
89 case Property::VECTOR2:
91 DALI_TEST_CHECK( "VECTOR2" == std::string(PropertyTypes::GetName( type ) ) );
94 case Property::VECTOR3:
96 DALI_TEST_CHECK( "VECTOR3" == std::string(PropertyTypes::GetName( type ) ) );
99 case Property::VECTOR4:
101 DALI_TEST_CHECK( "VECTOR4" == std::string(PropertyTypes::GetName( type ) ) );
104 case Property::MATRIX3:
106 DALI_TEST_CHECK( "MATRIX3" == std::string(PropertyTypes::GetName( type ) ) );
109 case Property::MATRIX:
111 DALI_TEST_CHECK( "MATRIX" == std::string(PropertyTypes::GetName( type ) ) );
114 case Property::RECTANGLE:
116 DALI_TEST_CHECK( "RECTANGLE" == std::string(PropertyTypes::GetName( type ) ) );
119 case Property::ROTATION:
121 DALI_TEST_CHECK( "ROTATION" == std::string(PropertyTypes::GetName( type ) ) );
124 case Property::STRING:
126 DALI_TEST_CHECK( "STRING" == std::string(PropertyTypes::GetName( type ) ) );
129 case Property::ARRAY:
131 DALI_TEST_CHECK( "ARRAY" == std::string(PropertyTypes::GetName( type ) ) );
136 DALI_TEST_CHECK( "MAP" == std::string(PropertyTypes::GetName( type ) ) );
139 case Property::TYPE_COUNT:
141 DALI_TEST_CHECK( "NONE" == std::string(PropertyTypes::GetName( type ) ) );
151 int UtcDaliHandleConstructorVoid(void)
153 TestApplication application;
154 tet_infoline("Testing Dali::Handle::Handle()");
158 DALI_TEST_CHECK(!object);
162 int UtcDaliHandleCopyConstructor(void)
164 TestApplication application;
165 tet_infoline("Testing Dali::Handle::Handle(const Handle&)");
167 // Initialize an object, ref count == 1
168 Handle object = Actor::New();
170 DALI_TEST_EQUALS(1, object.GetBaseObject().ReferenceCount(), TEST_LOCATION);
172 // Copy the object, ref count == 2
174 DALI_TEST_CHECK(copy);
177 DALI_TEST_EQUALS(2, copy.GetBaseObject().ReferenceCount(), TEST_LOCATION);
181 // Pass by value, and return another copy, ref count == 3
182 Handle anotherCopy = ImplicitCopyConstructor(copy);
184 DALI_TEST_CHECK(anotherCopy);
187 DALI_TEST_EQUALS(3, anotherCopy.GetBaseObject().ReferenceCount(), TEST_LOCATION);
191 // anotherCopy out of scope, ref count == 2
192 DALI_TEST_CHECK(copy);
195 DALI_TEST_EQUALS(2, copy.GetBaseObject().ReferenceCount(), TEST_LOCATION);
200 int UtcDaliHandleAssignmentOperator(void)
202 TestApplication application;
203 tet_infoline("Testing Dali::Handle::operator=");
205 Handle object = Actor::New();
207 DALI_TEST_CHECK(object);
208 DALI_TEST_EQUALS(1, object.GetBaseObject().ReferenceCount(), TEST_LOCATION);
211 DALI_TEST_CHECK(!copy);
214 DALI_TEST_CHECK(copy);
215 DALI_TEST_EQUALS(2, copy.GetBaseObject().ReferenceCount(), TEST_LOCATION);
216 DALI_TEST_CHECK(&(copy.GetBaseObject()) == &(object.GetBaseObject()));
220 int UtcDaliHandleSupports(void)
222 tet_infoline("Positive Test Dali::Handle::Supports()");
223 TestApplication application;
225 Actor actor = Actor::New();
226 DALI_TEST_CHECK( true == actor.Supports( Handle::DYNAMIC_PROPERTIES ) );
230 int UtcDaliHandleGetPropertyCount(void)
232 tet_infoline("Positive Test Dali::Handle::GetPropertyCount()");
233 TestApplication application;
235 Actor actor = Actor::New();
236 int defaultPropertyCount( actor.GetPropertyCount() );
238 // Register a dynamic property
239 actor.RegisterProperty( "test-property", float(123.0f) );
240 DALI_TEST_CHECK( (defaultPropertyCount + 1u) == actor.GetPropertyCount() );
244 int UtcDaliHandleGetPropertyName(void)
246 tet_infoline("Positive Test Dali::Handle::GetPropertyName()");
247 TestApplication application;
249 Actor actor = Actor::New();
250 DALI_TEST_CHECK( "parent-origin" == actor.GetPropertyName( Actor::Property::ParentOrigin ) );
252 // Register a dynamic property
253 std::string name("this-name-should-match");
254 Property::Index index = actor.RegisterProperty( name, float(123.0f) );
255 DALI_TEST_CHECK( name == actor.GetPropertyName( index ) );
260 int UtcDaliHandleGetPropertyIndex(void)
262 tet_infoline("Positive Test Dali::Handle::GetPropertyIndex()");
263 TestApplication application;
265 Actor actor = Actor::New();
266 DALI_TEST_CHECK( Actor::Property::ParentOrigin == actor.GetPropertyIndex("parent-origin") );
268 // Register a dynamic property
269 std::string name("this-name-should-match");
270 Property::Index index = actor.RegisterProperty( name, float(123.0f) );
271 DALI_TEST_CHECK( index == actor.GetPropertyIndex( name ) );
275 int UtcDaliHandleIsPropertyWritable(void)
277 tet_infoline("Positive Test Dali::Handle::IsPropertyWritable()");
278 TestApplication application;
280 Actor actor = Actor::New();
282 // Actor properties which are writable:
283 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ParentOrigin ) );
284 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ParentOriginX ) );
285 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ParentOriginY ) );
286 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ParentOriginZ ) );
287 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::AnchorPoint ) );
288 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::AnchorPointX ) );
289 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::AnchorPointY ) );
290 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::AnchorPointZ ) );
291 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::Size ) );
292 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::SizeWidth ) );
293 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::SizeHeight ) );
294 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::SizeDepth ) );
295 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::Position ) );
296 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::PositionX ) );
297 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::PositionY ) );
298 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::PositionZ ) );
299 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::Rotation ) );
300 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::Scale ) );
301 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ScaleX ) );
302 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ScaleY ) );
303 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ScaleZ ) );
304 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::Visible ) );
305 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::Color ) );
306 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ColorRed ) );
307 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ColorGreen ) );
308 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ColorBlue ) );
309 DALI_TEST_CHECK( true == actor.IsPropertyWritable( Actor::Property::ColorAlpha ) );
311 // World-properties are not writable:
312 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldPosition ) );
313 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldRotation ) );
314 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldScale ) );
315 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldColor ) );
316 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldPositionX ) );
317 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldPositionY ) );
318 DALI_TEST_CHECK( false == actor.IsPropertyWritable( Actor::Property::WorldPositionZ ) );
323 int UtcDaliHandleIsPropertyAnimatable(void)
325 tet_infoline("Positive Test Dali::Handle::IsPropertyAnimatable()");
326 TestApplication application;
328 Actor actor = Actor::New();
330 // Actor properties which are animatable:
331 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::ParentOrigin ) );
332 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::ParentOriginX ) );
333 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::ParentOriginY ) );
334 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::ParentOriginZ ) );
335 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::AnchorPoint ) );
336 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::AnchorPointX ) );
337 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::AnchorPointY ) );
338 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::AnchorPointZ ) );
339 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::Size ) );
340 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::SizeWidth ) );
341 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::SizeHeight ) );
342 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::SizeDepth ) );
343 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::Position ) );
344 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::PositionX ) );
345 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::PositionY ) );
346 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::PositionZ ) );
347 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::Rotation ) );
348 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::Scale ) );
349 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ScaleX ) );
350 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ScaleY ) );
351 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ScaleZ ) );
352 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::Visible ) );
353 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::Color ) );
354 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ColorRed ) );
355 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ColorGreen ) );
356 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ColorBlue ) );
357 DALI_TEST_CHECK( true == actor.IsPropertyAnimatable( Actor::Property::ColorAlpha ) );
359 // World-properties can not be animated
360 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldPosition ) );
361 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldRotation ) );
362 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldScale ) );
363 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldColor ) );
364 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldPositionX ) );
365 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldPositionY ) );
366 DALI_TEST_CHECK( false == actor.IsPropertyAnimatable( Actor::Property::WorldPositionZ ) );
371 int UtcDaliHandleIsPropertyAConstraintInput(void)
373 TestApplication application;
375 Actor actor = Actor::New();
377 // Actor properties which can be used as a constraint input:
378 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ParentOrigin ) );
379 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ParentOriginX ) );
380 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ParentOriginY ) );
381 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ParentOriginZ ) );
382 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::AnchorPoint ) );
383 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::AnchorPointX ) );
384 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::AnchorPointY ) );
385 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::AnchorPointZ ) );
386 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::Size ) );
387 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::SizeWidth ) );
388 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::SizeHeight ) );
389 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::SizeDepth ) );
390 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::Position ) );
391 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::PositionX ) );
392 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::PositionY ) );
393 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::PositionZ ) );
394 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::Rotation ) );
395 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::Scale ) );
396 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ScaleX ) );
397 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ScaleY ) );
398 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ScaleZ ) );
399 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::Visible ) );
400 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::Color ) );
401 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ColorRed ) );
402 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ColorGreen ) );
403 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ColorBlue ) );
404 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::ColorAlpha ) );
405 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldPosition ) );
406 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldRotation ) );
407 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldScale ) );
408 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldColor ) );
409 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldPositionX ) );
410 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldPositionY ) );
411 DALI_TEST_CHECK( true == actor.IsPropertyAConstraintInput( Actor::Property::WorldPositionZ ) );
413 // Actor properties that cannot be used as a constraint input
414 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::Name ) );
415 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::Sensitive ) );
416 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::LeaveRequired ) );
417 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::InheritRotation ) );
418 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::InheritScale ) );
419 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::ColorMode ) );
420 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::PositionInheritance ) );
421 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::DrawMode ) );
422 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::SizeMode ) );
423 DALI_TEST_CHECK( false == actor.IsPropertyAConstraintInput( Actor::Property::SizeModeFactor ) );
429 int UtcDaliHandleGetPropertyType(void)
431 tet_infoline("Positive Test Dali::Handle::GetPropertyType()");
432 TestApplication application;
433 unsigned int unsingedIntTest = 33;
435 Actor actor = Actor::New();
436 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::ParentOrigin ) );
437 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::AnchorPoint ) );
438 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::Size ) );
439 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::Position ) );
440 DALI_TEST_CHECK( Property::ROTATION == actor.GetPropertyType( Actor::Property::Rotation ) );
441 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( Actor::Property::Scale ) );
442 DALI_TEST_CHECK( Property::BOOLEAN == actor.GetPropertyType( Actor::Property::Visible ) );
443 DALI_TEST_CHECK( Property::VECTOR4 == actor.GetPropertyType( Actor::Property::Color ) );
445 // Register some dynamic properties
446 Property::Index boolIndex = actor.RegisterProperty( "bool-property", bool(true) );
447 Property::Index floatIndex = actor.RegisterProperty( "float-property", float(123.0f) );
448 Property::Index intIndex = actor.RegisterProperty( "int-property", 123 );
449 Property::Index vector2Index = actor.RegisterProperty( "vector2-property", Vector2(1.0f, 2.0f) );
450 Property::Index vector3Index = actor.RegisterProperty( "vector3-property", Vector3(1.0f, 2.0f, 3.0f) );
451 Property::Index vector4Index = actor.RegisterProperty( "vector4-property", Vector4(1.0f, 2.0f, 3.0f, 4.0f) );
452 Property::Index rotationIndex = actor.RegisterProperty( "rotation-property", AngleAxis(Degree(180.0f), Vector3::YAXIS) );
454 DALI_TEST_CHECK( Property::BOOLEAN == actor.GetPropertyType( boolIndex ) );
455 DALI_TEST_CHECK( Property::FLOAT == actor.GetPropertyType( floatIndex ) );
456 DALI_TEST_CHECK( Property::INTEGER == actor.GetPropertyType( intIndex ) );
457 DALI_TEST_CHECK( Property::VECTOR2 == actor.GetPropertyType( vector2Index ) );
458 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( vector3Index ) );
459 DALI_TEST_CHECK( Property::VECTOR4 == actor.GetPropertyType( vector4Index ) );
460 DALI_TEST_CHECK( Property::ROTATION == actor.GetPropertyType( rotationIndex ) );
462 // Non animatable properties
463 Property::Index nonAnimStringIndex = actor.RegisterProperty( "man-from-delmonte", std::string("yes"), Property::READ_WRITE);
464 Property::Index nonAnimV2Index = actor.RegisterProperty( "v2", Vector2(1.f, 2.f), Property::READ_WRITE);
465 Property::Index nonAnimV3Index = actor.RegisterProperty( "v3", Vector3(1.f, 2.f, 3.f), Property::READ_WRITE);
466 Property::Index nonAnimV4Index = actor.RegisterProperty( "v4", Vector4(1.f, 2.f, 3.f, 4.f), Property::READ_WRITE);
467 Property::Index nonAnimBooleanIndex = actor.RegisterProperty( "bool", true, Property::READ_WRITE);
468 Property::Index nonAnimFloatIndex = actor.RegisterProperty( "float", 0.f, Property::READ_WRITE);
469 Property::Index nonAnimIntegerIndex = actor.RegisterProperty( "int", 0, Property::READ_WRITE);
470 Property::Index nonAnimUnsignedIntIndex = actor.RegisterProperty( "unsinged-int", unsingedIntTest, Property::READ_WRITE);
472 DALI_TEST_CHECK( nonAnimStringIndex != Property::INVALID_INDEX );
473 DALI_TEST_CHECK( nonAnimV2Index != Property::INVALID_INDEX );
474 DALI_TEST_CHECK( nonAnimV3Index != Property::INVALID_INDEX );
475 DALI_TEST_CHECK( nonAnimV4Index != Property::INVALID_INDEX );
476 DALI_TEST_CHECK( nonAnimBooleanIndex != Property::INVALID_INDEX );
477 DALI_TEST_CHECK( nonAnimFloatIndex != Property::INVALID_INDEX );
478 DALI_TEST_CHECK( nonAnimIntegerIndex != Property::INVALID_INDEX );
479 DALI_TEST_CHECK( nonAnimUnsignedIntIndex != Property::INVALID_INDEX );
481 DALI_TEST_CHECK( Property::STRING == actor.GetPropertyType( nonAnimStringIndex ) );
482 DALI_TEST_CHECK( Property::VECTOR2 == actor.GetPropertyType( nonAnimV2Index ) );
483 DALI_TEST_CHECK( Property::VECTOR3 == actor.GetPropertyType( nonAnimV3Index ) );
484 DALI_TEST_CHECK( Property::VECTOR4 == actor.GetPropertyType( nonAnimV4Index ) );
485 DALI_TEST_CHECK( Property::BOOLEAN == actor.GetPropertyType( nonAnimBooleanIndex ) );
486 DALI_TEST_CHECK( Property::FLOAT == actor.GetPropertyType( nonAnimFloatIndex ) );
487 DALI_TEST_CHECK( Property::INTEGER == actor.GetPropertyType( nonAnimIntegerIndex ) );
488 DALI_TEST_CHECK( Property::UNSIGNED_INTEGER == actor.GetPropertyType( nonAnimUnsignedIntIndex ) );
490 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimStringIndex ) );
491 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimV2Index ) );
492 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimV3Index ) );
493 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimV4Index ) );
494 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimBooleanIndex ) );
495 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimFloatIndex ) );
496 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimIntegerIndex ) );
497 DALI_TEST_CHECK( !actor.IsPropertyAnimatable( nonAnimUnsignedIntIndex ) );
499 DALI_TEST_EQUALS( "yes" , actor.GetProperty( nonAnimStringIndex ).Get<std::string>(), TEST_LOCATION );
500 DALI_TEST_EQUALS( Vector2(1.f, 2.f) , actor.GetProperty( nonAnimV2Index ).Get<Vector2>(), TEST_LOCATION );
501 DALI_TEST_EQUALS( Vector3(1.f, 2.f, 3.f) , actor.GetProperty( nonAnimV3Index ).Get<Vector3>(), TEST_LOCATION );
502 DALI_TEST_EQUALS( Vector4(1.f, 2.f, 3.f, 4.f) , actor.GetProperty( nonAnimV4Index ).Get<Vector4>(), TEST_LOCATION );
503 DALI_TEST_EQUALS( true, actor.GetProperty( nonAnimBooleanIndex ).Get<bool>(), TEST_LOCATION );
504 DALI_TEST_EQUALS( 0.f, actor.GetProperty( nonAnimFloatIndex ).Get<float>(), TEST_LOCATION );
505 DALI_TEST_EQUALS( 0, actor.GetProperty( nonAnimIntegerIndex ).Get<int>(), TEST_LOCATION );
506 DALI_TEST_EQUALS( unsingedIntTest, actor.GetProperty( nonAnimUnsignedIntIndex ).Get<unsigned int>(), TEST_LOCATION );
511 int UtcDaliHandleNonAnimtableProperties(void)
513 tet_infoline("Test Non Animatable Properties");
514 TestApplication application;
516 Actor actor = Actor::New();
518 Property::Index nonAnimStringIndex = actor.RegisterProperty( "man-from-delmonte", std::string("no"), Property::READ_WRITE);
520 //// modify writable?
523 actor.SetProperty( nonAnimStringIndex, Property::Value("yes") );
525 catch (Dali::DaliException& e)
527 DALI_TEST_CHECK(!"exception");
530 DALI_TEST_CHECK( "yes" == actor.GetProperty( nonAnimStringIndex ).Get<std::string>() );
532 //// cannot modify read only?
533 Property::Index readonly = actor.RegisterProperty( "float", 0.f, Property::READ_ONLY);
535 DALI_TEST_CHECK(!actor.IsPropertyAnimatable(readonly));
536 DALI_TEST_CHECK(!actor.IsPropertyWritable(readonly));
538 bool exception = false;
541 actor.SetProperty( readonly, Property::Value(1.f) );
543 catch (Dali::DaliException& e)
548 DALI_TEST_CHECK(!exception);// trying to set a read-only property is a no-op
550 DALI_TEST_EQUALS( 0.f, actor.GetProperty( readonly ).Get<float>(), TEST_LOCATION );
552 /// animatable can be set
553 Property::Index write_anim = actor.RegisterProperty( "write_float", 0.f, Property::ANIMATABLE);
555 DALI_TEST_CHECK(actor.IsPropertyAnimatable(write_anim));
556 DALI_TEST_CHECK(actor.IsPropertyWritable(write_anim));
561 actor.SetProperty( write_anim, Property::Value(1.f) );
563 catch (Dali::DaliException& e)
568 DALI_TEST_CHECK(!exception);
570 //// animate a non animatable property is a noop?
571 float durationSeconds(2.0f);
572 Animation animation = Animation::New(durationSeconds);
573 bool relativeValue(true);
579 animation.AnimateBy(Property(actor, nonAnimStringIndex), relativeValue, AlphaFunctions::EaseIn);
581 application.SendNotification();
582 application.Render(static_cast<unsigned int>(durationSeconds*0100.0f)/* some progress */);
584 catch (Dali::DaliException& e)
589 DALI_TEST_CHECK(!exception);
590 DALI_TEST_EQUALS( "yes", actor.GetProperty( nonAnimStringIndex ).Get<std::string>(), TEST_LOCATION );
595 int UtcDaliHandleNonAnimtableCompositeProperties(void)
597 tet_infoline("Test Non Animatable Composite Properties");
598 TestApplication application;
600 Actor actor = Actor::New();
602 Property::Value value(Property::ARRAY);
603 Property::Array anArray;
604 DALI_TEST_CHECK( Property::Value(anArray).GetType() == Property::ARRAY ); // 2nd constructor
606 value.AppendItem( Property::Value( 0.f ) );
607 value.AppendItem( "a string" );
608 value.SetItem(0, Property::Value( 5.f )); // exercise SetItem
610 int index = value.AppendItem( Vector3(1,2,3) );
612 DALI_TEST_EQUALS( 2, index, TEST_LOCATION);
613 DALI_TEST_EQUALS( 3, value.GetSize(), TEST_LOCATION);
615 Property::Index propertyIndex = actor.RegisterProperty( "composite", value, Property::READ_WRITE);
617 Property::Value out = actor.GetProperty( propertyIndex );
619 DALI_TEST_CHECK( Property::FLOAT == out.GetItem(0).GetType());
620 DALI_TEST_CHECK( Property::STRING == out.GetItem(1).GetType());
621 DALI_TEST_CHECK( Property::VECTOR3 == out.GetItem(2).GetType());
623 DALI_TEST_EQUALS( 5.f, out.GetItem(0).Get<float>(), TEST_LOCATION);
624 DALI_TEST_EQUALS( "a string", out.GetItem(1).Get<std::string>(), TEST_LOCATION);
625 DALI_TEST_EQUALS( Vector3(1,2,3), out.GetItem(2).Get<Vector3>(), TEST_LOCATION);
628 Property::Value valueMap(Property::MAP);
629 Property::Map aKindofMap;
630 DALI_TEST_CHECK( Property::Value(aKindofMap).GetType() == Property::MAP ); // 2nd constructor
632 valueMap.SetValue("key", 5.f);
633 valueMap.SetValue("2key", "a string");
635 DALI_TEST_EQUALS( true, valueMap.HasKey("key"), TEST_LOCATION);
636 DALI_TEST_EQUALS( "key", valueMap.GetKey(0), TEST_LOCATION);
638 DALI_TEST_EQUALS( true, valueMap.HasKey("2key"), TEST_LOCATION);
639 DALI_TEST_EQUALS( "2key", valueMap.GetKey(1), TEST_LOCATION);
641 DALI_TEST_EQUALS( 5.f, valueMap.GetValue("key").Get<float>(), TEST_LOCATION);
642 DALI_TEST_EQUALS( "a string", valueMap.GetValue("2key").Get<std::string>(), TEST_LOCATION);
644 valueMap.SetItem(0, Property::Value("a string"));
645 valueMap.SetItem(1, Property::Value(5.f));
647 DALI_TEST_EQUALS( 5.f, valueMap.GetValue("2key").Get<float>(), TEST_LOCATION);
648 DALI_TEST_EQUALS( "a string", valueMap.GetValue("key").Get<std::string>(), TEST_LOCATION);
651 valueMap = Property::Value(Property::MAP);
653 valueMap.SetValue("key", 5.f);
654 valueMap.SetValue("2key", "a string");
656 DALI_TEST_EQUALS( 5.f, valueMap.GetItem(0).Get<float>(), TEST_LOCATION);
657 DALI_TEST_EQUALS( "a string", valueMap.GetItem(1).Get<std::string>(), TEST_LOCATION);
659 DALI_TEST_EQUALS( 2, valueMap.GetSize(), TEST_LOCATION);
661 // composite types not animatable
662 bool exception = false;
665 /* Property::Index mapPropertyIndex = */ actor.RegisterProperty( "compositemap", value, Property::ANIMATABLE);
667 catch (Dali::DaliException& e)
670 DALI_TEST_PRINT_ASSERT( e );
673 DALI_TEST_EQUALS(exception, true, TEST_LOCATION);
676 Property::Value mapOfMaps(Property::MAP);
678 mapOfMaps.SetValue( "key", Property::Value(Property::MAP) );
679 mapOfMaps.SetValue( "2key", "a string" );
681 DALI_TEST_EQUALS( "a string", mapOfMaps.GetValue("2key").Get<std::string>(), TEST_LOCATION);
683 mapOfMaps.GetValue("key").SetValue("subkey", 5.f);
685 DALI_TEST_EQUALS( true, mapOfMaps.GetValue("key").HasKey("subkey"), TEST_LOCATION);
686 DALI_TEST_EQUALS( 5.f, mapOfMaps.GetValue("key").GetValue("subkey").Get<float>(), TEST_LOCATION);
689 Property::Value listOfMaps(Property::ARRAY);
691 listOfMaps.AppendItem( Property::Value(Property::MAP) );
692 listOfMaps.AppendItem( Property::Value(Property::MAP) );
694 listOfMaps.GetItem(0).SetValue("key", 5.f);
695 listOfMaps.GetItem(1).SetValue("key",10.f);
697 DALI_TEST_EQUALS( 5.f, listOfMaps.GetItem(0).GetValue("key").Get<float>(), TEST_LOCATION );
698 DALI_TEST_EQUALS( 10.f, listOfMaps.GetItem(1).GetValue("key").Get<float>(), TEST_LOCATION );
703 int UtcDaliHandleSetProperty01(void)
705 tet_infoline("Positive Test Dali::Handle::SetProperty()");
706 TestApplication application;
708 Actor actor = Actor::New();
709 DALI_TEST_CHECK( ParentOrigin::TOP_LEFT == actor.GetProperty( Actor::Property::ParentOrigin ).Get<Vector3>() );
711 actor.SetProperty( Actor::Property::ParentOrigin, ParentOrigin::CENTER );
712 // flush the queue and render once
713 application.SendNotification();
714 application.Render();
715 DALI_TEST_CHECK( ParentOrigin::CENTER == actor.GetProperty( Actor::Property::ParentOrigin ).Get<Vector3>() );
719 int UtcDaliHandleSetProperty02(void)
721 tet_infoline("Positive Test Dali::Handle::SetProperty()");
722 TestApplication application;
724 Actor actor = Actor::New();
726 DALI_TEST_CHECK( !actor.IsPropertyWritable( Actor::Property::WorldPosition ) );
728 // World position is not writable so this is a no-op and should not crash
729 actor.SetProperty( Actor::Property::WorldPosition, Vector3(1,2,3) );
734 int UtcDaliHandleRegisterProperty(void)
736 tet_infoline("Positive Test Dali::Handle::RegisterProperty()");
737 TestApplication application;
739 Actor actor = Actor::New();
740 DALI_TEST_CHECK( ParentOrigin::TOP_LEFT == actor.GetProperty( Actor::Property::ParentOrigin ).Get<Vector3>() );
745 int UtcDaliHandleGetProperty(void)
747 tet_infoline("Positive Test Dali::Handle::GetProperty()");
748 TestApplication application;
750 Actor actor = Actor::New();
752 DALI_TEST_CHECK( ParentOrigin::TOP_LEFT == actor.GetProperty( Actor::Property::ParentOrigin ).Get<Vector3>() );
753 DALI_TEST_CHECK( AnchorPoint::CENTER == actor.GetProperty( Actor::Property::AnchorPoint ).Get<Vector3>() );
754 DALI_TEST_CHECK( Vector3::ZERO == actor.GetProperty( Actor::Property::Size ).Get<Vector3>() );
755 DALI_TEST_CHECK( Vector3::ZERO == actor.GetProperty( Actor::Property::Position ).Get<Vector3>() );
756 DALI_TEST_CHECK( Vector3::ONE == actor.GetProperty( Actor::Property::Scale ).Get<Vector3>() );
757 DALI_TEST_CHECK( true == actor.GetProperty( Actor::Property::Visible ).Get<bool>() );
758 DALI_TEST_CHECK( Color::WHITE == actor.GetProperty( Actor::Property::Color ).Get<Vector4>() );
762 int UtcDaliHandleDownCast(void)
764 TestApplication application;
765 tet_infoline("Testing Dali::Handle::DownCast()");
767 Actor actor = Actor::New();
769 BaseHandle baseHandle = actor;
771 Handle handle = Handle::DownCast(baseHandle);
773 DALI_TEST_CHECK( handle );
775 baseHandle = BaseHandle();
777 handle = Handle::DownCast(baseHandle);
779 DALI_TEST_CHECK( !handle );
784 int UtcDaliHandleDownCastNegative(void)
786 TestApplication application;
788 // BaseObject is NOT an Object, so this DownCast should fail
789 BaseHandle handle( new BaseObjectType );
790 Handle customHandle1 = Handle::DownCast( handle );
791 DALI_TEST_CHECK( ! customHandle1 );
793 // A DownCast on an empty handle will also fail
795 Handle customHandle2 = Handle::DownCast( empty );
796 DALI_TEST_CHECK( ! customHandle2 );
800 int UtcDaliHandleCreateProperty(void)
802 TestApplication application;
803 tet_infoline("Testing PropertyTypes::GetName()");
805 Property::Type type = Property::NONE;
807 // Value(Value&) ctor and Value(Type&) ctor
808 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
809 DALI_TEST_CHECK( Property::NONE == type );
812 type = Property::BOOLEAN;
814 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
815 DALI_TEST_CHECK( PropertyTypes::Get<bool>() == type );
817 type = Property::FLOAT;
819 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
820 DALI_TEST_CHECK( PropertyTypes::Get<float>() == type );
822 type = Property::INTEGER;
824 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
825 DALI_TEST_CHECK( PropertyTypes::Get<int>() == type );
827 type = Property::UNSIGNED_INTEGER;
829 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
830 DALI_TEST_CHECK( PropertyTypes::Get<unsigned int>() == type );
832 type = Property::VECTOR2;
834 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
835 DALI_TEST_CHECK( PropertyTypes::Get<Vector2>() == type );
837 type = Property::VECTOR3;
839 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
840 DALI_TEST_CHECK( PropertyTypes::Get<Vector3>() == type );
842 type = Property::VECTOR4;
844 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
845 DALI_TEST_CHECK( PropertyTypes::Get<Vector4>() == type );
847 type = Property::MATRIX3;
849 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
850 DALI_TEST_CHECK( PropertyTypes::Get<Matrix3>() == type );
852 type = Property::MATRIX;
854 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
855 DALI_TEST_CHECK( PropertyTypes::Get<Matrix>() == type );
857 typedef Dali::Rect<int> Rectangle;
858 type = Property::RECTANGLE;
860 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
861 DALI_TEST_CHECK( PropertyTypes::Get<Rectangle>() == type );
863 type = Property::ROTATION;
865 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
866 DALI_TEST_CHECK( PropertyTypes::Get<Quaternion>() == type );
868 type = Property::ROTATION;
870 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
871 DALI_TEST_CHECK( PropertyTypes::Get<AngleAxis>() == type );
873 type = Property::STRING;
875 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
876 DALI_TEST_CHECK( PropertyTypes::Get<std::string>() == type );
878 type = Property::ARRAY;
880 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
881 DALI_TEST_CHECK( PropertyTypes::Get<Property::Array>() == type );
883 type = Property::MAP;
885 DALI_TEST_CHECK( Property::Value(Property::Value(type)).GetType() == type );
886 DALI_TEST_CHECK( PropertyTypes::Get<Property::Map>() == type );
890 int UtcDaliHandleGetPropertyGet(void)
892 TestApplication application;
893 tet_infoline("Testing PropertyTypes::GetName()");
895 Property::Value value;
898 value = Property::Value(true);
900 DALI_TEST_CHECK( true == b );
903 value = Property::Value(10.f);
905 DALI_TEST_CHECK( Dali::Equals(10.f, f) );
908 value = Property::Value(10);
910 DALI_TEST_CHECK( 10 == i );
913 value = Property::Value(10U);
915 DALI_TEST_CHECK( 10 == ui );
917 Vector2 v2 = Vector2(0,0);
918 value = Property::Value( Vector2(1,1) );
920 DALI_TEST_CHECK( Vector2(1,1) == v2 );
922 Vector3 v3 = Vector3(0.f,0.f,0.f);
923 value = Property::Value( Vector3(1.f,1.f,1.f) );
925 DALI_TEST_CHECK( Vector3(1.f,1.f,1.f) == v3 );
927 Vector4 v4 = Vector4(0,0,0,0);
928 value = Property::Value( Vector4(1,1,1,1) );
930 DALI_TEST_CHECK( Vector4(1,1,1,1) == v4 );
932 Matrix3 m3 = Matrix3(0.f,0.f,0.f,0.f,0.f,0.f,0.f,0.f,0.f);
933 value = Property::Value( Matrix3::IDENTITY );
935 DALI_TEST_CHECK( Matrix3::IDENTITY == m3 );
937 Matrix m = Matrix(true);
938 value = Property::Value( Matrix::IDENTITY );
940 DALI_TEST_CHECK( Matrix::IDENTITY == m );
942 typedef Dali::Rect<int> Rectangle;
943 Rectangle r = Rectangle(0,0,0,0);
944 value = Property::Value( Rectangle(1,1,1,1) );
946 DALI_TEST_CHECK( Rectangle(1,1,1,1) == r );
948 Quaternion q = Quaternion(0,0,0,0);
949 value = Property::Value( Quaternion(1,1,1,1) );
951 DALI_TEST_CHECK( Quaternion(1,1,1,1) == q );
953 AngleAxis aa = AngleAxis( Degree(0), Vector3(0.f,0.f,0.f) );
954 value = Property::Value( AngleAxis( Radian(Math::PI_2), Vector3::XAXIS ));
956 Quaternion r8(Radian(Degree(aa.angle)), aa.axis);
957 DALI_TEST_EQUALS(r8, Quaternion(Math::PI_2, Vector3::XAXIS), 0.001, TEST_LOCATION);
959 std::string s = "no";
960 value = Property::Value("yes");
962 DALI_TEST_CHECK( "yes" == s );
964 Property::Array array;
965 value = Property::Value(Property::ARRAY);
966 value.AppendItem(10);
969 array[0].Get(getItem);
970 DALI_TEST_CHECK( getItem == 10 );
973 value = Property::Value(Property::MAP);
974 value.SetValue("key", "value");
976 DALI_TEST_CHECK( map.GetKey(0) == "key" );
981 int UtcDaliHandleGetPropertyIndices(void)
983 TestApplication application;
984 Property::IndexContainer indices;
987 Actor actor = Actor::New();
988 actor.GetPropertyIndices( indices );
989 DALI_TEST_CHECK( ! indices.empty() );
990 DALI_TEST_EQUALS( indices.size(), actor.GetPropertyCount(), TEST_LOCATION );
994 int UtcDaliHandleRegisterPropertyTypes(void)
996 TestApplication application;
998 struct PropertyTypeAnimatable
1001 Property::Value value;
1005 Property::Array array;
1008 PropertyTypeAnimatable properties[] =
1010 { "Property::BOOLEAN", true, true },
1011 { "Property::FLOAT", 1.0f, true },
1012 { "Property::INTEGER", 1, true },
1013 { "Property::UNSIGNED_INTEGER", 1u, false },
1014 { "Property::VECTOR2", Vector2::ONE, true },
1015 { "Property::VECTOR3", Vector3::ONE, true },
1016 { "Property::VECTOR4", Vector4::ONE, true },
1017 { "Property::MATRIX3", Matrix3::IDENTITY, true },
1018 { "Property::MATRIX", Matrix::IDENTITY, true },
1019 { "Property::RECTANGLE", Rect<int>(), false },
1020 { "Property::ROTATION", AngleAxis(), true },
1021 { "Property::STRING", std::string("Me"), false },
1022 { "Property::ARRAY", array, false },
1023 { "Property::MAP", map, false },
1025 unsigned int numOfProperties( sizeof( properties ) / sizeof( properties[0] ) );
1027 for ( unsigned int i = 0; i < numOfProperties; ++i )
1029 tet_printf( "Testing: %s\n", properties[i].name );
1031 bool exception = false;
1034 Actor actor = Actor::New();
1035 actor.RegisterProperty( "man-from-delmonte", properties[i].value );
1037 catch (Dali::DaliException& e)
1042 DALI_TEST_CHECK( properties[i].animatable != exception );
1047 int UtcDaliHandleCustomProperty(void)
1049 TestApplication application;
1051 Handle handle = Handle::New();
1053 float startValue(1.0f);
1054 Property::Index index = handle.RegisterProperty( "test-property", startValue );
1055 DALI_TEST_CHECK( handle.GetProperty<float>(index) == startValue );
1057 application.SendNotification();
1058 application.Render(0);
1059 DALI_TEST_CHECK( handle.GetProperty<float>(index) == startValue );
1060 application.Render(0);
1061 DALI_TEST_CHECK( handle.GetProperty<float>(index) == startValue );
1063 handle.SetProperty( index, 5.0f );
1065 application.SendNotification();
1066 application.Render(0);
1067 DALI_TEST_CHECK( handle.GetProperty<float>(index) == 5.0f );
1068 application.Render(0);
1069 DALI_TEST_CHECK( handle.GetProperty<float>(index) == 5.0f );