X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-Alignment.cpp;h=a4887badd7ac7cb6240c0a5d514bd6ada8ea741b;hb=91b8f5bbaa7d68f5ca8fc94287b8c181a10ba894;hp=4dcef6888e22da762726d8d9974192d06549e510;hpb=834ddf7832598a57fc18c282371554a1ed8f0a78;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp index 4dcef68..a4887ba 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 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. @@ -232,7 +232,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // Default, HorizontalCenter, VerticalCenter - Ensure they do not change! { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -252,7 +252,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalLeft, VerticalCenter { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -272,7 +272,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalRight, VerticalCenter { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -292,7 +292,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalLeft, VerticalTop { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -312,7 +312,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalCenter, VerticalTop { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -332,7 +332,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalRight, VerticalTop { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -352,7 +352,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalLeft, VerticalBottom { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -372,7 +372,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalCenter, VerticalBottom { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -392,7 +392,7 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void) // HorizontalRight, VerticalBottom { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -466,7 +466,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(); DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -479,7 +479,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalLeft); DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -492,7 +492,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalRight); DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -505,7 +505,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop); DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -518,7 +518,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop); DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -531,7 +531,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop); DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -544,7 +544,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom); DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -557,7 +557,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom); DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -570,7 +570,7 @@ int UtcDaliAlignmentGetAlignmentType(void) { Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom); DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -588,7 +588,7 @@ int UtcDaliAlignmentSetScaling(void) // ScaleToFill { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -621,7 +621,7 @@ int UtcDaliAlignmentSetScaling(void) // ScaleToFitKeepAspect { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -654,7 +654,7 @@ int UtcDaliAlignmentSetScaling(void) // ScaleToFillKeepAspect { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -687,7 +687,7 @@ int UtcDaliAlignmentSetScaling(void) // ShrinkToFit { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -720,7 +720,7 @@ int UtcDaliAlignmentSetScaling(void) // ShrinkToFitKeepAspect { Alignment alignment = Alignment::New(); - alignment.Add(RenderableActor::New()); + alignment.Add(Actor::New()); Stage::GetCurrent().Add(alignment); application.Render(); application.SendNotification(); @@ -905,7 +905,7 @@ int UtcDaliAlignmentChildAddAndRemove(void) application.Render(); application.SendNotification(); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); alignment.Add(actor); DALI_TEST_EQUALS(alignment.GetChildCount(), 1u, TEST_LOCATION); @@ -924,7 +924,7 @@ int UtcDaliAlignmentChildAddAndRemove(void) END_TEST; } -int UtcDaliAlignmentOnSizeSet(void) +int UtcDaliAlignmentSizeSetP(void) { ToolkitTestApplication application; @@ -935,14 +935,14 @@ int UtcDaliAlignmentOnSizeSet(void) application.SendNotification(); Vector2 size( 100.0f, 200.0f ); - alignment.SetPreferredSize(size); + alignment.SetSize(size); application.Render(); application.SendNotification(); application.Render(); application.SendNotification(); - DALI_TEST_EQUALS(size, alignment.GetImplementation().GetControlSize().GetVectorXY(), TEST_LOCATION); + DALI_TEST_EQUALS(size, alignment.GetTargetSize().GetVectorXY(), TEST_LOCATION); Stage::GetCurrent().Remove(alignment); END_TEST; @@ -1010,7 +1010,7 @@ int UtcDaliAlignmentOnSizeAnimation(void) Stage::GetCurrent().Add(alignment); Animation animation = Animation::New(100.0f); - animation.Resize(alignment, Vector3(100.0f, 150.0f, 200.0f)); + animation.AnimateTo( Property( alignment, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) ); animation.Play(); application.Render();