(Animation) Ensure AnimateBy updates the cached event-side properties
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Handle.cpp
index f66177b..19e04f6 100644 (file)
@@ -896,9 +896,36 @@ int UtcDaliHandleWeightNew(void)
 {
   TestApplication application;
 
-  Handle handle = WeightObject::New();;
+  Handle handle = WeightObject::New();
   DALI_TEST_CHECK( handle.GetProperty<float>(WeightObject::WEIGHT) == 0.0f );
 
+  // process the message so scene object is added to update manager
+  application.SendNotification();
+  application.Render(0);
+
+  // no message to release scene object in this scenario
+
+  END_TEST;
+}
+
+int UtcDaliHandleWeightNew2(void)
+{
+  TestApplication application;
+
+  // scope for the weight object
+  {
+    Handle handle = WeightObject::New();
+    DALI_TEST_CHECK( handle.GetProperty<float>(WeightObject::WEIGHT) == 0.0f );
+
+    // process the message so scene object is added to update manager
+    application.SendNotification();
+    application.Render(0);
+  }
+  // handle out of scope so object gets destroyed
+  // process the message so update manager destroys the scene object
+  application.SendNotification();
+  application.Render(0);
+
   END_TEST;
 }
 
@@ -942,14 +969,14 @@ int UtcDaliHandleCustomPropertySynchronousGetSet(void)
   tet_infoline( "Set the value, retrieve it and ensure both the synchronous and the async version work" );
   actor.SetProperty( index, 5.0f );
   DALI_TEST_EQUALS( actor.GetProperty< float >( index ), 5.0f, TEST_LOCATION );
-  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
   tet_infoline( "Render and retrieve values again" );
   application.SendNotification();
   application.Render(0);
 
   DALI_TEST_EQUALS( actor.GetProperty< float >( index ), 5.0f, TEST_LOCATION );
-  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), 5.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), 5.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -993,19 +1020,19 @@ int UtcDaliHandleGetCurrentProperty(void)
 {
   TestApplication application;
 
-  tet_infoline( "Get a default and non-animatable custom property using the DevelHandle::GetCurrentProperty API" );
+  tet_infoline( "Get a default and non-animatable custom property using the GetCurrentProperty API" );
 
   Actor actor = Actor::New();
   Stage::GetCurrent().Add( actor );
-  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
 
   Property::Index index = actor.RegisterProperty( "testProperty3", 1.0f, Property::READ_WRITE );
   DALI_TEST_EQUALS( actor.GetProperty< float >( index ), 1.0f, TEST_LOCATION );
-  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), 1.0f, TEST_LOCATION );
 
   actor.SetProperty( index, 2.0f );
   DALI_TEST_EQUALS( actor.GetProperty< float >( index ), 2.0f, TEST_LOCATION );
-  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), 2.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), 2.0f, TEST_LOCATION );
 
   END_TEST;
 }