Revert "[Tizen] Move DevelHandle::GetCurrentProperty to public"
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-RenderTask.cpp
index 20b9728..7e9ad26 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali/devel-api/events/hit-test-algorithm.h>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali-test-suite-utils.h>
 #include <dali/integration-api/debug.h>
 #include <test-native-image.h>
@@ -1415,7 +1416,7 @@ int UtcDaliRenderTaskSetViewportPosition(void)
   Vector2 newPosition2(32.0f, 32.0f);
   task.SetProperty( RenderTask::Property::VIEWPORT_POSITION, newPosition2 );
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition, TEST_LOCATION ); // still the old position
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition, TEST_LOCATION ); // still the old position
 
   // Update
   application.SendNotification();
@@ -1423,7 +1424,7 @@ int UtcDaliRenderTaskSetViewportPosition(void)
 
   DALI_TEST_EQUALS( task.GetCurrentViewportPosition(), newPosition2, Math::MACHINE_EPSILON_1, TEST_LOCATION );
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION );
 
   Vector2 newPosition3(64.0f, 0.0f);
   Animation animation = Animation::New(1.0f);
@@ -1431,12 +1432,12 @@ int UtcDaliRenderTaskSetViewportPosition(void)
   animation.Play();
 
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION );
 
   // Perform 1000ms worth of updates at which point animation should have completed.
   Wait(application, 1000);
   DALI_TEST_EQUALS( task.GetCurrentViewportPosition(), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
   END_TEST;
 }
@@ -1472,7 +1473,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
   Vector2 newSize2(50.0f, 50.0f);
   task.SetProperty( RenderTask::Property::VIEWPORT_SIZE, newSize2 );
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize, TEST_LOCATION ); // still the old position
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_SIZE ), newSize, TEST_LOCATION ); // still the old position
 
   // Update
   application.SendNotification();
@@ -1480,7 +1481,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
 
   DALI_TEST_EQUALS( task.GetCurrentViewportSize(), newSize2, Math::MACHINE_EPSILON_1, TEST_LOCATION );
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION );
 
   Vector2 newSize3(10.0f, 10.0f);
   Animation animation = Animation::New(1.0f);
@@ -1488,12 +1489,12 @@ int UtcDaliRenderTaskSetViewportSize(void)
   animation.Play();
 
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE  ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION );
 
   // Perform 1000ms worth of updates at which point animation should have completed.
   Wait(application, 1000);
   DALI_TEST_EQUALS( task.GetCurrentViewportSize(), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_SIZE ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
   DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE  ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
 
   END_TEST;
@@ -1522,14 +1523,14 @@ int UtcDaliRenderTaskSetClearColorP(void)
 
   task.SetProperty( RenderTask::Property::CLEAR_COLOR, testColor2 );
   DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), testColor, TEST_LOCATION ); // still the old color
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), testColor, TEST_LOCATION ); // still the old color
 
   // Wait a frame.
   Wait(application);
 
   DALI_TEST_EQUALS( task.GetClearColor(), testColor2, TEST_LOCATION );
   DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION );
 
   Vector4 newColor3(10.0f, 10.0f, 20.0f, 30.0f);
   Animation animation = Animation::New(1.0f);
@@ -1537,11 +1538,11 @@ int UtcDaliRenderTaskSetClearColorP(void)
   animation.Play();
 
   DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR  ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION );
 
   // Perform 1000ms worth of updates at which point animation should have completed.
   Wait(application, 1000);
-  DALI_TEST_EQUALS( task.GetCurrentProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
   DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR  ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION );
 
   END_TEST;
@@ -2753,12 +2754,12 @@ int UtcDaliRenderTaskRequiresSync(void)
   newTask.SetProperty( RenderTask::Property::REQUIRES_SYNC, false );
 
   DALI_TEST_EQUALS( newTask.GetProperty< bool >( RenderTask::Property::REQUIRES_SYNC ), false, TEST_LOCATION );
-  DALI_TEST_EQUALS( newTask.GetCurrentProperty< bool >( RenderTask::Property::REQUIRES_SYNC ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( newTask, RenderTask::Property::REQUIRES_SYNC ), false, TEST_LOCATION );
 
   newTask.SetProperty( RenderTask::Property::REQUIRES_SYNC, true );
 
   DALI_TEST_EQUALS( newTask.GetProperty< bool >( RenderTask::Property::REQUIRES_SYNC ), true, TEST_LOCATION );
-  DALI_TEST_EQUALS( newTask.GetCurrentProperty< bool >( RenderTask::Property::REQUIRES_SYNC ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( newTask, RenderTask::Property::REQUIRES_SYNC ), true, TEST_LOCATION );
 
   END_TEST;
 }