X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-EffectsView.cpp;h=fbaa3de9acf820556526367c51f5a4185dd1e576;hp=d597f7a6a850e7f30d406305bc8eae3d4d237a59;hb=HEAD;hpb=851f310dc14f9a8ea99b458519c84533e57e3e92 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp index d597f7a..811fc2f 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,12 @@ * */ -#include #include +#include #include + #include + #include #include @@ -40,16 +42,16 @@ int UtcDaliEffectsViewNew(void) ToolkitTestApplication application; EffectsView view; - DALI_TEST_CHECK( !view ); + DALI_TEST_CHECK(!view); - view = EffectsView::New( EffectsView::DROP_SHADOW ); - DALI_TEST_CHECK( view ); + view = EffectsView::New(EffectsView::DROP_SHADOW); + DALI_TEST_CHECK(view); - Stage::GetCurrent().Add( view ); + application.GetScene().Add(view); view.Reset(); - view = EffectsView::New( EffectsView::EMBOSS ); - DALI_TEST_CHECK( view ); + view = EffectsView::New(EffectsView::EMBOSS); + DALI_TEST_CHECK(view); application.SendNotification(); application.Render(); @@ -61,21 +63,21 @@ int UtcDaliEffectsViewCopyAndAssignment(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); - DALI_TEST_CHECK( view ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); + DALI_TEST_CHECK(view); - EffectsView copy( view ); - DALI_TEST_CHECK( copy == view ); + EffectsView copy(view); + DALI_TEST_CHECK(copy == view); EffectsView assign; - DALI_TEST_CHECK( !assign ); + DALI_TEST_CHECK(!assign); assign = view; - DALI_TEST_CHECK( assign == view ); + DALI_TEST_CHECK(assign == view); // Self assignment assign = assign; - DALI_TEST_CHECK( assign ); - DALI_TEST_CHECK( assign == view ); + DALI_TEST_CHECK(assign); + DALI_TEST_CHECK(assign == view); END_TEST; } @@ -84,14 +86,14 @@ int UtcDaliEffectsViewDownCast(void) { ToolkitTestApplication application; - BaseHandle view = EffectsView::New( EffectsView::EMBOSS ); - DALI_TEST_CHECK( EffectsView::DownCast( view ) ); + BaseHandle view = EffectsView::New(EffectsView::EMBOSS); + DALI_TEST_CHECK(EffectsView::DownCast(view)); BaseHandle empty; - DALI_TEST_CHECK( ! EffectsView::DownCast( empty ) ); + DALI_TEST_CHECK(!EffectsView::DownCast(empty)); BaseHandle another = Actor::New(); - DALI_TEST_CHECK( ! EffectsView::DownCast( another ) ); + DALI_TEST_CHECK(!EffectsView::DownCast(another)); END_TEST; } @@ -102,29 +104,27 @@ int UtcDaliEffectsViewAddRemoveDropShadow(void) ToolkitTestApplication application; tet_infoline("UtcDaliEffectsViewAddRemoveDropShadow"); - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); - DALI_TEST_CHECK( view ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); + DALI_TEST_CHECK(view); Actor actor = Actor::New(); - DALI_TEST_CHECK( !actor.OnStage() ); - + DALI_TEST_CHECK(!actor.GetProperty(Actor::Property::CONNECTED_TO_SCENE)); - view.SetParentOrigin(ParentOrigin::CENTER); - view.SetSize(Stage::GetCurrent().GetSize()); + view.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); + view.SetProperty(Actor::Property::SIZE, application.GetScene().GetSize()); view.Add(actor); - Stage::GetCurrent().Add(view); + application.GetScene().Add(view); - DALI_TEST_CHECK( actor.OnStage() ); - DALI_TEST_CHECK( actor.GetParent() ); - DALI_TEST_CHECK( actor.GetParent() != view ); + DALI_TEST_CHECK(actor.GetProperty(Actor::Property::CONNECTED_TO_SCENE)); + DALI_TEST_CHECK(actor.GetParent()); + DALI_TEST_CHECK(actor.GetParent() != view); view.Remove(actor); - DALI_TEST_CHECK( !actor.OnStage() ); + DALI_TEST_CHECK(!actor.GetProperty(Actor::Property::CONNECTED_TO_SCENE)); END_TEST; } - int UtcDaliEffectsViewAddRemoveEmboss(void) { ToolkitTestApplication application; @@ -133,36 +133,36 @@ int UtcDaliEffectsViewAddRemoveEmboss(void) tet_infoline("Checking number of render tasks = 1"); application.SendNotification(); application.Render(); - Stage stage = Stage::GetCurrent(); - DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION ); + Integration::Scene stage = application.GetScene(); + DALI_TEST_EQUALS(stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION); tet_infoline("Create effects view"); - EffectsView view = EffectsView::New( EffectsView::EMBOSS ); - Vector3 offsetSet( 2.f, 3.f, 4.f ); - Vector4 colorSet( 0.2f, 0.3f, 0.4f, 0.5f ); - view.SetProperty( EffectsView::Property::EFFECT_OFFSET, offsetSet); - view.SetProperty( EffectsView::Property::EFFECT_COLOR, colorSet); - Vector3 offsetAnimate( 4.f, 6.f, 8.f ); - float durationSeconds(0.05f); - Animation animation = Animation::New( durationSeconds ); - animation.AnimateTo( Property(view,EffectsView::Property::EFFECT_OFFSET ), offsetAnimate ); + EffectsView view = EffectsView::New(EffectsView::EMBOSS); + Vector3 offsetSet(2.f, 3.f, 4.f); + Vector4 colorSet(0.2f, 0.3f, 0.4f, 0.5f); + view.SetProperty(EffectsView::Property::EFFECT_OFFSET, offsetSet); + view.SetProperty(EffectsView::Property::EFFECT_COLOR, colorSet); + Vector3 offsetAnimate(4.f, 6.f, 8.f); + float durationSeconds(0.05f); + Animation animation = Animation::New(durationSeconds); + animation.AnimateTo(Property(view, EffectsView::Property::EFFECT_OFFSET), offsetAnimate); animation.Play(); - DALI_TEST_CHECK( view ); + DALI_TEST_CHECK(view); Actor actor = Actor::New(); - actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - DALI_TEST_CHECK( !actor.OnStage() ); + actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS); + DALI_TEST_CHECK(!actor.GetProperty(Actor::Property::CONNECTED_TO_SCENE)); - view.SetParentOrigin(ParentOrigin::CENTER); + view.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); view.Add(actor); - view.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + view.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS); stage.Add(view); - DALI_TEST_CHECK( actor.OnStage() ); + DALI_TEST_CHECK(actor.GetProperty(Actor::Property::CONNECTED_TO_SCENE)); application.SendNotification(); application.Render(); @@ -171,33 +171,32 @@ int UtcDaliEffectsViewAddRemoveEmboss(void) stage.Remove(view); tet_infoline("Checking number of render tasks = 1"); - DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION ); + DALI_TEST_EQUALS(stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION); tet_infoline("Adding view to stage again re-enables view"); stage.Add(view); tet_infoline("Removing view from stage disables view"); - DALI_TEST_GREATER( stage.GetRenderTaskList().GetTaskCount(), 1u, TEST_LOCATION ); + DALI_TEST_GREATER(stage.GetRenderTaskList().GetTaskCount(), 1u, TEST_LOCATION); stage.Remove(view); view.Reset(); tet_infoline("Checking number of render tasks = 1"); - DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION ); + DALI_TEST_EQUALS(stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION); END_TEST; } - int UtcDaliEffectsViewGetTypeP(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); - DALI_TEST_CHECK( view.GetType() == EffectsView::DROP_SHADOW ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); + DALI_TEST_CHECK(view.GetType() == EffectsView::DROP_SHADOW); view.Reset(); - view = EffectsView::New( EffectsView::EMBOSS ); - DALI_TEST_CHECK( view.GetType() == EffectsView::EMBOSS ); + view = EffectsView::New(EffectsView::EMBOSS); + DALI_TEST_CHECK(view.GetType() == EffectsView::EMBOSS); END_TEST; } @@ -207,14 +206,14 @@ int UtcDaliEffectsViewOnStage(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::EMBOSS); - view.SetSize(100.f, 100.f); - Stage stage = Stage::GetCurrent(); - DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); + view.SetProperty(Actor::Property::SIZE, Vector2(100.f, 100.f)); + Integration::Scene stage = application.GetScene(); + DALI_TEST_CHECK(stage.GetRenderTaskList().GetTaskCount() == 1); - stage.Add( view ); + stage.Add(view); application.SendNotification(); application.Render(); - DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() > 1 ); + DALI_TEST_CHECK(stage.GetRenderTaskList().GetTaskCount() > 1); END_TEST; } @@ -224,19 +223,19 @@ int UtcDaliEffectsViewOffStage(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize(100.f, 100.f); - Stage stage = Stage::GetCurrent(); - DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); + view.SetProperty(Actor::Property::SIZE, Vector2(100.f, 100.f)); + Integration::Scene stage = application.GetScene(); + DALI_TEST_CHECK(stage.GetRenderTaskList().GetTaskCount() == 1); - stage.Add( view ); + stage.Add(view); application.SendNotification(); application.Render(); - DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() > 1 ); + DALI_TEST_CHECK(stage.GetRenderTaskList().GetTaskCount() > 1); - stage.Remove( view ); + stage.Remove(view); application.SendNotification(); application.Render(); - DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); + DALI_TEST_CHECK(stage.GetRenderTaskList().GetTaskCount() == 1); END_TEST; } @@ -245,15 +244,15 @@ int UtcDaliEffectsViewRefreshP(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); try { view.Refresh(); - DALI_TEST_CHECK( true ); + DALI_TEST_CHECK(true); } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( false ); // Should not get here! + DALI_TEST_CHECK(false); // Should not get here! } END_TEST; @@ -267,11 +266,11 @@ int UtcDaliEffectsViewRefreshN(void) try { view.Refresh(); - DALI_TEST_CHECK( false ); // Should not get here + DALI_TEST_CHECK(false); // Should not get here } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( true ); + DALI_TEST_CHECK(true); } END_TEST; @@ -281,15 +280,15 @@ int UtcDaliEffectsViewSetPixelFormatP(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); try { - view.SetPixelFormat( Pixel::RGBA8888 ); - DALI_TEST_CHECK( true ); + view.SetPixelFormat(Pixel::RGBA8888); + DALI_TEST_CHECK(true); } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( false ); // Should not get here! + DALI_TEST_CHECK(false); // Should not get here! } END_TEST; @@ -302,12 +301,12 @@ int UtcDaliEffectsViewSetPixelFormatN(void) EffectsView view; try { - view.SetPixelFormat( Pixel::RGBA8888 ); - DALI_TEST_CHECK( false ); // Should not get here + view.SetPixelFormat(Pixel::RGBA8888); + DALI_TEST_CHECK(false); // Should not get here } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( true ); + DALI_TEST_CHECK(true); } END_TEST; @@ -317,16 +316,16 @@ int UtcDaliEffectsViewSizeProperty(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - Property::Index idx = view.GetPropertyIndex( "effectSize" ); - DALI_TEST_EQUALS( idx, (Property::Index)EffectsView::Property::EFFECT_SIZE, TEST_LOCATION ); + Property::Index idx = view.GetPropertyIndex("effectSize"); + DALI_TEST_EQUALS(idx, (Property::Index)EffectsView::Property::EFFECT_SIZE, TEST_LOCATION); - view.SetProperty( idx, 5 ); - Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_SIZE ); - int size; - DALI_TEST_CHECK( value.Get(size) ); - DALI_TEST_CHECK( size == 5 ); + view.SetProperty(idx, 5); + Property::Value value = view.GetProperty(EffectsView::Property::EFFECT_SIZE); + int size; + DALI_TEST_CHECK(value.Get(size)); + DALI_TEST_CHECK(size == 5); END_TEST; } @@ -335,33 +334,33 @@ int UtcDaliEffectsViewOffsetProperty(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::EMBOSS ); - Stage::GetCurrent().Add( view ); + EffectsView view = EffectsView::New(EffectsView::EMBOSS); + application.GetScene().Add(view); - Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET ); - Vector3 offsetValue; - DALI_TEST_CHECK( value.Get(offsetValue) ); - DALI_TEST_EQUALS( offsetValue, Vector3::ZERO, TEST_LOCATION ); + Property::Value value = view.GetProperty(EffectsView::Property::EFFECT_OFFSET); + Vector3 offsetValue; + DALI_TEST_CHECK(value.Get(offsetValue)); + DALI_TEST_EQUALS(offsetValue, Vector3::ZERO, TEST_LOCATION); - Vector3 offsetSet( 2.f, 3.f, 4.f ); - view.SetProperty( EffectsView::Property::EFFECT_OFFSET, offsetSet); + Vector3 offsetSet(2.f, 3.f, 4.f); + view.SetProperty(EffectsView::Property::EFFECT_OFFSET, offsetSet); application.SendNotification(); application.Render(0); - value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET ); + value = view.GetProperty(EffectsView::Property::EFFECT_OFFSET); value.Get(offsetValue); - DALI_TEST_EQUALS( offsetValue, offsetSet, TEST_LOCATION ); + DALI_TEST_EQUALS(offsetValue, offsetSet, TEST_LOCATION); - Vector3 offsetAnimate( 4.f, 6.f, 8.f ); - float durationSeconds(0.05f); - Animation animation = Animation::New( durationSeconds ); - animation.AnimateTo( Property(view,EffectsView::Property::EFFECT_OFFSET ), offsetAnimate ); + Vector3 offsetAnimate(4.f, 6.f, 8.f); + float durationSeconds(0.05f); + Animation animation = Animation::New(durationSeconds); + animation.AnimateTo(Property(view, EffectsView::Property::EFFECT_OFFSET), offsetAnimate); animation.Play(); application.SendNotification(); - application.Render(static_cast(durationSeconds*1000.0f) + 1u/*just beyond the animation duration*/); + application.Render(static_cast(durationSeconds * 1000.0f) + 1u /*just beyond the animation duration*/); - value = view.GetCurrentProperty( EffectsView::Property::EFFECT_OFFSET ); + value = view.GetCurrentProperty(EffectsView::Property::EFFECT_OFFSET); value.Get(offsetValue); - DALI_TEST_EQUALS( offsetValue, offsetAnimate, TEST_LOCATION ); + DALI_TEST_EQUALS(offsetValue, offsetAnimate, TEST_LOCATION); END_TEST; } @@ -370,33 +369,33 @@ int UtcDaliEffectsViewColorProperty(void) { ToolkitTestApplication application; - EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); - Stage::GetCurrent().Add( view ); + EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); + application.GetScene().Add(view); - Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_COLOR ); - Vector4 colorValue; - DALI_TEST_CHECK( value.Get(colorValue) ); - DALI_TEST_EQUALS( colorValue, Color::WHITE, TEST_LOCATION ); + Property::Value value = view.GetProperty(EffectsView::Property::EFFECT_COLOR); + Vector4 colorValue; + DALI_TEST_CHECK(value.Get(colorValue)); + DALI_TEST_EQUALS(colorValue, Color::WHITE, TEST_LOCATION); - Vector4 colorSet( 0.2f, 0.3f, 0.4f, 0.5f ); - view.SetProperty( EffectsView::Property::EFFECT_COLOR, colorSet); + Vector4 colorSet(0.2f, 0.3f, 0.4f, 0.5f); + view.SetProperty(EffectsView::Property::EFFECT_COLOR, colorSet); application.SendNotification(); application.Render(0); - value = view.GetProperty( EffectsView::Property::EFFECT_COLOR ); + value = view.GetProperty(EffectsView::Property::EFFECT_COLOR); value.Get(colorValue); - DALI_TEST_EQUALS( colorValue, colorSet, TEST_LOCATION ); + DALI_TEST_EQUALS(colorValue, colorSet, TEST_LOCATION); - Vector4 colorAnimate( 0.5f, 0.6f, 0.8f, 1.f ); - float durationSeconds(0.05f); - Animation animation = Animation::New( durationSeconds ); - animation.AnimateTo( Property(view,EffectsView::Property::EFFECT_COLOR ), colorAnimate ); + Vector4 colorAnimate(0.5f, 0.6f, 0.8f, 1.f); + float durationSeconds(0.05f); + Animation animation = Animation::New(durationSeconds); + animation.AnimateTo(Property(view, EffectsView::Property::EFFECT_COLOR), colorAnimate); animation.Play(); application.SendNotification(); - application.Render(static_cast(durationSeconds*1000.0f) + 1u/*just beyond the animation duration*/); + application.Render(static_cast(durationSeconds * 1000.0f) + 1u /*just beyond the animation duration*/); - value = view.GetCurrentProperty( EffectsView::Property::EFFECT_COLOR ); + value = view.GetCurrentProperty(EffectsView::Property::EFFECT_COLOR); value.Get(colorValue); - DALI_TEST_EQUALS( colorValue, colorAnimate, TEST_LOCATION ); + DALI_TEST_EQUALS(colorValue, colorAnimate, TEST_LOCATION); END_TEST; } @@ -406,11 +405,11 @@ int UtcDaliEffectsViewGetSetBackgroundColor(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetBackgroundColor( Color::RED ); - DALI_TEST_CHECK( Color::RED == view.GetBackgroundColor() ); + view.SetBackgroundColor(Color::RED); + DALI_TEST_CHECK(Color::RED == view.GetBackgroundColor()); - view.SetBackgroundColor( Color::YELLOW ); - DALI_TEST_CHECK( Color::YELLOW == view.GetBackgroundColor() ); + view.SetBackgroundColor(Color::YELLOW); + DALI_TEST_CHECK(Color::YELLOW == view.GetBackgroundColor()); END_TEST; } @@ -422,12 +421,12 @@ int UtcDaliEffectsViewSetBackgroundColorN(void) EffectsView view; try { - view.SetBackgroundColor( Color::RED ); - DALI_TEST_CHECK( false ); // Should not get here + view.SetBackgroundColor(Color::RED); + DALI_TEST_CHECK(false); // Should not get here } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( true ); + DALI_TEST_CHECK(true); } END_TEST; @@ -442,11 +441,11 @@ int UtcDaliEffectsViewGetBackgroundColorN(void) { Vector4 color = view.GetBackgroundColor(); (void)color; - DALI_TEST_CHECK( false ); // Should not get here + DALI_TEST_CHECK(false); // Should not get here } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( true ); + DALI_TEST_CHECK(true); } END_TEST; @@ -457,21 +456,21 @@ int UtcDaliEffectsViewSetRefreshOnDemandP(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize(100.f, 100.f); + view.SetProperty(Actor::Property::SIZE, Vector2(100.f, 100.f)); - Stage stage = Stage::GetCurrent(); - stage.Add( view ); + Integration::Scene stage = application.GetScene(); + stage.Add(view); application.SendNotification(); application.Render(); RenderTaskList renderTaskList = stage.GetRenderTaskList(); - DALI_TEST_CHECK( renderTaskList.GetTask( 1 ).GetRefreshRate() == RenderTask::REFRESH_ALWAYS ); + DALI_TEST_CHECK(renderTaskList.GetTask(1).GetRefreshRate() == RenderTask::REFRESH_ALWAYS); - view.SetRefreshOnDemand( true ); - DALI_TEST_CHECK( renderTaskList.GetTask( 1 ).GetRefreshRate() == RenderTask::REFRESH_ONCE ); + view.SetRefreshOnDemand(true); + DALI_TEST_CHECK(renderTaskList.GetTask(1).GetRefreshRate() == RenderTask::REFRESH_ONCE); - view.SetRefreshOnDemand( false ); - DALI_TEST_CHECK( renderTaskList.GetTask( 1 ).GetRefreshRate() == RenderTask::REFRESH_ALWAYS ); + view.SetRefreshOnDemand(false); + DALI_TEST_CHECK(renderTaskList.GetTask(1).GetRefreshRate() == RenderTask::REFRESH_ALWAYS); END_TEST; } @@ -483,12 +482,12 @@ int UtcDaliEffectsViewSetRefreshOnDemandN(void) EffectsView view; try { - view.SetRefreshOnDemand( false ); - DALI_TEST_CHECK( false ); // Should not get here + view.SetRefreshOnDemand(false); + DALI_TEST_CHECK(false); // Should not get here } - catch( ... ) + catch(...) { - DALI_TEST_CHECK( true ); + DALI_TEST_CHECK(true); } END_TEST; @@ -497,39 +496,39 @@ int UtcDaliEffectsViewSetRefreshOnDemandN(void) int UtcDaliEffectsViewSizeSet(void) { ToolkitTestApplication application; - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); { EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize( 200.0f, 200.0f, 0.0f ); - stage.Add( view ); + view.SetProperty(Actor::Property::SIZE, Vector3(200.0f, 200.0f, 0.0f)); + stage.Add(view); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS(view.GetCurrentProperty(Actor::Property::SIZE), Vector3(200.0f, 200.0f, 0.0f), TEST_LOCATION); } { EffectsView view = EffectsView::New(EffectsView::EMBOSS); - view.SetSize( 200.0f, 200.0f, 0.0f ); - stage.Add( view ); + view.SetProperty(Actor::Property::SIZE, Vector3(200.0f, 200.0f, 0.0f)); + stage.Add(view); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS(view.GetCurrentProperty(Actor::Property::SIZE), Vector3(200.0f, 200.0f, 0.0f), TEST_LOCATION); } { EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize( 200.0f, 200.0f, 0.0f ); - stage.Add( view ); + view.SetProperty(Actor::Property::SIZE, Vector3(200.0f, 200.0f, 0.0f)); + stage.Add(view); application.SendNotification(); application.Render(); - stage.Remove( view ); + stage.Remove(view); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS(view.GetCurrentProperty(Actor::Property::SIZE), Vector3(200.0f, 200.0f, 0.0f), TEST_LOCATION); } END_TEST; @@ -540,16 +539,16 @@ int UtcDaliEffectsViewTypeRegistry(void) ToolkitTestApplication application; TypeRegistry typeRegistry = TypeRegistry::Get(); - DALI_TEST_CHECK( typeRegistry ); + DALI_TEST_CHECK(typeRegistry); - TypeInfo typeInfo = typeRegistry.GetTypeInfo( "EffectsView" ); - DALI_TEST_CHECK( typeInfo ); + TypeInfo typeInfo = typeRegistry.GetTypeInfo("EffectsView"); + DALI_TEST_CHECK(typeInfo); BaseHandle handle = typeInfo.CreateInstance(); - DALI_TEST_CHECK( handle ); + DALI_TEST_CHECK(handle); - EffectsView view = EffectsView::DownCast( handle ); - DALI_TEST_CHECK( view ); + EffectsView view = EffectsView::DownCast(handle); + DALI_TEST_CHECK(view); END_TEST; }