X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-EffectsView.cpp;h=e7761e643dedd54935e484589abae328ff9ca6c3;hb=0d07bc303ad28647afa1342319721384cc37d19f;hp=363f2b14b11385ff1da906f2c04d2421183675ab;hpb=928f30d2caf2775c5bcbfd84ceb4bf37ca29f020;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp index 363f2b1..e7761e6 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) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -106,21 +106,21 @@ int UtcDaliEffectsViewAddRemoveDropShadow(void) DALI_TEST_CHECK( view ); Actor actor = Actor::New(); - DALI_TEST_CHECK( !actor.OnStage() ); + DALI_TEST_CHECK( !actor.GetProperty< bool >( 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, Stage::GetCurrent().GetSize()); view.Add(actor); Stage::GetCurrent().Add(view); - DALI_TEST_CHECK( actor.OnStage() ); + DALI_TEST_CHECK( actor.GetProperty< bool >( 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< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); END_TEST; } @@ -153,16 +153,16 @@ int UtcDaliEffectsViewAddRemoveEmboss(void) Actor actor = Actor::New(); actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - DALI_TEST_CHECK( !actor.OnStage() ); + DALI_TEST_CHECK( !actor.GetProperty< bool >( 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 ); stage.Add(view); - DALI_TEST_CHECK( actor.OnStage() ); + DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); application.SendNotification(); application.Render(); @@ -207,7 +207,7 @@ int UtcDaliEffectsViewOnStage(void) ToolkitTestApplication application; EffectsView view = EffectsView::New(EffectsView::EMBOSS); - view.SetSize(100.f, 100.f); + view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); Stage stage = Stage::GetCurrent(); DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); @@ -224,7 +224,7 @@ int UtcDaliEffectsViewOffStage(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(); DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); @@ -359,7 +359,7 @@ int UtcDaliEffectsViewOffsetProperty(void) application.SendNotification(); application.Render(static_cast(durationSeconds*1000.0f) + 1u/*just beyond the animation duration*/); - value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET ); + value = view.GetCurrentProperty( EffectsView::Property::EFFECT_OFFSET ); value.Get(offsetValue); DALI_TEST_EQUALS( offsetValue, offsetAnimate, TEST_LOCATION ); @@ -394,7 +394,7 @@ int UtcDaliEffectsViewColorProperty(void) application.SendNotification(); application.Render(static_cast(durationSeconds*1000.0f) + 1u/*just beyond the animation duration*/); - value = view.GetProperty( EffectsView::Property::EFFECT_COLOR ); + value = view.GetCurrentProperty( EffectsView::Property::EFFECT_COLOR ); value.Get(colorValue); DALI_TEST_EQUALS( colorValue, colorAnimate, TEST_LOCATION ); @@ -457,7 +457,7 @@ 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 ); @@ -501,26 +501,26 @@ int UtcDaliEffectsViewSizeSet(void) { EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); - view.SetSize( 200.0f, 200.0f, 0.0f ); + 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< Vector3 >( 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 ); + 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< Vector3 >( 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 ); + view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) ); stage.Add( view ); application.SendNotification(); application.Render(); @@ -529,7 +529,7 @@ int UtcDaliEffectsViewSizeSet(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION ); } END_TEST;