END_TEST;
}
+int UtcDaliRenderTaskSetSourceActorDestroyed(void)
+{
+ TestApplication application;
+
+ tet_infoline( "Testing RenderTask::SetSourceActor - Set a source actor and destroy the source actor" );
+
+ Stage stage = Stage::GetCurrent();
+ RenderTaskList taskList = stage.GetRenderTaskList();
+ RenderTask task = taskList.GetTask( 0u );
+
+ Actor actor = task.GetSourceActor();
+ DALI_TEST_CHECK( actor );
+
+ BufferImage img = BufferImage::New( 1,1 );
+ Actor newActor = CreateRenderableActor( img );
+ newActor.SetSize(1,1);
+ stage.Add( newActor );
+
+ task.SetSourceActor( newActor );
+
+ DALI_TEST_CHECK( task.GetSourceActor() != actor );
+ DALI_TEST_CHECK( task.GetSourceActor() == newActor );
+
+ application.SendNotification();
+ application.Render();
+
+ // Destroy the source actor
+ stage.Remove( newActor );
+ newActor.Reset();
+
+ DALI_TEST_CHECK( !task.GetSourceActor() ); // The source actor should be an empty handle.
+
+ END_TEST;
+}
+
int UtcDaliRenderTaskGetSourceActorP01(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliRenderTaskSetCameraActorDestroyed(void)
+{
+ TestApplication application;
+
+ tet_infoline( "Testing RenderTask::SetCameraActor - Set a camera actor and destroy the camera actor" );
+
+ Stage stage = Stage::GetCurrent();
+ RenderTaskList taskList = stage.GetRenderTaskList();
+ RenderTask task = taskList.GetTask( 0u );
+
+ CameraActor newCameraActor = CameraActor::New();
+ task.SetCameraActor( newCameraActor );
+
+ DALI_TEST_EQUALS( task.GetCameraActor(), newCameraActor, TEST_LOCATION );
+
+ // Destroy the camera actor
+ newCameraActor.Reset();
+
+ CameraActor camera = task.GetCameraActor();
+ DALI_TEST_CHECK( !camera ); // The camera actor should be an empty handle.
+
+ END_TEST;
+}
int UtcDaliRenderTaskGetCameraActorP(void)
{